|
| 1 | +const fs = require('fs'); |
| 2 | + |
| 3 | +module.exports = { |
| 4 | + root: true, |
| 5 | + extends: ['airbnb-base', 'prettier', 'plugin:jest/recommended', 'plugin:import/typescript', 'airbnb-typescript/base'], |
| 6 | + plugins: [ |
| 7 | + "@typescript-eslint", |
| 8 | + "prettier", |
| 9 | + "import", |
| 10 | + "prefer-arrow", |
| 11 | + "jest-dom", |
| 12 | + "jest", |
| 13 | + "jest-formatting", |
| 14 | + "no-only-tests"], |
| 15 | + parser: '@typescript-eslint/parser', |
| 16 | + parserOptions: { |
| 17 | + project: './tsconfig.json', |
| 18 | + }, |
| 19 | + env: { |
| 20 | + jest: true, |
| 21 | + node: true, |
| 22 | + }, |
| 23 | + settings: { |
| 24 | + "import/parsers": { |
| 25 | + "@typescript-eslint/parser": [".ts", ".tsx", ".js"] |
| 26 | + }, |
| 27 | + "import/resolver": { |
| 28 | + "typescript": { |
| 29 | + "alwaysTryTypes": true |
| 30 | + } |
| 31 | + } |
| 32 | + }, |
| 33 | + rules: { |
| 34 | + "no-tabs": ["error", { "allowIndentationTabs": true }], |
| 35 | + "@typescript-eslint/indent": ["off"], |
| 36 | + "quotes": [ |
| 37 | + "error", |
| 38 | + "single", |
| 39 | + { "avoidEscape": true, "allowTemplateLiterals": true } |
| 40 | + ], |
| 41 | + "@typescript-eslint/quotes": [ |
| 42 | + "error", |
| 43 | + "single", |
| 44 | + { "avoidEscape": true, "allowTemplateLiterals": true } |
| 45 | + ], |
| 46 | + "semi": ["error", "never"], |
| 47 | + "space-before-blocks": 2, |
| 48 | + "space-before-function-paren": 2, |
| 49 | + "no-multi-spaces": 2, |
| 50 | + "@typescript-eslint/semi": "off", |
| 51 | + "no-unexpected-multiline": "error", |
| 52 | + "@typescript-eslint/comma-dangle": ["off"], |
| 53 | + "comma-dangle": ["off"], |
| 54 | + "no-console": 2, |
| 55 | + "class-methods-use-this": 0, |
| 56 | + "no-only-tests/no-only-tests": 2, |
| 57 | + "no-warning-comments": 2, |
| 58 | + "import/no-unresolved": 2, |
| 59 | + "import/named": 2, |
| 60 | + "import/no-relative-packages": 2, |
| 61 | + "import/no-cycle": 2, |
| 62 | + "import/newline-after-import": 2, |
| 63 | + "import/no-namespace": 2, |
| 64 | + "import/no-duplicates": 2, |
| 65 | + "import/first": 2, |
| 66 | + "import/exports-last": 2, |
| 67 | + "import/no-absolute-path": 2, |
| 68 | + "import/no-dynamic-require": 2, |
| 69 | + "import/no-self-import": 2, |
| 70 | + "import/no-useless-path-segments": 2, |
| 71 | + "import/no-extraneous-dependencies": [ |
| 72 | + 2, |
| 73 | + { |
| 74 | + "devDependencies": [ |
| 75 | + "!./src/**/*" |
| 76 | + ] |
| 77 | + } |
| 78 | + ], |
| 79 | + 'import/extensions': [ |
| 80 | + 'error', |
| 81 | + 'ignorePackages', |
| 82 | + { |
| 83 | + js: 'never', |
| 84 | + jsx: 'never', |
| 85 | + ts: 'never', |
| 86 | + tsx: 'never', |
| 87 | + }, |
| 88 | + ], |
| 89 | + }, |
| 90 | + ignorePatterns: ['.eslintrc.cjs', 'build/*', 'dist/*', 'coverage/*', '**/testutils/*'], |
| 91 | +}; |
0 commit comments