requireUseStrict

Requires 'use strict'; statements

Values:

  • true for default behavior (require 'use strict' statements for files)

Example

"requireUseStrict": true
Valid
'use strict';
// code
// comment line or block
'use strict';
// code
// comment line or block

'use strict';
// code
Invalid
// code
Rule source
Test source