eslint4b
eslint4b copied to clipboard
How to use custom parser? babel-parser
I'm trying to integrate eslint4b with codemirror linting addon using codemirror-lint-eslint
library.
I keep getting this error
This is the configuration
var defaultConfig = {
"ecmaFeatures": {},
"env": {
"browser": true,
"node": true,
"amd": false,
"mocha": false,
"jasmine": false,
"es2021": true
},
"globals": {
"browser": true,
"node": true
},
"extends": [
"plugin:react/recommended",
"airbnb",
"plugin:prettier/recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:react-hooks/recommended",
"plugin:react-redux/recommended",
"plugin:promise/recommended",
"plugin:jsx-a11y/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module"
},
"plugins": ["react", "simple-import-sort", "better-styled-components"],
"rules": {
// ... eslint rules
}
}
This is how I use eslint4b
Any pointer will be really helpful.
Thank you
See the demo: https://github.com/mysticatea/vue-eslint-demo/blob/master/src/lib/eslint.js