0

I cannot make a config to override the main configuration of the eslint.js

.eslintrc

module.exports = {
  "root": true,
  "env": {
    "node": true,
    "browser": true,
  },
  "globals": {},
  "parserOptions": {
    "ecmaVersion": 5,
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true,
    },
  },
 
  "extends": ["myplugin"],
  "rules": {
    "prettier/prettier": ["error"],
  },
}

eslint-config-myplugin

module.exports = {

      "parserOptions": {
        "ecmaVersion": 6,
      }
   

}

i get this error:

0:0 error Parsing error: sourceType 'module' is not supported when ecmaVersion < 2015. Consider adding { ecmaVersion: 2015 } to the parser options

✖ 1 problem (1 error, 0 warnings)

Nick
  • 2,818
  • 5
  • 42
  • 60

1 Answers1

0

That’s the way it is designed to work, set the parser option to what you need it to be in .eslintrc

David Bradshaw
  • 11,859
  • 3
  • 41
  • 70