Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Don't indent "use strict" #167

Closed
drewhamlett opened this Issue · 0 comments

2 participants

@drewhamlett

In 'jslint node true' mode you can put "use strict" at the top of file. Current jsbeautifyjs will indent this like so

/*jslint node: true, vars: true, plusplus: true, devel: true, nomen: true */
    "use strict";

JSLint will now complain that use strict is in the wrong column.

expected would be this

/*jslint node: true, vars: true, plusplus: true, devel: true, nomen: true */
"use strict";

This is what I"ve changed to jsbeautify so it won't do this.

 case 'TK_STRING':
            if (last_type === 'TK_INLINE_COMMENT' && (token_text === '"use strict"' || token_text === "'use strict'")) {
                print_token();
                break;
            }

This could be written a lot better, but I just wanted to show it as an example.

@einars einars closed this in 8daa7c7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.