22
33module . exports = {
44 root : true ,
5- env : {
6- // @TODO : Can be removed, ES versions are cumulative:
7- // https://stackoverflow.com/a/61688878
8- // es6: true,
9- // This seems to be what Node.js 18, 20 fully supports, but online documentation
10- // isn't exactly crystal clear about what should be put here
11- es2022 : true ,
12- browser : true ,
13- node : true ,
14- } ,
5+ env : { es2022 : true , browser : true , node : true } ,
156 // Standard linting for pure javascript files
16- parserOptions : {
17- // @TODO : Can be removed, as env ES version sets this too:
18- // https://eslint.org/docs/latest/use/configure/language-options#specifying-environments
19- // ecmaVersion: 2019,
20- // @TODO : Remove because in JS files we use commonjs
21- // sourceType: 'module',
22- } ,
23- // prettier must always be put last, so it overrides anything before it
247 extends : [
258 'eslint:recommended' ,
26- // Disables all style rules
9+ // Disables all style rules (must always be put last, so it overrides anything before it)
2710 // https://prettier.io/docs/en/integrating-with-linters.html
2811 // https://github.com/prettier/eslint-config-prettier
2912 'prettier' ,
3013 ] ,
31- rules : {
32- // @TODO : Remove this rule, as it's a style rule covered by prettier and
33- // it's deprecated https://eslint.org/docs/latest/rules/comma-dangle
34- // 'comma-dangle': 'off',
35- } ,
3614 overrides : [
3715 // TypeScript linting for TypeScript files
3816 {
3917 files : '*.ts' ,
4018 plugins : [
4119 '@typescript-eslint' ,
42- // TSDoc is only meant for TS files https://tsdoc.org/
20+ // https://tsdoc.org/
4321 'eslint-plugin-tsdoc' ,
4422 ] ,
4523 parser : '@typescript-eslint/parser' ,
4624 parserOptions : { project : 'tsconfig.eslint.json' } ,
47- // prettier must always be put last, so it overrides anything before it
4825 extends : [
4926 'plugin:@typescript-eslint/recommended-type-checked' ,
5027 'prettier' ,
5128 ] ,
5229 rules : {
53- // @TODO : Remove as it doesn't seem to cause issues anymore with fn overloads
54- // 'no-dupe-class-members': 'off', // Off due to conflict with typescript overload functions
5530 'tsdoc/syntax' : 'error' ,
56- // new TS rules begin @TODO : Remove these and adapt code
31+ // @TODO : Remove the ones between "~~", adapt code
32+ // ~~
5733 '@typescript-eslint/prefer-as-const' : 'off' ,
5834 '@typescript-eslint/ban-ts-comment' : 'off' ,
5935 '@typescript-eslint/no-unsafe-call' : 'off' ,
@@ -62,40 +38,17 @@ module.exports = {
6238 '@typescript-eslint/no-unsafe-assignment' : 'off' ,
6339 '@typescript-eslint/no-unsafe-argument' : 'off' ,
6440 '@typescript-eslint/no-floating-promises' : 'off' ,
65- // new TS rules end
41+ // ~~
6642 '@typescript-eslint/array-type' : [ 'warn' , { default : 'array-simple' } ] ,
67- // @TODO : Remove, as it's already off
68- // '@typescript-eslint/return-await': 'off',
69- // @TODO : Remove this rule, deprecated:
70- // https://typescript-eslint.io/rules/space-before-function-paren/
71- // '@typescript-eslint/space-before-function-paren': 0,
7243 // @TODO : Should be careful with this rule, should leave it be and disable
7344 // it within files where necessary with explanations
7445 '@typescript-eslint/no-explicit-any' : 'off' ,
75- // @TODO : Remove, as it's already off
76- // '@typescript-eslint/explicit-function-return-type': 'off',
77- // @TODO : Remove, as it's already off
78- // '@typescript-eslint/no-throw-literal': 'off',
7946 '@typescript-eslint/no-unused-vars' : [
8047 'error' ,
8148 // argsIgnorePattern: https://eslint.org/docs/latest/rules/no-unused-vars#argsignorepattern
8249 // varsIgnorePattern: https://eslint.org/docs/latest/rules/no-unused-vars#varsignorepattern
8350 { args : 'all' , argsIgnorePattern : '^_' , varsIgnorePattern : '^_' } ,
8451 ] ,
85- // @TODO : Remove this rule, as it's a style rule covered by prettier
86- // '@typescript-eslint/member-delimiter-style': [
87- // 'error',
88- // {
89- // multiline: {
90- // delimiter: 'none', // 'none' or 'semi' or 'comma'
91- // requireLast: true,
92- // },
93- // singleline: {
94- // delimiter: 'semi', // 'semi' or 'comma'
95- // requireLast: false,
96- // },
97- // },
98- // ],
9952 // @TODO : Not recommended to disable rule, should instead disable locally
10053 // with explanation
10154 '@typescript-eslint/ban-ts-ignore' : 'off' ,
@@ -112,9 +65,8 @@ module.exports = {
11265 jest : true ,
11366 'jest/globals' : true ,
11467 } ,
115- // prettier must always be put last, so it overrides anything before it
11668 extends : [ 'plugin:jest/recommended' , 'prettier' ] ,
117- // @TODO : Remove these rules and adapt code!
69+ // @TODO : Remove all of these rules and adapt code!
11870 rules : {
11971 'jest/no-disabled-tests' : 'off' ,
12072 'jest/expect-expect' : 'off' ,
0 commit comments