nzakas on flat-config-array
Remove too-new syntax (compare)
nzakas on flat-config-array
Sponsors: Sync README with webs… Update: eslint --env-info outpu… Fix: Clarify line breaks in obj… and 27 more (compare)
{
"env": {
"browser": true,
"commonjs": true,
"node": true
},
"rules": {
"no-duplicate-case": "error",
"no-empty": "error",
"no-extra-semi": "error",
"no-func-assign": "error",
"no-irregular-whitespace": "error",
"no-unreachable": "error",
"curly": "error",
"dot-notation": "error",
"eqeqeq": "error",
"no-empty-function": "error",
"no-multi-spaces": "error",
"no-mixed-spaces-and-tabs": "error",
"no-trailing-spaces": "error",
"default-case": "error",
"no-fallthrough": "error",
"no-unused-vars": "error",
"no-use-before-define": "error",
"no-redeclare": "error",
"camelcase": "error",
"brace-style": "error",
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
}
}
root: true
on that config to tell eslint that this is the “root” and should stop looking up to parents?
Thanks @ilyavolodin this was what I was looking for... overlooked in the documentation...
Another query as followup to above response, is there a way I can configure eslint lint to warn for one configuration and error for another configuration...
I am looking for something like max-lines
should warn if between 250 - 500 lines and error is file has more than 500 lines.
I can write a custom rule for max line ranges, however, does eslint have an option to switch between warn
and error
based on config? should this be requested as a feature or does not make sense at all.
.eslintrc.js#overrides[2] » plugin:@typescript-eslint/recommended
.eslintrc.js#overrides[2]
.eslintrc.js#overrides[3] » plugin:@typescript-eslint/recommended
Hi
I still can not see answer for problem with eslint and "@babel/plugin-proposal-optional-chaining"
"Hi, I installed "@babel/plugin-proposal-optional-chaining": "^7.6.0", and added to .eslintrc.json"
with this error: ESLint couldn't find the plugin "@babel/eslint-plugin-plugin-proposal-optional-chaining".