|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "es2021": true, |
| 5 | + "node": true, |
| 6 | + "browser": false |
| 7 | + }, |
| 8 | + "extends": [ |
| 9 | + "eslint:recommended", |
| 10 | + /** @see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin#recommended-configs */ |
| 11 | + "plugin:@typescript-eslint/recommended", |
| 12 | + "plugin:import/recommended", |
| 13 | + "plugin:import/typescript", |
| 14 | + "plugin:etc/recommended", |
| 15 | + "plugin:sonarjs/recommended" |
| 16 | + ], |
| 17 | + "parser": "@typescript-eslint/parser", |
| 18 | + "parserOptions": { |
| 19 | + "ecmaVersion": 12, |
| 20 | + "sourceType": "module", |
| 21 | + "project": [ |
| 22 | + "./tsconfig.json" |
| 23 | + ] |
| 24 | + }, |
| 25 | + "settings": { |
| 26 | + "import/resolver": { |
| 27 | + "typescript": true, |
| 28 | + "node": true, |
| 29 | + "eslint-import-resolver-custom-alias": { |
| 30 | + "alias": { |
| 31 | + "/@": "./src", |
| 32 | + "/@gen": "./src-generated" |
| 33 | + }, |
| 34 | + "extensions": [".ts"], |
| 35 | + "packages": ["packages/*", "extensions/*"] |
| 36 | + } |
| 37 | + } |
| 38 | + }, |
| 39 | + "plugins": ["@typescript-eslint", "sonarjs", "etc", "redundant-undefined"], |
| 40 | + "ignorePatterns": [ |
| 41 | + "node_modules/**", |
| 42 | + "**/dist/**" |
| 43 | + ], |
| 44 | + "rules": { |
| 45 | + "@typescript-eslint/no-unused-vars": "error", |
| 46 | + "@typescript-eslint/no-var-requires": "off", |
| 47 | + "@typescript-eslint/consistent-type-imports": "error", |
| 48 | + "@typescript-eslint/no-explicit-any": "error", |
| 49 | + "prefer-promise-reject-errors": "error", |
| 50 | + "@typescript-eslint/await-thenable": "error", |
| 51 | + "@typescript-eslint/no-floating-promises": "error", |
| 52 | + "@typescript-eslint/no-misused-promises": "error", |
| 53 | + "@typescript-eslint/prefer-optional-chain": "error", |
| 54 | + |
| 55 | + /** |
| 56 | + * Having a semicolon helps the optimizer interpret your code correctly. |
| 57 | + * This avoids rare errors in optimized code. |
| 58 | + * @see https://twitter.com/alex_kozack/status/1364210394328408066 |
| 59 | + */ |
| 60 | + "semi": [ |
| 61 | + "error", |
| 62 | + "always" |
| 63 | + ], |
| 64 | + /** |
| 65 | + * This will make the history of changes in the hit a little cleaner |
| 66 | + */ |
| 67 | + "comma-dangle": [ |
| 68 | + "warn", |
| 69 | + "always-multiline" |
| 70 | + ], |
| 71 | + /** |
| 72 | + * Just for beauty |
| 73 | + */ |
| 74 | + "quotes": [ |
| 75 | + "warn", "single" |
| 76 | + ], |
| 77 | + "import/no-duplicates" : "error", |
| 78 | + "import/no-unresolved": "off", |
| 79 | + "import/default": "off", |
| 80 | + "import/no-named-as-default-member": "off", |
| 81 | + "import/no-named-as-default": "off", |
| 82 | + "sonarjs/cognitive-complexity": "off", |
| 83 | + "sonarjs/no-duplicate-string": "off", |
| 84 | + "sonarjs/no-empty-collection": "off", |
| 85 | + "sonarjs/no-small-switch": "off", |
| 86 | + "etc/no-commented-out-code": "error", |
| 87 | + "etc/no-deprecated": "off", |
| 88 | + "redundant-undefined/redundant-undefined": "error" |
| 89 | + } |
| 90 | +} |
0 commit comments