|
| 1 | +/* |
| 2 | +👋 Hi! This file was autogenerated by tslint-to-eslint-config. |
| 3 | +https://github.com/typescript-eslint/tslint-to-eslint-config |
| 4 | +
|
| 5 | +It represents the closest reasonable ESLint configuration to this |
| 6 | +project's original TSLint configuration. |
| 7 | +
|
| 8 | +We recommend eventually switching this configuration to extend from |
| 9 | +the recommended rulesets in typescript-eslint. |
| 10 | +https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md |
| 11 | +
|
| 12 | +Happy linting! 💖 |
| 13 | +*/ |
| 14 | +module.exports = { |
| 15 | + "env": { |
| 16 | + "browser": true, |
| 17 | + "node": true, |
| 18 | + "mocha": true |
| 19 | + }, |
| 20 | + "extends": [ |
| 21 | + "prettier" |
| 22 | + ], |
| 23 | + "parser": "@typescript-eslint/parser", |
| 24 | + "parserOptions": { |
| 25 | + "project": "tsconfig.json", |
| 26 | + "sourceType": "module" |
| 27 | + }, |
| 28 | + "plugins": [ |
| 29 | + "eslint-plugin-import", |
| 30 | + "eslint-plugin-jsdoc", |
| 31 | + "eslint-plugin-prefer-arrow", |
| 32 | + "@typescript-eslint", |
| 33 | + "@typescript-eslint/tslint" |
| 34 | + ], |
| 35 | + "rules": { |
| 36 | + "@typescript-eslint/adjacent-overload-signatures": "error", |
| 37 | + "@typescript-eslint/array-type": [ |
| 38 | + "error", |
| 39 | + { |
| 40 | + "default": "array" |
| 41 | + } |
| 42 | + ], |
| 43 | + "@typescript-eslint/ban-types": [ |
| 44 | + "error", |
| 45 | + { |
| 46 | + "types": { |
| 47 | + "Object": { |
| 48 | + "message": "Avoid using the `Object` type. Did you mean `object`?" |
| 49 | + }, |
| 50 | + "Function": { |
| 51 | + "message": "Avoid using the `Function` type. Prefer a specific function type, like `() => void`." |
| 52 | + }, |
| 53 | + "Boolean": { |
| 54 | + "message": "Avoid using the `Boolean` type. Did you mean `boolean`?" |
| 55 | + }, |
| 56 | + "Number": { |
| 57 | + "message": "Avoid using the `Number` type. Did you mean `number`?" |
| 58 | + }, |
| 59 | + "String": { |
| 60 | + "message": "Avoid using the `String` type. Did you mean `string`?" |
| 61 | + }, |
| 62 | + "Symbol": { |
| 63 | + "message": "Avoid using the `Symbol` type. Did you mean `symbol`?" |
| 64 | + } |
| 65 | + } |
| 66 | + } |
| 67 | + ], |
| 68 | + "@typescript-eslint/consistent-type-assertions": "error", |
| 69 | + "@typescript-eslint/consistent-type-definitions": "error", |
| 70 | + "@typescript-eslint/dot-notation": "error", |
| 71 | + "@typescript-eslint/explicit-member-accessibility": [ |
| 72 | + "off", |
| 73 | + { |
| 74 | + "accessibility": "explicit" |
| 75 | + } |
| 76 | + ], |
| 77 | + "@typescript-eslint/indent": [ |
| 78 | + "error", |
| 79 | + 2, |
| 80 | + { |
| 81 | + "ObjectExpression": "first", |
| 82 | + "FunctionDeclaration": { |
| 83 | + "parameters": "first" |
| 84 | + }, |
| 85 | + "FunctionExpression": { |
| 86 | + "parameters": "first" |
| 87 | + }, |
| 88 | + "SwitchCase": 1 |
| 89 | + } |
| 90 | + ], |
| 91 | + "@typescript-eslint/member-delimiter-style": [ |
| 92 | + "error", |
| 93 | + { |
| 94 | + "multiline": { |
| 95 | + "delimiter": "semi", |
| 96 | + "requireLast": true |
| 97 | + }, |
| 98 | + "singleline": { |
| 99 | + "delimiter": "semi", |
| 100 | + "requireLast": false |
| 101 | + } |
| 102 | + } |
| 103 | + ], |
| 104 | + "@typescript-eslint/member-ordering": "error", |
| 105 | + "@typescript-eslint/naming-convention": "off", |
| 106 | + "@typescript-eslint/no-empty-function": "error", |
| 107 | + "@typescript-eslint/no-empty-interface": "error", |
| 108 | + "@typescript-eslint/no-explicit-any": "off", |
| 109 | + "@typescript-eslint/no-inferrable-types": "error", |
| 110 | + "@typescript-eslint/no-misused-new": "error", |
| 111 | + "@typescript-eslint/no-namespace": "off", |
| 112 | + "@typescript-eslint/no-parameter-properties": "off", |
| 113 | + "@typescript-eslint/no-shadow": [ |
| 114 | + "error", |
| 115 | + { |
| 116 | + "hoist": "all" |
| 117 | + } |
| 118 | + ], |
| 119 | + "@typescript-eslint/no-this-alias": "error", |
| 120 | + "@typescript-eslint/no-unused-expressions": "off", |
| 121 | + "@typescript-eslint/no-use-before-define": "off", |
| 122 | + "@typescript-eslint/no-var-requires": "error", |
| 123 | + "@typescript-eslint/prefer-for-of": "error", |
| 124 | + "@typescript-eslint/prefer-function-type": "error", |
| 125 | + "@typescript-eslint/prefer-namespace-keyword": "error", |
| 126 | + "@typescript-eslint/quotes": [ |
| 127 | + "error", |
| 128 | + "double" |
| 129 | + ], |
| 130 | + "@typescript-eslint/semi": [ |
| 131 | + "error", |
| 132 | + "always" |
| 133 | + ], |
| 134 | + "@typescript-eslint/triple-slash-reference": [ |
| 135 | + "error", |
| 136 | + { |
| 137 | + "path": "always", |
| 138 | + "types": "prefer-import", |
| 139 | + "lib": "always" |
| 140 | + } |
| 141 | + ], |
| 142 | + "@typescript-eslint/tslint/config": [ |
| 143 | + "error", |
| 144 | + { |
| 145 | + "rules": { |
| 146 | + "array-bracket-spacing": [2, "always"], |
| 147 | + // "block-spacing": "always", |
| 148 | + // "brace-style": "1tbs", |
| 149 | + // "no-duplicate-case": true, |
| 150 | + // "no-empty-character-class": true, |
| 151 | + // "no-ex-assign": true, |
| 152 | + // "no-extra-boolean-cast": true, |
| 153 | + // "no-extra-semi": true, |
| 154 | + // "no-multi-spaces": true, |
| 155 | + // "no-unexpected-multiline": true, |
| 156 | + // "object-curly-spacing": true, |
| 157 | + // "prefer-conditional-expression": true, |
| 158 | + // "valid-typeof": true, |
| 159 | + "whitespace": true |
| 160 | + } |
| 161 | + } |
| 162 | + ], |
| 163 | + "@typescript-eslint/type-annotation-spacing": "error", |
| 164 | + "@typescript-eslint/unified-signatures": "error", |
| 165 | + "arrow-body-style": "error", |
| 166 | + "arrow-parens": [ |
| 167 | + "off", |
| 168 | + "always" |
| 169 | + ], |
| 170 | + "brace-style": [ |
| 171 | + "error", |
| 172 | + "1tbs" |
| 173 | + ], |
| 174 | + "comma-dangle": "error", |
| 175 | + "complexity": "off", |
| 176 | + "constructor-super": "error", |
| 177 | + "curly": "off", |
| 178 | + "eol-last": "error", |
| 179 | + "eqeqeq": [ |
| 180 | + "error", |
| 181 | + "smart" |
| 182 | + ], |
| 183 | + "guard-for-in": "error", |
| 184 | + "id-blacklist": [ |
| 185 | + "error", |
| 186 | + "any", |
| 187 | + "Number", |
| 188 | + "number", |
| 189 | + "String", |
| 190 | + "string", |
| 191 | + "Boolean", |
| 192 | + "boolean", |
| 193 | + "Undefined", |
| 194 | + "undefined" |
| 195 | + ], |
| 196 | + "id-match": "error", |
| 197 | + "import/no-extraneous-dependencies": "off", |
| 198 | + "import/no-internal-modules": "off", |
| 199 | + "import/order": "error", |
| 200 | + "jsdoc/check-alignment": "error", |
| 201 | + "jsdoc/check-indentation": "error", |
| 202 | + "jsdoc/newline-after-description": "off", |
| 203 | + "max-classes-per-file": [ |
| 204 | + "error", |
| 205 | + 1 |
| 206 | + ], |
| 207 | + "max-len": "off", |
| 208 | + "new-parens": "error", |
| 209 | + "no-bitwise": "error", |
| 210 | + "no-caller": "error", |
| 211 | + "no-cond-assign": "error", |
| 212 | + "no-console": "error", |
| 213 | + "no-control-regex": "error", |
| 214 | + "no-debugger": "error", |
| 215 | + "no-duplicate-case": "error", |
| 216 | + "no-duplicate-imports": "error", |
| 217 | + "no-empty": "error", |
| 218 | + "no-eval": "error", |
| 219 | + "no-extra-bind": "error", |
| 220 | + "no-fallthrough": "error", |
| 221 | + "no-invalid-regexp": "error", |
| 222 | + "no-invalid-this": "off", |
| 223 | + "no-irregular-whitespace": "error", |
| 224 | + "no-multiple-empty-lines": "error", |
| 225 | + "no-new-func": "error", |
| 226 | + "no-new-wrappers": "error", |
| 227 | + "no-redeclare": "error", |
| 228 | + "no-regex-spaces": "error", |
| 229 | + "no-return-await": "error", |
| 230 | + "no-sequences": "error", |
| 231 | + "no-sparse-arrays": "error", |
| 232 | + "no-template-curly-in-string": "error", |
| 233 | + "no-throw-literal": "error", |
| 234 | + "no-trailing-spaces": "error", |
| 235 | + "no-undef-init": "error", |
| 236 | + "no-underscore-dangle": "error", |
| 237 | + "no-unsafe-finally": "error", |
| 238 | + "no-unused-labels": "error", |
| 239 | + "no-var": "error", |
| 240 | + "object-shorthand": "error", |
| 241 | + "one-var": [ |
| 242 | + "error", |
| 243 | + "never" |
| 244 | + ], |
| 245 | + "prefer-arrow/prefer-arrow-functions": "error", |
| 246 | + "prefer-const": "error", |
| 247 | + "prefer-object-spread": "error", |
| 248 | + "quote-props": [ |
| 249 | + "error", |
| 250 | + "consistent-as-needed" |
| 251 | + ], |
| 252 | + "radix": "error", |
| 253 | + "space-before-function-paren": [ |
| 254 | + "error", |
| 255 | + { |
| 256 | + "anonymous": "never", |
| 257 | + "asyncArrow": "always", |
| 258 | + "named": "never" |
| 259 | + } |
| 260 | + ], |
| 261 | + "space-in-parens": [ |
| 262 | + "error", |
| 263 | + "never" |
| 264 | + ], |
| 265 | + "spaced-comment": [ |
| 266 | + "error", |
| 267 | + "always", |
| 268 | + { |
| 269 | + "markers": [ |
| 270 | + "/" |
| 271 | + ] |
| 272 | + } |
| 273 | + ], |
| 274 | + "use-isnan": "error", |
| 275 | + "valid-typeof": "off", |
| 276 | + "no-underscore-dangle": ["error", { "allow": ["_id"] }] |
| 277 | + } |
| 278 | +}; |
0 commit comments