@@ -14,59 +14,78 @@ export default defineConfig([
14
14
globalIgnores ( [
15
15
'node_modules/**' ,
16
16
'contributor_docs/**' ,
17
- 'lib/**'
17
+ 'lib/**' ,
18
+ 'src/core/reference.js' ,
19
+ 'src/type/lib/Typr.js' , // wat?
20
+ 'utils/sample-linter.mjs'
18
21
] ) ,
19
22
{
20
23
name : 'eslint recommended' ,
21
24
...js . configs . recommended
22
25
} ,
23
26
{
24
27
name : 'common rules' ,
25
- ignores : [
26
- 'src/core/reference.js'
27
- ] ,
28
28
plugins : {
29
29
'@stylistic' : stylistic
30
30
} ,
31
- languageOptions : {
32
- ecmaVersion : 2022
31
+ linterOptions : {
32
+ reportUnusedDisableDirectives : false
33
33
} ,
34
34
rules : {
35
- '@stylistic/arrow-parens' : [ 'error' , 'as-needed' ] ,
36
- '@stylistic/comma-dangle' : [ 'error' , 'never' ] ,
37
- eqeqeq : [ 'error' , 'smart' ] ,
38
- '@stylistic/indent' : [ 'error' , 2 , { SwitchCase : 1 } ] ,
39
- '@stylistic/linebreak-style' : [ 'error' , 'unix' ] ,
40
- '@stylistic/max-len' : [
41
- 'error' ,
42
- {
43
- code : 80 ,
44
- ignoreComments : true ,
45
- ignoreStrings : true ,
46
- ignoreTemplateLiterals : true ,
47
- ignoreRegExpLiterals : true
48
- }
49
- ] ,
35
+ // '@stylistic/arrow-parens': ['error', 'as-needed'],
36
+ // '@stylistic/comma-dangle': ['error', 'never'],
37
+ // eqeqeq: ['error', 'smart'],
38
+ eqeqeq : 0 ,
39
+ // '@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
40
+ // '@stylistic/linebreak-style': ['error', 'unix'],
41
+ // '@stylistic/max-len': [
42
+ // 'error',
43
+ // {
44
+ // code: 80,
45
+ // ignoreComments: true,
46
+ // ignoreStrings: true,
47
+ // ignoreTemplateLiterals: true,
48
+ // ignoreRegExpLiterals: true
49
+ // }
50
+ // ],
50
51
'new-cap' : 0 ,
51
- 'no-async-promise-executor' : 'off' ,
52
- 'no-caller' : 2 ,
53
- 'no-cond-assign' : [ 2 , 'except-parens' ] ,
54
- 'no-console' : 'off' ,
55
- 'no-empty' : [ 'error' , { allowEmptyCatch : true } ] ,
56
- 'no-prototype-builtins' : 'off' ,
57
- '@stylistic/no-trailing-spaces' : [ 'error' ] ,
52
+ 'no-async-promise-executor' : 0 ,
53
+ // 'no-caller': 2,
54
+ 'no-caller' : 0 ,
55
+ 'no-case-declarations' : 0 , // @eslint recommended
56
+ // 'no-cond-assign': [2, 'except-parens'],
57
+ 'no-cond-assign' : 0 ,
58
+ 'no-console' : 0 ,
59
+ 'no-constant-binary-expression' : 0 , // @eslint recommended
60
+ 'no-constant-condition' : 0 , // @eslint recommended
61
+ 'no-dupe-class-members' : 0 , // @eslint recommended
62
+ 'no-dupe-keys' : 0 , // @eslint recommended
63
+ // 'no-empty': ['error', { allowEmptyCatch: true }],
64
+ 'no-empty' : 0 ,
65
+ 'no-fallthrough' : 0 , // @eslint recommended
66
+ 'no-prototype-builtins' : 0 ,
67
+ 'no-redeclare' : 0 , // @eslint recommended
68
+ 'no-shadow-restricted-names' : 0 , // @eslint recommended
69
+ // '@stylistic/no-trailing-spaces': ['error'],
70
+ 'no-unexpected-multiline' : 0 , // @eslint recommended
58
71
'no-undef' : 0 ,
59
- 'no-unused-vars' : [ 'error' , { args : 'none' } ] ,
60
- 'no-use-before-define' : [ 2 , { functions : false } ] ,
61
- '@stylistic/object-curly-spacing' : [ 'error' , 'always' ] ,
62
- '@stylistic/quotes' : [ 'error' , 'single' , { avoidEscape : true } ] ,
63
- '@stylistic/semi' : [ 'error' , 'always' ]
72
+ 'no-unreachable' : 0 , // @eslint recommended
73
+ 'no-unused-private-class-members' : 0 , // @eslint recommended
74
+ // 'no-unused-vars': ['error', { args: 'none' }],
75
+ 'no-unused-vars' : 0 ,
76
+ // 'no-use-before-define': [2, { functions: false }],
77
+ 'no-use-before-define' : 0 ,
78
+ 'no-useless-escape' : 0 , // @eslint recommended
79
+ // '@stylistic/object-curly-spacing': ['error', 'always'],
80
+ // '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
81
+ // '@stylistic/semi': ['error', 'always']
64
82
}
65
83
} ,
66
84
{
67
85
name : 'p5 source files' ,
68
86
files : [ 'src/**/*.js' ] ,
69
87
languageOptions : {
88
+ ecmaVersion : 2022 ,
70
89
globals : {
71
90
...globals . browser ,
72
91
...globals . es2022
@@ -82,6 +101,7 @@ export default defineConfig([
82
101
'vitest.workspace.mjs'
83
102
] ,
84
103
languageOptions : {
104
+ ecmaVersion : 'latest' ,
85
105
globals : {
86
106
...globals . nodeBuiltin
87
107
}
0 commit comments