Repository navigation
fix: eslint config - #123
Conversation
| "browser": true, | ||
| "mocha": true, | ||
| "node": true | ||
| "es6": true, |
There was a problem hiding this comment.
ecmaVersion seems to be a valid property, according to ESLint doc, but I think it's only available on newer eslint version (v7), while ours is still on v5.
| "mocha": true, | ||
| "node": true | ||
| }, | ||
| "parser": "babel-eslint", |
There was a problem hiding this comment.
I think this is the missing part that causes eslint not working.
| "jsx-a11y/no-noninteractive-element-to-interactive-role": "error", | ||
| "jsx-a11y/no-noninteractive-tabindex": "error", | ||
| "jsx-a11y/no-onchange": "error", | ||
| "jsx-a11y/no-onchange": 0, |
There was a problem hiding this comment.
Once I got eslint to work, there is an error in the Footer component, where we have an onChange event in <select> element.
This rule is outdated as it was based on the behaviors of old browsers. The rule will be deprecated in the next release of jsx-a11y: jsx-eslint/eslint-plugin-jsx-a11y#398 (comment)
I disabled the rule to prevent false positive error.
| "test": "react-scripts test", | ||
| "eject": "react-scripts eject" | ||
| "eject": "react-scripts eject", | ||
| "lint:fix": "eslint --fix --ext .js ." |
There was a problem hiding this comment.
Added a script here to fix lint problems, but I could add a pre-commit hook here if we deem it necessary.
No description provided.