|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "browser": true, |
| 4 | + "commonjs": true, |
| 5 | + "es2021": true, |
| 6 | + "node": true, |
| 7 | + "jest": true |
| 8 | + }, |
| 9 | + "parser": "@typescript-eslint/parser", |
| 10 | + "extends": [ |
| 11 | + "eslint:recommended", |
| 12 | + "plugin:@typescript-eslint/recommended", |
| 13 | + "plugin:prettier/recommended" |
| 14 | + ], |
| 15 | + "plugins": [ |
| 16 | + "import" |
| 17 | + ], |
| 18 | + "parserOptions": { |
| 19 | + "project": "tsconfig.json", |
| 20 | + "sourceType": "module" |
| 21 | + }, |
| 22 | + "rules": { |
| 23 | + "linebreak-style": ["error", "unix"], |
| 24 | + "no-empty": 1, |
| 25 | + "no-useless-catch": 1, |
| 26 | + "no-prototype-builtins": 1, |
| 27 | + "no-constant-condition": 0, |
| 28 | + "no-useless-escape": 0, |
| 29 | + "no-console": "error", |
| 30 | + "no-restricted-globals": [ |
| 31 | + "error", |
| 32 | + { |
| 33 | + "name": "global", |
| 34 | + "message": "Use `globalThis` instead" |
| 35 | + }, |
| 36 | + { |
| 37 | + "name": "window", |
| 38 | + "message": "Use `globalThis` instead" |
| 39 | + } |
| 40 | + ], |
| 41 | + "require-yield": 0, |
| 42 | + "eqeqeq": ["error", "smart"], |
| 43 | + "spaced-comment": [ |
| 44 | + "warn", |
| 45 | + "always", |
| 46 | + { |
| 47 | + "line": { |
| 48 | + "exceptions": ["-"] |
| 49 | + }, |
| 50 | + "block": { |
| 51 | + "exceptions": ["*"] |
| 52 | + }, |
| 53 | + "markers": ["/"] |
| 54 | + } |
| 55 | + ], |
| 56 | + "capitalized-comments": [ |
| 57 | + "warn", |
| 58 | + "always", |
| 59 | + { |
| 60 | + "ignoreInlineComments": true, |
| 61 | + "ignoreConsecutiveComments": true |
| 62 | + } |
| 63 | + ], |
| 64 | + "curly": [ |
| 65 | + "error", |
| 66 | + "multi-line", |
| 67 | + "consistent" |
| 68 | + ], |
| 69 | + "import/order": [ |
| 70 | + "error", |
| 71 | + { |
| 72 | + "groups": [ |
| 73 | + "type", |
| 74 | + "builtin", |
| 75 | + "external", |
| 76 | + "internal", |
| 77 | + "index", |
| 78 | + "sibling", |
| 79 | + "parent", |
| 80 | + "object" |
| 81 | + ], |
| 82 | + "pathGroups": [ |
| 83 | + { |
| 84 | + "pattern": "@", |
| 85 | + "group": "internal" |
| 86 | + }, |
| 87 | + { |
| 88 | + "pattern": "@/**", |
| 89 | + "group": "internal" |
| 90 | + } |
| 91 | + ], |
| 92 | + "pathGroupsExcludedImportTypes": [ |
| 93 | + "type" |
| 94 | + ], |
| 95 | + "newlines-between": "never" |
| 96 | + } |
| 97 | + ], |
| 98 | + "@typescript-eslint/no-namespace": 0, |
| 99 | + "@typescript-eslint/no-explicit-any": 0, |
| 100 | + "@typescript-eslint/explicit-module-boundary-types": 0, |
| 101 | + "@typescript-eslint/no-unused-vars": [ |
| 102 | + "warn", |
| 103 | + { |
| 104 | + "varsIgnorePattern": "^_", |
| 105 | + "argsIgnorePattern": "^_" |
| 106 | + } |
| 107 | + ], |
| 108 | + "@typescript-eslint/no-inferrable-types": 0, |
| 109 | + "@typescript-eslint/no-non-null-assertion": 0, |
| 110 | + "@typescript-eslint/no-this-alias": 0, |
| 111 | + "@typescript-eslint/no-var-requires": 0, |
| 112 | + "@typescript-eslint/no-empty-function": 0, |
| 113 | + "@typescript-eslint/no-empty-interface": 0, |
| 114 | + "@typescript-eslint/consistent-type-imports": ["error"], |
| 115 | + "@typescript-eslint/consistent-type-exports": ["error"], |
| 116 | + "no-throw-literal": "off", |
| 117 | + "@typescript-eslint/no-throw-literal": "off", |
| 118 | + "@typescript-eslint/no-floating-promises": ["error", { |
| 119 | + "ignoreVoid": true, |
| 120 | + "ignoreIIFE": true |
| 121 | + }], |
| 122 | + "@typescript-eslint/no-misused-promises": ["error", { |
| 123 | + "checksVoidReturn": false |
| 124 | + }], |
| 125 | + "@typescript-eslint/await-thenable": ["error"], |
| 126 | + "@typescript-eslint/naming-convention": [ |
| 127 | + "error", |
| 128 | + { |
| 129 | + "selector": "default", |
| 130 | + "format": ["camelCase"], |
| 131 | + "leadingUnderscore": "allow", |
| 132 | + "trailingUnderscore": "allowSingleOrDouble" |
| 133 | + }, |
| 134 | + { |
| 135 | + "selector": "function", |
| 136 | + "format": ["camelCase", "PascalCase"], |
| 137 | + "leadingUnderscore": "allow", |
| 138 | + "trailingUnderscore": "allowSingleOrDouble" |
| 139 | + }, |
| 140 | + { |
| 141 | + "selector": "variable", |
| 142 | + "format": ["camelCase", "UPPER_CASE", "PascalCase"], |
| 143 | + "leadingUnderscore": "allow", |
| 144 | + "trailingUnderscore": "allowSingleOrDouble" |
| 145 | + }, |
| 146 | + { |
| 147 | + "selector": "parameter", |
| 148 | + "format": ["camelCase"], |
| 149 | + "leadingUnderscore": "allow", |
| 150 | + "trailingUnderscore": "allowSingleOrDouble" |
| 151 | + }, |
| 152 | + { |
| 153 | + "selector": "typeLike", |
| 154 | + "format": ["PascalCase"], |
| 155 | + "trailingUnderscore": "allowSingleOrDouble" |
| 156 | + }, |
| 157 | + { |
| 158 | + "selector": "enumMember", |
| 159 | + "format": ["PascalCase", "UPPER_CASE"] |
| 160 | + }, |
| 161 | + { |
| 162 | + "selector": "objectLiteralProperty", |
| 163 | + "format": null |
| 164 | + }, |
| 165 | + { |
| 166 | + "selector": "typeProperty", |
| 167 | + "format": null |
| 168 | + } |
| 169 | + ], |
| 170 | + "@typescript-eslint/ban-ts-comment": [ |
| 171 | + "error", |
| 172 | + { |
| 173 | + "ts-ignore": "allow-with-description" |
| 174 | + } |
| 175 | + ] |
| 176 | + } |
| 177 | +} |
0 commit comments