2022-12-27 16:44:36 +01:00
|
|
|
const a11yOff = Object.keys(require("eslint-plugin-jsx-a11y").rules).reduce(
|
|
|
|
(acc, rule) => {
|
|
|
|
acc[`jsx-a11y/${rule}`] = "off";
|
|
|
|
return acc;
|
|
|
|
},
|
|
|
|
{}
|
|
|
|
);
|
2022-03-06 14:41:51 +01:00
|
|
|
|
2022-03-06 13:42:27 +01:00
|
|
|
module.exports = {
|
2023-01-08 15:38:27 +01:00
|
|
|
env: {
|
2023-04-24 17:41:54 +02:00
|
|
|
browser: true,
|
2023-01-08 15:38:27 +01:00
|
|
|
},
|
2022-03-06 13:42:27 +01:00
|
|
|
extends: [
|
|
|
|
"airbnb",
|
|
|
|
"airbnb/hooks",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
2023-04-24 17:41:54 +02:00
|
|
|
"plugin:prettier/recommended",
|
2022-03-06 13:42:27 +01:00
|
|
|
],
|
2022-12-27 16:51:32 +01:00
|
|
|
ignorePatterns: ["public/*", "dist/*", "/*.js", "/*.ts"],
|
2022-03-06 13:42:27 +01:00
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
parserOptions: {
|
|
|
|
project: "./tsconfig.json",
|
2023-04-24 17:41:54 +02:00
|
|
|
tsconfigRootDir: "./",
|
2022-03-06 13:42:27 +01:00
|
|
|
},
|
2023-01-08 15:42:35 +01:00
|
|
|
settings: {
|
|
|
|
"import/resolver": {
|
2023-04-24 17:41:54 +02:00
|
|
|
typescript: {
|
|
|
|
project: "./tsconfig.json",
|
|
|
|
},
|
|
|
|
},
|
2023-01-08 15:42:35 +01:00
|
|
|
},
|
2023-04-24 17:41:54 +02:00
|
|
|
plugins: ["@typescript-eslint", "import", "prettier"],
|
2022-03-06 13:42:27 +01:00
|
|
|
rules: {
|
|
|
|
"react/jsx-uses-react": "off",
|
|
|
|
"react/react-in-jsx-scope": "off",
|
|
|
|
"react/require-default-props": "off",
|
|
|
|
"react/destructuring-assignment": "off",
|
2022-03-06 14:41:51 +01:00
|
|
|
"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",
|
2023-02-24 19:23:00 +01:00
|
|
|
"import/no-unresolved": ["error", { ignore: ["^virtual:"] }],
|
2022-03-06 14:41:51 +01:00
|
|
|
"react/jsx-props-no-spreading": "off",
|
2022-05-02 20:12:04 +02:00
|
|
|
"consistent-return": "off",
|
|
|
|
"no-continue": "off",
|
|
|
|
"no-eval": "off",
|
|
|
|
"no-await-in-loop": "off",
|
2023-01-23 01:55:57 +01:00
|
|
|
"no-nested-ternary": "off",
|
2023-02-12 15:58:11 +01:00
|
|
|
"prefer-destructuring": "off",
|
2023-02-19 18:03:54 +01:00
|
|
|
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
2022-03-06 13:42:27 +01:00
|
|
|
"react/jsx-filename-extension": [
|
|
|
|
"error",
|
2023-04-24 17:41:54 +02:00
|
|
|
{ extensions: [".js", ".tsx", ".jsx"] },
|
2022-03-06 13:42:27 +01:00
|
|
|
],
|
|
|
|
"import/extensions": [
|
|
|
|
"error",
|
|
|
|
"ignorePackages",
|
|
|
|
{
|
|
|
|
ts: "never",
|
2023-04-24 17:41:54 +02:00
|
|
|
tsx: "never",
|
|
|
|
},
|
2022-03-06 13:42:27 +01:00
|
|
|
],
|
2023-04-24 17:41:54 +02:00
|
|
|
"import/order": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
groups: [
|
|
|
|
"builtin",
|
|
|
|
"external",
|
|
|
|
"internal",
|
|
|
|
["sibling", "parent"],
|
|
|
|
"index",
|
|
|
|
"unknown",
|
|
|
|
],
|
|
|
|
"newlines-between": "always",
|
|
|
|
alphabetize: {
|
|
|
|
order: "asc",
|
|
|
|
caseInsensitive: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"sort-imports": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
ignoreCase: false,
|
|
|
|
ignoreDeclarationSort: true,
|
|
|
|
ignoreMemberSort: false,
|
|
|
|
memberSyntaxSortOrder: ["none", "all", "multiple", "single"],
|
|
|
|
allowSeparatedGroups: true,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
...a11yOff,
|
|
|
|
},
|
2022-03-06 13:42:27 +01:00
|
|
|
};
|