analytics/assets/.eslintrc.json
Mackenzie 9c2fd9aca5
1. Remove the "airbnb" eslint plugin since it conflicts with prettier (#1374)
and so was just annoying
2. Get rid of all existing ESLint errors.
2a. Turned off `react/display-name` because I couldn't figure out how to
make that wrapped component have a display name. If anyone can figure it
out, that'd be great, because that makes things nicer when using the
React debugger.
2b. The part where it says `plausible()` is undefined in `app.js` is
bothering me. I disabled the check because I can't figure out where that
actually comes from to put in the proper import.
2c. Told ESLint we're using Babel.
3. Added `npm run format` and `npm run lint` commands.
2021-10-11 14:48:19 +02:00

37 lines
1.2 KiB
JSON

{
"env": {
"browser": true
},
"extends": ["eslint:recommended",
"plugin:react/recommended",
"prettier"
],
"parser": "babel-eslint",
"plugins": ["prettier"],
"rules": {
"max-len": [0, {"code": 120}],
"prettier/prettier": [2],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],
"react/destructuring-assignment": [0],
"react/prop-types": [0],
"max-classes-per-file": [0],
"react/display-name": [0],
"react/jsx-one-expression-per-line": [0],
"react/self-closing-comp": [0],
"no-unused-expressions": [1, { "allowShortCircuit": true }],
"no-unused-vars": [2, { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
"jsx-a11y/click-events-have-key-events": [0],
"jsx-a11y/no-static-element-interactions": [0],
"react/no-did-update-set-state": [0]
},
"settings": {
"react": {
"createClass": "createReactClass", // Regex for Component Factory to use,
// default to "createReactClass"
"pragma": "React", // Pragma to use, default to "React"
"fragment": "Fragment", // Fragment to use (may be a property of <pragma>), default to "Fragment"
"version": "detect"
}
}
}