impress/.eslintrc.json
Matchu 494f82601f Set up eslint for wardrobe-2020
Ok cool, I have just not been running any of this since moving out of
impress-2020, but now that we're doing serious JS work in here it's time
to turn it back on!!

1. Install eslint and the plugins we use
2. Set up a `yarn lint` command
3. Set up a git hook via husky to lint on pre-commit
4. Fix/disable all the lint errors!
2023-11-02 18:11:07 -07:00

45 lines
1.1 KiB
JSON

{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react", "react-hooks", "jsx-a11y"],
"env": {
"browser": true,
"es2021": true
},
"globals": {
"process": true // For process.env["NODE_ENV"]
},
"rules": {
"no-console": [
"warn",
{
"allow": ["debug", "info", "warn", "error"]
}
],
"import/first": "off",
"import/no-webpack-loader-syntax": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^unused",
"argsIgnorePattern": "^_+$|^e$"
}
],
"react/no-unescaped-entities": ["error", { "forbid": [">", "}"] }],
// We have some React.forwardRefs that trigger this, not sure how to improve
"react/display-name": "off",
"react/prop-types": "off"
},
"settings": {
"react": {
"version": "detect"
}
}
}