|
1 | 1 | const base = require('./base');
|
2 | 2 | const gtsRules = require('../recommended-rules-gts');
|
3 | 3 |
|
4 |
| -module.exports = [...base, { rules: gtsRules }]; |
| 4 | +// see https://github.com/typescript-eslint/typescript-eslint/issues/8607 |
| 5 | +// https://github.com/typescript-eslint/typescript-eslint/blob/v7.4.0/packages/eslint-plugin/src/configs/eslint-recommended-raw.ts |
| 6 | +const tsRecommended = { |
| 7 | + 'constructor-super': 'off', // ts(2335) & ts(2377) |
| 8 | + 'getter-return': 'off', // ts(2378) |
| 9 | + 'no-const-assign': 'off', // ts(2588) |
| 10 | + 'no-dupe-args': 'off', // ts(2300) |
| 11 | + 'no-dupe-class-members': 'off', // ts(2393) & ts(2300) |
| 12 | + 'no-dupe-keys': 'off', // ts(1117) |
| 13 | + 'no-func-assign': 'off', // ts(2630) |
| 14 | + 'no-import-assign': 'off', // ts(2632) & ts(2540) |
| 15 | + 'no-new-symbol': 'off', // ts(7009) |
| 16 | + 'no-obj-calls': 'off', // ts(2349) |
| 17 | + 'no-redeclare': 'off', // ts(2451) |
| 18 | + 'no-setter-return': 'off', // ts(2408) |
| 19 | + 'no-this-before-super': 'off', // ts(2376) & ts(17009) |
| 20 | + 'no-undef': 'off', // ts(2304) & ts(2552) |
| 21 | + 'no-unreachable': 'off', // ts(7027) |
| 22 | + 'no-unsafe-negation': 'off', // ts(2365) & ts(2322) & ts(2358) |
| 23 | + 'no-var': 'error', // ts transpiles let/const to var, so no need for vars any more |
| 24 | + 'prefer-const': 'error', // ts provides better types with const |
| 25 | + 'prefer-rest-params': 'error', // ts provides better types with rest args over arguments |
| 26 | + 'prefer-spread': 'error', // ts transpiles spread to apply, so no need for manual apply |
| 27 | +}; |
| 28 | + |
| 29 | +module.exports = [...base, { rules: { ...gtsRules, ...tsRecommended } }]; |
0 commit comments