|
| 1 | +// eslint-disable-next-line no-undef |
| 2 | +module.exports = { |
| 3 | + root: true, |
| 4 | + env: { |
| 5 | + browser: true, |
| 6 | + es2021: true, |
| 7 | + }, |
| 8 | + ignorePatterns: ["node_modules", "dist", "coverage"], |
| 9 | + extends: [ |
| 10 | + "eslint:recommended", |
| 11 | + "plugin:import/recommended", |
| 12 | + "plugin:import/typescript", |
| 13 | + "plugin:react/recommended", |
| 14 | + "plugin:react/jsx-runtime", |
| 15 | + "plugin:react-hooks/recommended", |
| 16 | + "plugin:@typescript-eslint/recommended", |
| 17 | + "plugin:@typescript-eslint/eslint-recommended", |
| 18 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 19 | + "plugin:prettier/recommended", |
| 20 | + "plugin:jsx-a11y/strict", |
| 21 | + ], |
| 22 | + parser: "@typescript-eslint/parser", |
| 23 | + parserOptions: { |
| 24 | + extraFileExtensions: [".json"], |
| 25 | + ecmaVersion: 12, |
| 26 | + sourceType: "module", |
| 27 | + tsconfigRootDir: __dirname, // eslint-disable-line no-undef |
| 28 | + project: "./tsconfig.json", |
| 29 | + ecmaFeatures: { |
| 30 | + jsx: true, |
| 31 | + }, |
| 32 | + }, |
| 33 | + overrides: [ |
| 34 | + { |
| 35 | + files: ["**/*.jsx", "**/*.js", "**/*.ts", "**/*.tsx"], |
| 36 | + }, |
| 37 | + ], |
| 38 | + plugins: [ |
| 39 | + "simple-import-sort", |
| 40 | + "import", |
| 41 | + "json-format", |
| 42 | + "prettier", |
| 43 | + "@typescript-eslint", |
| 44 | + "unused-imports", |
| 45 | + ], |
| 46 | + rules: { |
| 47 | + radix: 0, |
| 48 | + "no-new": 0, |
| 49 | + "no-void": 0, |
| 50 | + "no-shadow": 0, |
| 51 | + "no-bitwise": 0, |
| 52 | + "no-unused-vars": 0, |
| 53 | + "react/prop-types": 0, |
| 54 | + "prettier/prettier": ["error"], |
| 55 | + "linebreak-style": ["error", "unix"], |
| 56 | + "no-prototype-builtins": 0, |
| 57 | + "prefer-rest-params": 0, |
| 58 | + "no-mixed-spaces-and-tabs": 0, |
| 59 | + "react/jsx-uses-vars": 2, |
| 60 | + "import/no-cycle": "error", |
| 61 | + "react/jsx-uses-react": "error", |
| 62 | + "unused-imports/no-unused-imports": "error", |
| 63 | + "@typescript-eslint/unbound-method": 0, |
| 64 | + "@typescript-eslint/no-unsafe-argument": 0, |
| 65 | + "@typescript-eslint/no-unsafe-return": 0, |
| 66 | + "@typescript-eslint/no-non-null-assertion": 0, |
| 67 | + "@typescript-eslint/no-empty-function": 0, |
| 68 | + "@typescript-eslint/ban-ts-comment": 0, |
| 69 | + "@typescript-eslint/no-var-requires": 0, |
| 70 | + "eslint-comments/no-unlimited-disable": 0, |
| 71 | + "@typescript-eslint/explicit-module-boundary-types": 0, |
| 72 | + "@typescript-eslint/no-explicit-any": 0, |
| 73 | + "@typescript-eslint/no-unsafe-call": 0, |
| 74 | + "simple-import-sort/imports": [ |
| 75 | + "error", |
| 76 | + { |
| 77 | + groups: [["^node:", "^[a-z]", "^@?\\w", "^", "^\\.", "^\\u0000"]], |
| 78 | + }, |
| 79 | + ], |
| 80 | + "@typescript-eslint/no-unused-vars": [ |
| 81 | + "error", |
| 82 | + { |
| 83 | + args: "all", |
| 84 | + varsIgnorePattern: "^_", |
| 85 | + destructuredArrayIgnorePattern: "^_", |
| 86 | + argsIgnorePattern: "^_", |
| 87 | + }, |
| 88 | + ], |
| 89 | + "@typescript-eslint/no-shadow": 0, |
| 90 | + "@typescript-eslint/no-unnecessary-type-constraint": 0, |
| 91 | + "@typescript-eslint/no-unsafe-assignment": 0, |
| 92 | + "@typescript-eslint/restrict-plus-operands": 2, |
| 93 | + "@typescript-eslint/consistent-type-imports": "error", |
| 94 | + "@typescript-eslint/no-unsafe-member-access": 0, |
| 95 | + "@typescript-eslint/require-await": "error", |
| 96 | + "@typescript-eslint/no-misused-promises": "error", |
| 97 | + "@typescript-eslint/no-floating-promises": [ |
| 98 | + "error", |
| 99 | + { ignoreVoid: true, ignoreIIFE: true }, |
| 100 | + ], |
| 101 | + }, |
| 102 | + settings: { |
| 103 | + "import/parsers": { |
| 104 | + "@typescript-eslint/parser": [".ts", ".json"], |
| 105 | + }, |
| 106 | + "import/resolver": { |
| 107 | + typescript: { |
| 108 | + alwaysTryTypes: true, |
| 109 | + project: "./tsconfig.json", |
| 110 | + }, |
| 111 | + }, |
| 112 | + react: { |
| 113 | + version: "detect", |
| 114 | + }, |
| 115 | + }, |
| 116 | +}; |
0 commit comments