Non fixable code reported as error
See original GitHub issueEnvironment Info:
Node version: v14.16.0
npm version: v6.14.11
Local ESLint version: v7.28.0 (Currently used)
Global ESLint version: v7.26.0
Operating System: linux 5.11.0-17-generic
I’m using @babel/eslint-parser
Configuration
{
"parser": "@babel/eslint-parser",
"extends": ["airbnb", "airbnb/hooks", "plugin:prettier/recommended", "plugin:jest/recommended"],
"globals": {
"fetch": "readonly",
"I18n": "readonly",
"$": "readonly",
"jQuery": "readonly",
"_": "readonly",
"ActionCable": "readonly",
"Handlebars": "readonly",
"moment": "readonly",
"Trmz": "readonly",
"ActionCableApp": "readonly",
"L": "readonly",
"google": "readonly"
},
"rules": {
"camelcase": 0,
"import/no-extraneous-dependencies": [2, { "devDependencies": true }],
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/click-events-have-key-events": 0,
"jsx-a11y/control-has-associated-label": 0,
"jsx-a11y/label-has-associated-control": 0,
"jsx-a11y/no-autofocus": 1,
"jsx-a11y/no-noninteractive-element-interactions": 0,
"jsx-a11y/no-static-element-interactions": 0,
"max-len": [2, {
"code": 120,
"ignoreUrls": true,
"ignoreComments": false,
"ignoreRegExpLiterals": true,
"ignoreStrings": true,
"ignoreTemplateLiterals": true
}],
"no-unused-expressions": [2, { "allowTernary": true }],
"no-unused-vars": [2, { "argsIgnorePattern": "^_", "ignoreRestSiblings": true }],
"react/destructuring-assignment": 0,
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/jsx-props-no-spreading": 0,
"react/jsx-uses-react": 0,
"react/no-array-index-key": 0,
"react/prop-types": 0,
"react/react-in-jsx-scope": 0,
"semi": [2, "never"]
},
"settings": {
"import/resolver": {
"webpack": {
"config": "config/webpack/development.js"
}
}
},
"env": {
"browser": true,
"node": true
}
}
npx eslint app/javascript
I noticed an issue on @babel/eslint-parser
package update, but was directed here to report it.
The details are also here https://github.com/babel/babel/issues/13401
In short, the error reported by eslint is not possible to fix https://eslint.org/demo#eyJ0ZXh0IjoiZnVuY3Rpb24gU29tZXRoaW5nKCkge1xuICBmdW5jdGlvbiBoYW5kbGVQb3N0YWxDb2RlcygpIHtcbiAgICBmZXRjaChcbiAgICAgIGAvc3RhZmYvYXBpL3Bvc3RhbF9jb2Rlcz9jb3VudHJ5X2NvZGU9JHtzZWxlY3RlZENvdW50cnl9JmNlbnRyYWxfcG9zdGFsX2NvZGU9JHtjZW50cmFsUG9zdGFsQ29kZX0mcmFkaXVzPSR7cmFkaXVzfWAsXG4gICAgKVxuICB9XG59Iiwib3B0aW9ucyI6eyJwYXJzZXJPcHRpb25zIjp7ImVjbWFWZXJzaW9uIjoxMSwic291cmNlVHlwZSI6InNjcmlwdCIsImVjbWFGZWF0dXJlcyI6e319LCJydWxlcyI6eyJtYXgtbGVuIjoyfSwiZW52Ijp7fX19
the error I see is error This line has a length of 122. Maximum allowed is 120 max-len
in such case, should it be treated as an error?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:10 (6 by maintainers)
Top GitHub Comments
I did, but was sent here. I’ll try again. I guess we’re having more info now https://github.com/babel/babel/issues/13401
I think we can close it, as it does not happen with the default parser.