Skip to content

Commit d6dce8a

Browse files
committed
fix(deps): update eslint-config-scratch to v12, fix errors
1 parent 0625bc1 commit d6dce8a

File tree

10 files changed

+3101
-105
lines changed

10 files changed

+3101
-105
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
import {eslintConfigScratch} from 'eslint-config-scratch';
2+
import {globalIgnores} from 'eslint/config';
3+
import globals from 'globals';
4+
5+
export default eslintConfigScratch.defineConfig(
6+
eslintConfigScratch.legacy.base,
7+
{
8+
files: [
9+
'*.{js,cjs,mjs,ts}', // for example, webpack.config.js
10+
'scripts/**/*.{js,cjs,mjs,ts}'
11+
],
12+
extends: [eslintConfigScratch.legacy.node],
13+
languageOptions: {
14+
globals: globals.node
15+
},
16+
rules: {
17+
'no-console': 'off'
18+
}
19+
},
20+
{
21+
files: ['{src,test}/**/*.{js,cjs,mjs,jsx,ts,tsx}'],
22+
extends: [
23+
eslintConfigScratch.legacy.es6,
24+
eslintConfigScratch.legacy.react
25+
],
26+
languageOptions: {
27+
globals: globals.browser
28+
},
29+
rules: {
30+
// BEGIN: these caused trouble after upgrading eslint-plugin-react from 7.24.0 to 7.33.2
31+
'react/forbid-prop-types': 'warn',
32+
'react/no-unknown-property': 'warn',
33+
// END: these caused trouble after upgrading eslint-plugin-react from 7.24.0 to 7.33.2
34+
35+
// we should probably just fix these...
36+
'react/no-deprecated': 'warn'
37+
},
38+
settings: {
39+
react: {
40+
version: 'detect'
41+
}
42+
}
43+
},
44+
{
45+
files: ['test/**/*.{js,cjs,mjs,jsx,ts,tsx}'],
46+
extends: [
47+
eslintConfigScratch.legacy.es6
48+
],
49+
languageOptions: {
50+
globals: {
51+
...globals.jest,
52+
...globals.node
53+
}
54+
}
55+
},
56+
globalIgnores([
57+
'dist/**',
58+
'node_modules/**',
59+
'playground/**'
60+
])
61+
);

0 commit comments

Comments
 (0)