|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "es2021": true, |
| 4 | + "browser": true |
| 5 | + }, |
| 6 | + "extends": [ |
| 7 | + "eslint:recommended", |
| 8 | + "plugin:import/recommended", |
| 9 | + "plugin:import/typescript", |
| 10 | + "plugin:wc/best-practice", |
| 11 | + "plugin:lit/recommended", |
| 12 | + "plugin:lit-a11y/recommended", |
| 13 | + "prettier" |
| 14 | + ], |
| 15 | + "parser": "@typescript-eslint/parser", |
| 16 | + "parserOptions": { |
| 17 | + "sourceType": "module" |
| 18 | + }, |
| 19 | + "plugins": ["anti-trojan-source", "@typescript-eslint", "wc", "lit", "lit-a11y", "import"], |
| 20 | + "reportUnusedDisableDirectives": true, |
| 21 | + "root": true, |
| 22 | + "overrides": [ |
| 23 | + { |
| 24 | + "files": ["*.ts"], |
| 25 | + "parserOptions": { |
| 26 | + "sourceType": "module", |
| 27 | + "project": "./tsconfig.json" |
| 28 | + }, |
| 29 | + "extends": [ |
| 30 | + "plugin:@typescript-eslint/recommended", |
| 31 | + "plugin:@typescript-eslint/recommended-requiring-type-checking" |
| 32 | + ] |
| 33 | + } |
| 34 | + ], |
| 35 | + "rules": { |
| 36 | + "anti-trojan-source/no-bidi": "error", |
| 37 | + "no-template-curly-in-string": "error", |
| 38 | + "array-callback-return": "error", |
| 39 | + "comma-dangle": "off", |
| 40 | + "consistent-return": "error", |
| 41 | + "curly": "off", |
| 42 | + "default-param-last": "error", |
| 43 | + "eqeqeq": "error", |
| 44 | + "lit-a11y/click-events-have-key-events": "off", |
| 45 | + "no-constructor-return": "error", |
| 46 | + "no-empty-function": "warn", |
| 47 | + "no-eval": "error", |
| 48 | + "no-extend-native": "error", |
| 49 | + "no-extra-bind": "error", |
| 50 | + "no-floating-decimal": "error", |
| 51 | + "no-implicit-coercion": "off", |
| 52 | + "no-implicit-globals": "error", |
| 53 | + "no-implied-eval": "error", |
| 54 | + "no-invalid-this": "error", |
| 55 | + "no-labels": "error", |
| 56 | + "no-lone-blocks": "error", |
| 57 | + "no-new": "error", |
| 58 | + "no-new-func": "error", |
| 59 | + "no-new-wrappers": "error", |
| 60 | + "no-octal-escape": "error", |
| 61 | + "no-proto": "error", |
| 62 | + "no-return-assign": "warn", |
| 63 | + "no-script-url": "error", |
| 64 | + "no-self-compare": "warn", |
| 65 | + "no-sequences": "warn", |
| 66 | + "no-throw-literal": "error", |
| 67 | + "no-unmodified-loop-condition": "error", |
| 68 | + "no-unused-expressions": "warn", |
| 69 | + "no-useless-call": "error", |
| 70 | + "no-useless-concat": "error", |
| 71 | + "no-useless-return": "warn", |
| 72 | + "prefer-promise-reject-errors": "error", |
| 73 | + "radix": "off", |
| 74 | + "require-await": "error", |
| 75 | + "wrap-iife": ["warn", "inside"], |
| 76 | + "no-shadow": "error", |
| 77 | + "no-array-constructor": "error", |
| 78 | + "no-bitwise": "error", |
| 79 | + "no-multi-assign": "warn", |
| 80 | + "no-new-object": "error", |
| 81 | + "no-useless-computed-key": "warn", |
| 82 | + "no-useless-rename": "warn", |
| 83 | + "no-var": "error", |
| 84 | + "prefer-const": "warn", |
| 85 | + "prefer-numeric-literals": "warn", |
| 86 | + "prefer-object-spread": "warn", |
| 87 | + "prefer-rest-params": "warn", |
| 88 | + "prefer-spread": "warn", |
| 89 | + "prefer-template": "off", |
| 90 | + "no-else-return": "off", |
| 91 | + "func-names": ["warn", "never"], |
| 92 | + "one-var": ["warn", "never"], |
| 93 | + "operator-assignment": "warn", |
| 94 | + "prefer-arrow-callback": "warn", |
| 95 | + "no-restricted-imports": [ |
| 96 | + "warn", |
| 97 | + { |
| 98 | + "paths": [ |
| 99 | + { |
| 100 | + "name": ".", |
| 101 | + "message": "Usage of local index imports is not allowed." |
| 102 | + }, |
| 103 | + { |
| 104 | + "name": "./index", |
| 105 | + "message": "Import from the source file instead." |
| 106 | + } |
| 107 | + ] |
| 108 | + } |
| 109 | + ], |
| 110 | + "import/extensions": [ |
| 111 | + "error", |
| 112 | + "always", |
| 113 | + { |
| 114 | + "ignorePackages": true, |
| 115 | + "pattern": { |
| 116 | + "js": "always", |
| 117 | + "ts": "never" |
| 118 | + } |
| 119 | + } |
| 120 | + ], |
| 121 | + "import/order": [ |
| 122 | + "error", |
| 123 | + { |
| 124 | + "groups": ["builtin", "external", "internal", "parent", "sibling", "index"] |
| 125 | + } |
| 126 | + ], |
| 127 | + "import/no-duplicates": "warn", |
| 128 | + "wc/guard-super-call": "off" |
| 129 | + }, |
| 130 | + "settings": { |
| 131 | + "import/resolver": { |
| 132 | + "typescript": { |
| 133 | + "typescript": true, |
| 134 | + "node": true |
| 135 | + } |
| 136 | + } |
| 137 | + } |
| 138 | +} |
0 commit comments