{"action":"created","issue":{"url":"https://api.github.com/repos/eslint/eslint/issues/4630","labels_url":"https://api.github.com/repos/eslint/eslint/issues/4630/labels{/name}","comments_url":"https://api.github.com/repos/eslint/eslint/issues/4630/comments","events_url":"https://api.github.com/repos/eslint/eslint/issues/4630/events","html_url":"https://github.com/eslint/eslint/issues/4630","id":120874643,"number":4630,"title":"strict rule not finding \"use strict\"","user":{"login":"boneskull","id":924465,"avatar_url":"https://avatars.githubusercontent.com/u/924465?v=3","gravatar_id":"","url":"https://api.github.com/users/boneskull","html_url":"https://github.com/boneskull","followers_url":"https://api.github.com/users/boneskull/followers","following_url":"https://api.github.com/users/boneskull/following{/other_user}","gists_url":"https://api.github.com/users/boneskull/gists{/gist_id}","starred_url":"https://api.github.com/users/boneskull/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boneskull/subscriptions","organizations_url":"https://api.github.com/users/boneskull/orgs","repos_url":"https://api.github.com/users/boneskull/repos","events_url":"https://api.github.com/users/boneskull/events{/privacy}","received_events_url":"https://api.github.com/users/boneskull/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eslint/eslint/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/eslint/eslint/labels/proposal","name":"proposal","color":"fef2c0"},{"url":"https://api.github.com/repos/eslint/eslint/labels/rule","name":"rule","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-07T21:43:18Z","updated_at":"2015-12-08T12:02:27Z","closed_at":null,"body":"ESLint v1.10.3\r\n\r\n`.eslintrc`:\r\n\r\n```yaml\r\nenv:\r\n  node: true\r\n  es6: true\r\nparser: babel-eslint\r\n\r\nrules:\r\n  # errors\r\n  comma-dangle: 2\r\n  no-cond-assign:\r\n    - 2\r\n    - except-parens\r\n  no-console: 0\r\n  no-constant-condition: 2\r\n  no-control-regex: 2\r\n  no-debugger: 2\r\n  no-dupe-args: 2\r\n  no-dupe-keys: 2\r\n  no-duplicate-case: 2\r\n  no-empty-character-class: 2\r\n  no-empty: 2\r\n  no-ex-assign: 2\r\n  no-extra-boolean-cast: 2\r\n  no-extra-parens: 2\r\n  no-extra-semi: 2\r\n  no-func-assign: 2\r\n  no-inner-declarations: 2\r\n  no-invalid-regexp: 2\r\n  no-irregular-whitespace: 2\r\n  no-negated-in-lhs: 2\r\n  no-obj-calls: 2\r\n  no-regex-spaces: 2\r\n  no-sparse-arrays: 2\r\n  no-unreachable: 2\r\n  use-isnan: 2\r\n  valid-jsdoc:\r\n    - 1\r\n    -\r\n      requireReturn: false\r\n  valid-typeof: 2\r\n  no-unexpected-multiline: 2\r\n\r\n  # best practices\r\n  accessor-pairs: 0\r\n  block-scoped-var: 2\r\n  complexity: 0\r\n  consistent-return: 0\r\n  curly:\r\n    - 2\r\n    - all\r\n  default-case: 2\r\n  dot-notation: 2\r\n  dot-location:\r\n    - 2\r\n    - property\r\n  eqeqeq: 2\r\n  guard-for-in: 1\r\n  no-alert: 2\r\n  no-caller: 2\r\n  no-div-regex: 2\r\n  no-else-return: 2\r\n  no-empty-label: 2\r\n  no-eq-null: 2\r\n  no-eval: 2\r\n  no-extend-native: 2\r\n  no-extra-bind: 2\r\n  no-fallthrough: 2\r\n  no-floating-decimal: 2\r\n  no-implicit-coercion: 1\r\n  no-implied-eval: 2\r\n  no-invalid-this: 0\r\n  no-iterator: 2\r\n  no-labels: 1\r\n  no-lone-blocks: 2\r\n  no-loop-func: 2\r\n  no-multi-spaces: 2\r\n  no-multi-str: 2\r\n  no-native-reassign: 2\r\n  no-new-func: 2\r\n  no-new-wrappers: 2\r\n  no-new: 2\r\n  no-octal-escape: 2\r\n  no-octal: 2\r\n  no-param-reassign: 0\r\n  no-process-env: 1\r\n  no-proto: 2\r\n  no-redeclare: 2\r\n  no-return-assign: 0\r\n  no-script-url: 2\r\n  no-self-compare: 2\r\n  no-sequences: 2\r\n  no-throw-literal: 2\r\n  no-unused-expressions: 2\r\n  no-useless-call: 2\r\n  no-void: 2\r\n  no-warning-comments: 0\r\n  no-with: 2\r\n  radix: 2\r\n  vars-on-top: 2\r\n  wrap-iife: 2\r\n  yoda: 2\r\n\r\n  # strict mode\r\n  strict:\r\n    - 2\r\n    - global\r\n\r\n  # variables\r\n  init-declarations: 0\r\n  no-catch-shadow: 0\r\n  no-delete-var: 2\r\n  no-label-var: 2\r\n  no-shadow-restricted-names: 2\r\n  no-shadow: 1\r\n  no-undef-init: 2\r\n  no-undef: 2\r\n  no-undefined: 2\r\n  no-unused-vars: 2\r\n  no-use-before-define: 2\r\n\r\n  # NodeJS\r\n  callback-return: 0\r\n  handle-callback-err: 2\r\n  no-mixed-requires: 2\r\n  no-new-require: 2\r\n  no-path-concat: 2\r\n  no-process-exit: 1\r\n  no-restricted-modules: 0\r\n  no-sync: 0\r\n\r\n  # stylistic issues\r\n  array-bracket-spacing:\r\n    - 2\r\n    - never\r\n  brace-style:\r\n    - 2\r\n    - 1tbs\r\n  camelcase:\r\n    - 2\r\n    -\r\n      properties: always\r\n  comma-spacing:\r\n    - 2\r\n    -\r\n      before: false\r\n      after: true\r\n  comma-style:\r\n    - 2\r\n    - last\r\n  computed-property-spacing:\r\n    - 2\r\n    - never\r\n  consistent-this: 0\r\n  eol-last: 2\r\n  func-names: 1\r\n  func-style:\r\n    - 2\r\n    - declaration\r\n  id-length: 0\r\n  indent:\r\n    - 2\r\n    - 2\r\n  key-spacing:\r\n    - 2\r\n    -\r\n      beforeColon: false\r\n      afterColon: true\r\n  lines-around-comment:\r\n    - 2\r\n    -\r\n      beforeBlockComment: false\r\n      beforeLineComment: false\r\n  linebreak-style:\r\n    - 2\r\n    - unix\r\n  max-nested-callbacks:\r\n    - 2\r\n    - 3\r\n  new-cap: 0\r\n  new-parens: 2\r\n  newline-after-var: 0\r\n  no-array-constructor: 0\r\n  no-continue: 1\r\n  no-inline-comments: 2\r\n  no-lonely-if: 2\r\n  no-mixed-spaces-and-tabs: 2\r\n  no-multiple-empty-lines:\r\n    - 2\r\n    -\r\n      max: 2\r\n  no-nested-ternary: 2\r\n  no-new-object: 2\r\n  no-spaced-func: 2\r\n  no-ternary: 0\r\n  no-trailing-spaces: 2\r\n  no-underscore-dangle: 0\r\n  no-unneeded-ternary: 0\r\n  object-curly-spacing:\r\n    - 2\r\n    - never\r\n  one-var:\r\n    - 2\r\n    - never\r\n  operator-assignment:\r\n    - 2\r\n    - always\r\n  operator-linebreak:\r\n    - 2\r\n    - after\r\n  padded-blocks:\r\n    - 2\r\n    - never\r\n  quote-props: 0\r\n  quotes: 0\r\n  require-jsdoc: 0\r\n  id-match: 0\r\n  semi-spacing:\r\n    - 2\r\n    -\r\n      before: false\r\n      after: true\r\n  semi:\r\n    - 2\r\n    - always\r\n  sort-vars: 0\r\n  space-after-keywords:\r\n    - 2\r\n    - always\r\n  space-before-blocks:\r\n    - 2\r\n    - always\r\n  space-before-function-paren:\r\n    - 2\r\n    - never\r\n  space-in-parens:\r\n    - 2\r\n    - never\r\n  space-infix-ops: 2\r\n  space-return-throw-case: 2\r\n  space-unary-ops: 2\r\n  spaced-comment: 1\r\n  wrap-regex: 0\r\n\r\n  # es6\r\n  arrow-parens:\r\n    - 1\r\n    - as-needed\r\n  arrow-spacing: 2\r\n  no-var: 2\r\n  prefer-arrow-callback: 1\r\n  prefer-const: 1\r\n  prefer-template: 1\r\n\r\n  # legacy\r\n  max-len:\r\n    - 2\r\n    - 80\r\n  max-params:\r\n    - 2\r\n    - 4\r\n  no-bitwise: 1\r\n  no-plusplus: 0\r\n```\r\n\r\nsample output:\r\n\r\n```shell\r\n$ npm test\r\n\r\n> voltagedivider@0.0.0 test /Volumes/alien/projects/decipher/beacon/hermes/plugins/voltagedivider\r\n> eslint . && karma start --single-run\r\n\r\n\r\n/Volumes/alien/projects/decipher/beacon/hermes/plugins/voltagedivider/karma.conf.js\r\n  3:1  error  Use the global form of \"use strict\"  strict\r\n\r\n/Volumes/alien/projects/decipher/beacon/hermes/plugins/voltagedivider/src/index.js\r\n  3:1  error  Use the global form of \"use strict\"  strict\r\n\r\n/Volumes/alien/projects/decipher/beacon/hermes/plugins/voltagedivider/src/language/index.js\r\n  3:1  error  Use the global form of \"use strict\"  strict\r\n\r\n/Volumes/alien/projects/decipher/beacon/hermes/plugins/voltagedivider/src/language/language-picker/controller.js\r\n  4:1  error  Use the global form of \"use strict\"  strict\r\n\r\n/Volumes/alien/projects/decipher/beacon/hermes/plugins/voltagedivider/src/language/language-picker/index.js\r\n  3:1  error  Use the global form of \"use strict\"  strict\r\n```\r\n\r\nsample file:\r\n\r\n```js\r\n'use strict';\r\n\r\nconst PickerCtrl = require('./controller');\r\nconst fs = require('fs');\r\nconst path = require('path');\r\n\r\nfunction languagePicker() {\r\n  return {\r\n    restrict: 'E',\r\n    template: fs.readFileSync(path.join(__dirname, 'language-picker.html'),\r\n      'utf8'),\r\n    controller: PickerCtrl\r\n  };\r\n}\r\n\r\nmodule.exports = languagePicker;\r\n```\r\n\r\nChanging it to `\"use strict\";` (double-quotes) seems to have no effect.  This happened after an update from v1.9.0 to latest.\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/28930373-strict-rule-not-finding-use-strict?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F282608&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/eslint/eslint/issues/comments/162861920","html_url":"https://github.com/eslint/eslint/issues/4630#issuecomment-162861920","issue_url":"https://api.github.com/repos/eslint/eslint/issues/4630","id":162861920,"user":{"login":"nuxdie","id":3918844,"avatar_url":"https://avatars.githubusercontent.com/u/3918844?v=3","gravatar_id":"","url":"https://api.github.com/users/nuxdie","html_url":"https://github.com/nuxdie","followers_url":"https://api.github.com/users/nuxdie/followers","following_url":"https://api.github.com/users/nuxdie/following{/other_user}","gists_url":"https://api.github.com/users/nuxdie/gists{/gist_id}","starred_url":"https://api.github.com/users/nuxdie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nuxdie/subscriptions","organizations_url":"https://api.github.com/users/nuxdie/orgs","repos_url":"https://api.github.com/users/nuxdie/repos","events_url":"https://api.github.com/users/nuxdie/events{/privacy}","received_events_url":"https://api.github.com/users/nuxdie/received_events","type":"User","site_admin":false},"created_at":"2015-12-08T12:02:27Z","updated_at":"2015-12-08T12:02:27Z","body":"@boneskull try use [babel-eslint@v4.1.6](https://github.com/babel/babel-eslint/releases/tag/v4.1.6) it helped me"}}