|
| 1 | +module.exports = { |
| 2 | + env: { |
| 3 | + browser: true, |
| 4 | + es6: true, |
| 5 | + commonjs: true, |
| 6 | + node: true, |
| 7 | + }, |
| 8 | + root: true, |
| 9 | + extends: [ |
| 10 | + "eslint:recommended", |
| 11 | + "plugin:@typescript-eslint/eslint-recommended", |
| 12 | + "plugin:@typescript-eslint/recommended", |
| 13 | + "prettier/@typescript-eslint", |
| 14 | + "plugin:react/recommended", |
| 15 | + ], |
| 16 | + parser: "@typescript-eslint/parser", |
| 17 | + parserOptions: { |
| 18 | + project: "tsconfig.eslint.json", |
| 19 | + }, |
| 20 | + plugins: ["@typescript-eslint"], |
| 21 | + rules: { |
| 22 | + "@typescript-eslint/no-floating-promises": ["error", { ignoreVoid: true }], |
| 23 | + "@typescript-eslint/naming-convention": [ |
| 24 | + "error", |
| 25 | + { |
| 26 | + selector: "interface", |
| 27 | + format: ["PascalCase"], |
| 28 | + custom: { |
| 29 | + regex: "^I[A-Z]", |
| 30 | + match: true, |
| 31 | + }, |
| 32 | + }, |
| 33 | + ], |
| 34 | + "@typescript-eslint/no-unused-vars": ["warn", { args: "none" }], |
| 35 | + "@typescript-eslint/no-use-before-define": "off", |
| 36 | + "@typescript-eslint/camelcase": "off", |
| 37 | + "@typescript-eslint/no-explicit-any": "off", |
| 38 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 39 | + "@typescript-eslint/no-namespace": "off", |
| 40 | + "@typescript-eslint/interface-name-prefix": "off", |
| 41 | + "@typescript-eslint/explicit-function-return-type": "off", |
| 42 | + "@typescript-eslint/ban-ts-comment": ["warn", { "ts-ignore": true }], |
| 43 | + "@typescript-eslint/ban-types": "warn", |
| 44 | + "@typescript-eslint/no-non-null-asserted-optional-chain": "warn", |
| 45 | + "@typescript-eslint/no-var-requires": "off", |
| 46 | + "@typescript-eslint/no-empty-interface": "off", |
| 47 | + "@typescript-eslint/triple-slash-reference": "warn", |
| 48 | + "@typescript-eslint/no-inferrable-types": "off", |
| 49 | + "no-inner-declarations": "off", |
| 50 | + "no-prototype-builtins": "off", |
| 51 | + "no-control-regex": "warn", |
| 52 | + "no-undef": "warn", |
| 53 | + "no-case-declarations": "warn", |
| 54 | + "no-useless-escape": "off", |
| 55 | + "prefer-const": "off", |
| 56 | + "react/prop-types": "warn", |
| 57 | + }, |
| 58 | + settings: { |
| 59 | + react: { |
| 60 | + version: "detect", |
| 61 | + }, |
| 62 | + }, |
| 63 | +}; |
0 commit comments