|
| 1 | +{ |
| 2 | + "root": true, |
| 3 | + "env": { |
| 4 | + "es6": true, |
| 5 | + "node": true |
| 6 | + }, |
| 7 | + "extends": [ |
| 8 | + "eslint:recommended", |
| 9 | + "plugin:import/typescript", |
| 10 | + "plugin:@typescript-eslint/recommended", |
| 11 | + "plugin:@typescript-eslint/recommended-requiring-type-checking", |
| 12 | + "prettier" |
| 13 | + ], |
| 14 | + "parser": "@typescript-eslint/parser", |
| 15 | + "parserOptions": { |
| 16 | + "project": "tsconfig.json", |
| 17 | + "sourceType": "module" |
| 18 | + }, |
| 19 | + "plugins": ["eslint-plugin-import", "header", "@typescript-eslint"], |
| 20 | + "rules": { |
| 21 | + "@typescript-eslint/consistent-type-assertions": "error", |
| 22 | + "@typescript-eslint/no-explicit-any": "error", |
| 23 | + "@typescript-eslint/no-non-null-assertion": "error", |
| 24 | + "@typescript-eslint/no-unnecessary-qualifier": "error", |
| 25 | + "@typescript-eslint/no-unused-expressions": "error", |
| 26 | + "curly": "error", |
| 27 | + "header/header": ["error", "block", [{ "pattern": "Copyright Google LLC" }]], |
| 28 | + "import/first": "error", |
| 29 | + "import/newline-after-import": "error", |
| 30 | + "import/no-absolute-path": "error", |
| 31 | + "import/no-duplicates": "error", |
| 32 | + "import/no-extraneous-dependencies": ["error", { "devDependencies": false }], |
| 33 | + "import/no-unassigned-import": ["error", { "allow": ["symbol-observable"] }], |
| 34 | + "import/order": [ |
| 35 | + "error", |
| 36 | + { |
| 37 | + "alphabetize": { "order": "asc" }, |
| 38 | + "groups": [["builtin", "external"], "parent", "sibling", "index"] |
| 39 | + } |
| 40 | + ], |
| 41 | + "max-len": [ |
| 42 | + "error", |
| 43 | + { |
| 44 | + "code": 140, |
| 45 | + "ignoreUrls": true |
| 46 | + } |
| 47 | + ], |
| 48 | + "max-lines-per-function": ["error", { "max": 200 }], |
| 49 | + "no-caller": "error", |
| 50 | + "no-console": "error", |
| 51 | + "no-empty": ["error", { "allowEmptyCatch": true }], |
| 52 | + "no-eval": "error", |
| 53 | + "no-multiple-empty-lines": ["error"], |
| 54 | + "no-throw-literal": "error", |
| 55 | + "padding-line-between-statements": [ |
| 56 | + "error", |
| 57 | + { |
| 58 | + "blankLine": "always", |
| 59 | + "prev": "*", |
| 60 | + "next": "return" |
| 61 | + } |
| 62 | + ], |
| 63 | + "sort-imports": ["error", { "ignoreDeclarationSort": true }], |
| 64 | + "spaced-comment": [ |
| 65 | + "error", |
| 66 | + "always", |
| 67 | + { |
| 68 | + "markers": ["/"] |
| 69 | + } |
| 70 | + ], |
| 71 | + |
| 72 | + /* TODO: evaluate usage of these rules and fix issues as needed */ |
| 73 | + "no-case-declarations": "off", |
| 74 | + "no-fallthrough": "off", |
| 75 | + "no-underscore-dangle": "off", |
| 76 | + "no-useless-escape": "off", |
| 77 | + "@typescript-eslint/await-thenable": "off", |
| 78 | + "@typescript-eslint/ban-types": "off", |
| 79 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 80 | + "@typescript-eslint/no-var-requires": "off", |
| 81 | + "@typescript-eslint/no-unsafe-assignment": "off", |
| 82 | + "@typescript-eslint/no-unsafe-call": "off", |
| 83 | + "@typescript-eslint/no-unsafe-member-access": "off", |
| 84 | + "@typescript-eslint/no-unsafe-return": "off", |
| 85 | + "@typescript-eslint/prefer-regexp-exec": "off", |
| 86 | + "@typescript-eslint/require-await": "off", |
| 87 | + "@typescript-eslint/restrict-plus-operands": "off", |
| 88 | + "@typescript-eslint/restrict-template-expressions": "off" |
| 89 | + }, |
| 90 | + "overrides": [ |
| 91 | + { |
| 92 | + "files": ["!packages/**", "**/*_spec.ts"], |
| 93 | + "rules": { |
| 94 | + "import/no-extraneous-dependencies": ["error", { "devDependencies": true }], |
| 95 | + "max-lines-per-function": "off", |
| 96 | + "no-console": "off" |
| 97 | + } |
| 98 | + } |
| 99 | + ] |
| 100 | +} |
0 commit comments