movie-web/.eslintrc.js

69 lines
1.7 KiB
JavaScript
Raw Normal View History

2022-12-27 15:44:36 +00:00
const a11yOff = Object.keys(require("eslint-plugin-jsx-a11y").rules).reduce(
(acc, rule) => {
acc[`jsx-a11y/${rule}`] = "off";
return acc;
},
{}
);
2022-03-06 12:42:27 +00:00
module.exports = {
2023-01-08 14:38:27 +00:00
env: {
browser: true
2023-01-08 14:38:27 +00:00
},
2022-03-06 12:42:27 +00:00
extends: [
"airbnb",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
2023-01-08 14:38:27 +00:00
"prettier",
"plugin:prettier/recommended"
2022-03-06 12:42:27 +00:00
],
2022-12-27 15:51:32 +00:00
ignorePatterns: ["public/*", "dist/*", "/*.js", "/*.ts"],
2022-03-06 12:42:27 +00:00
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: "./"
2022-03-06 12:42:27 +00:00
},
2023-01-08 14:42:35 +00:00
settings: {
"import/resolver": {
typescript: {}
}
2023-01-08 14:42:35 +00:00
},
2022-03-06 12:42:27 +00:00
plugins: ["@typescript-eslint", "import"],
rules: {
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
"react/require-default-props": "off",
"react/destructuring-assignment": "off",
"no-underscore-dangle": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-console": "off",
"@typescript-eslint/no-this-alias": "off",
"import/prefer-default-export": "off",
"@typescript-eslint/no-empty-function": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"no-restricted-syntax": "off",
"react/jsx-props-no-spreading": "off",
2022-05-02 18:12:04 +00:00
"consistent-return": "off",
"no-continue": "off",
"no-eval": "off",
"no-await-in-loop": "off",
"no-nested-ternary": "off",
"prefer-destructuring": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
2022-03-06 12:42:27 +00:00
"react/jsx-filename-extension": [
"error",
{ extensions: [".js", ".tsx", ".jsx"] }
2022-03-06 12:42:27 +00:00
],
"import/extensions": [
"error",
"ignorePackages",
{
ts: "never",
tsx: "never"
}
2022-03-06 12:42:27 +00:00
],
...a11yOff
}
2022-03-06 12:42:27 +00:00
};