|
| 1 | +module.exports = { |
| 2 | + extends: [ |
| 3 | + "airbnb-base", |
| 4 | + "eslint:recommended", |
| 5 | + "prettier", |
| 6 | + "plugin:@typescript-eslint/recommended", |
| 7 | + ], |
| 8 | + parserOptions: { |
| 9 | + ecmaVersion: 12, |
| 10 | + parser: "@typescript-eslint/parser", |
| 11 | + project: "./tsconfig.json", |
| 12 | + sourceType: "module", |
| 13 | + }, |
| 14 | + plugins: ["@typescript-eslint", "no-instanceof", "eslint-plugin-jest"], |
| 15 | + ignorePatterns: [ |
| 16 | + ".eslintrc.cjs", |
| 17 | + "scripts", |
| 18 | + "node_modules", |
| 19 | + "dist", |
| 20 | + "dist-cjs", |
| 21 | + "*.js", |
| 22 | + "*.cjs", |
| 23 | + "*.d.ts", |
| 24 | + ], |
| 25 | + rules: { |
| 26 | + "no-process-env": 2, |
| 27 | + "no-instanceof/no-instanceof": 2, |
| 28 | + "@typescript-eslint/explicit-module-boundary-types": 0, |
| 29 | + "@typescript-eslint/no-empty-function": 0, |
| 30 | + "@typescript-eslint/no-shadow": 0, |
| 31 | + "@typescript-eslint/no-empty-interface": 0, |
| 32 | + "@typescript-eslint/no-use-before-define": ["error", "nofunc"], |
| 33 | + "@typescript-eslint/no-unused-vars": ["warn", { args: "none" }], |
| 34 | + "@typescript-eslint/no-floating-promises": "error", |
| 35 | + "@typescript-eslint/no-misused-promises": "error", |
| 36 | + camelcase: 0, |
| 37 | + "class-methods-use-this": 0, |
| 38 | + "import/extensions": [2, "ignorePackages"], |
| 39 | + "import/no-extraneous-dependencies": [ |
| 40 | + "error", |
| 41 | + { devDependencies: ["**/*.test.ts"] }, |
| 42 | + ], |
| 43 | + "import/no-unresolved": 0, |
| 44 | + "import/prefer-default-export": 0, |
| 45 | + "keyword-spacing": "error", |
| 46 | + "max-classes-per-file": 0, |
| 47 | + "max-len": 0, |
| 48 | + "no-await-in-loop": 0, |
| 49 | + "no-bitwise": 0, |
| 50 | + "no-console": 0, |
| 51 | + "no-restricted-syntax": 0, |
| 52 | + "no-shadow": 0, |
| 53 | + "no-continue": 0, |
| 54 | + "no-void": 0, |
| 55 | + "no-underscore-dangle": 0, |
| 56 | + "no-use-before-define": 0, |
| 57 | + "no-useless-constructor": 0, |
| 58 | + "no-return-await": 0, |
| 59 | + "consistent-return": 0, |
| 60 | + "no-else-return": 0, |
| 61 | + "func-names": 0, |
| 62 | + "no-lonely-if": 0, |
| 63 | + "prefer-rest-params": 0, |
| 64 | + 'jest/no-focused-tests': 'error', |
| 65 | + "new-cap": ["error", { properties: false, capIsNew: false }], |
| 66 | + }, |
| 67 | + overrides: [ |
| 68 | + { |
| 69 | + files: ['**/*.test.ts'], |
| 70 | + rules: { |
| 71 | + '@typescript-eslint/no-unused-vars': 'off' |
| 72 | + } |
| 73 | + } |
| 74 | + ] |
| 75 | +}; |
0 commit comments