{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/5725","repository_url":"https://api.github.com/repos/eslint/eslint","labels_url":"https://api.github.com/repos/eslint/eslint/issues/5725/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/5725/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/5725/events","html_url":"https://github.com/eslint/eslint/issues/5725","id":144256041,"number":5725,"title":"\"strict\" rule doesn't work properly","user":{"login":"danielepennati","id":2393040,"avatar_url":"https://avatars.githubusercontent.com/u/2393040?v=3","gravatar_id":"","url":"https://api.github.com/users/danielepennati","html_url":"https://github.com/danielepennati","followers_url":"https://api.github.com/users/danielepennati/followers","following_url":"https://api.github.com/users/danielepennati/following{/other_user}","gists_url":"https://api.github.com/users/danielepennati/gists{/gist_id}","starred_url":"https://api.github.com/users/danielepennati/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielepennati/subscriptions","organizations_url":"https://api.github.com/users/danielepennati/orgs","repos_url":"https://api.github.com/users/danielepennati/repos","events_url":"https://api.github.com/users/danielepennati/events{/privacy}","received_events_url":"https://api.github.com/users/danielepennati/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/triage","name":"triage","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-29T12:55:02Z","updated_at":"2016-03-29T13:00:30Z","closed_at":null,"body":"Hello,\r\nwe are using eslint v2.4.0 extending the [eslint-config-airbnb](https://www.npmjs.com/package/eslint-config-airbnb)\r\nHere it is our config:\r\n\r\n```javascript\r\nmodule.exports = {\r\n    'extends': './node_modules/eslint-config-airbnb/base.js',\r\n    'env': {\r\n        'node': true\r\n    },\r\n    'rules': {\r\n        // Always strict\r\n        'strict': [2, 'safe'],\r\n        // This option validates a specific tab width for your code in block statements.\r\n        'indent': [2, 4, { 'SwitchCase': 1 }],\r\n        // This rule enforces consistent use of trailing commas in object and array literals.\r\n        'comma-dangle': [2, 'never'],\r\n        // Specify the maximum length of a line in your program\r\n        'max-len': [2, 1000, 4],\r\n        // Disallow reassignment of function parameters\r\n        'no-param-reassign': [2, { 'props': true }],\r\n        // Shadowing is the process by which a local variable shares the same name as a variable in its containing scope\r\n        'no-shadow': 0,\r\n        // Variable++\r\n        'no-param-reassign': 0,\r\n        // Not require camel case names\r\n        'camelcase': 0,\r\n        // Not require quotes around object literal property names\r\n        'quote-props': 0,\r\n        // Not require method and property shorthand syntax for object literals\r\n        'object-shorthand': 0,\r\n        // “There are only two hard things in Computer Science: cache invalidation and naming things.” — Phil Karlton\r\n        'id-blacklist': [2, 'abstract', 'arguments', 'boolean', 'break', 'byte', 'case', 'catch', 'char', 'class', 'const', 'continue', 'debugger', 'default', 'delete', 'do', 'double', 'else', 'enum', 'eval', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for', 'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int', 'interface', 'let', 'long', 'native', 'new', 'null', 'package', 'private', 'protected', 'public', 'return', 'short', 'static', 'super', 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try', 'typeof', 'var', 'void', 'volatile', 'while', 'with', 'yield'],\r\n        // Disallow unnecessary constructor\r\n        'no-useless-constructor': 0,\r\n        // Require parens in arrow function arguments\r\n        'arrow-parens': [2, 'always']\r\n    }\r\n};\r\n```\r\n\r\nWe want to get error if there is no \"use strict\" statement in the file.\r\nThe issue is that we never get the error.\r\nIf we change the strict rule to \"function\" or 'never' and we have a \"use strict\" in global scope we get this error\r\n> 'use strict' is unnecessary inside of modules \r\n\r\nAnyway we never get an error if there isn't a 'use strict' is unnecessary inside of file and strict rule is \"safe\" or \"global\"\r\n\r\nIs it an eslint issue or we have misleading the documentation?\r\n\r\nthanks\r\ndaniele"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/202881261","html_url":"https://github.com/eslint/eslint/issues/5725#issuecomment-202881261","issue_url":"https://api.github.com/repos/eslint/eslint/issues/5725","id":202881261,"user":{"login":"platinumazure","id":284282,"avatar_url":"https://avatars.githubusercontent.com/u/284282?v=3","gravatar_id":"","url":"https://api.github.com/users/platinumazure","html_url":"https://github.com/platinumazure","followers_url":"https://api.github.com/users/platinumazure/followers","following_url":"https://api.github.com/users/platinumazure/following{/other_user}","gists_url":"https://api.github.com/users/platinumazure/gists{/gist_id}","starred_url":"https://api.github.com/users/platinumazure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/platinumazure/subscriptions","organizations_url":"https://api.github.com/users/platinumazure/orgs","repos_url":"https://api.github.com/users/platinumazure/repos","events_url":"https://api.github.com/users/platinumazure/events{/privacy}","received_events_url":"https://api.github.com/users/platinumazure/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T13:00:30Z","updated_at":"2016-03-29T13:00:30Z","body":"Are you using modules or scripts? Meaning, are you using import/export keywords intentionally, or skills each file be treated merely as a script?\r\n\r\nIt is possible the airbnb configuration assumes the former but you want the latter. If so, try adding the following to your configuration:\r\n\r\n```json\r\n{\r\n    \"parserOptions\": {\r\n        \" sourceType\": \"script\"\r\n    }\r\n}"}}