@@ -14,59 +14,78 @@ export default defineConfig([
1414 globalIgnores ( [
1515 'node_modules/**' ,
1616 'contributor_docs/**' ,
17- 'lib/**'
17+ 'lib/**' ,
18+ 'src/core/reference.js' ,
19+ 'src/type/lib/Typr.js' , // wat?
20+ 'utils/sample-linter.mjs'
1821 ] ) ,
1922 {
2023 name : 'eslint recommended' ,
2124 ...js . configs . recommended
2225 } ,
2326 {
2427 name : 'common rules' ,
25- ignores : [
26- 'src/core/reference.js'
27- ] ,
2828 plugins : {
2929 '@stylistic' : stylistic
3030 } ,
31- languageOptions : {
32- ecmaVersion : 2022
31+ linterOptions : {
32+ reportUnusedDisableDirectives : false
3333 } ,
3434 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+ // ],
5051 '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
5871 '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']
6482 }
6583 } ,
6684 {
6785 name : 'p5 source files' ,
6886 files : [ 'src/**/*.js' ] ,
6987 languageOptions : {
88+ ecmaVersion : 2022 ,
7089 globals : {
7190 ...globals . browser ,
7291 ...globals . es2022
@@ -82,6 +101,7 @@ export default defineConfig([
82101 'vitest.workspace.mjs'
83102 ] ,
84103 languageOptions : {
104+ ecmaVersion : 'latest' ,
85105 globals : {
86106 ...globals . nodeBuiltin
87107 }
0 commit comments