Skip to content

Commit 570879f

Browse files
authored
Merge pull request #520 from scratchfoundation/renovate/major-eslint-monorepo
chore(deps): update dependency eslint to v9
2 parents 69c0c8d + f04789d commit 570879f

24 files changed

+2526
-851
lines changed

.eslintignore

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

.eslintrc.js

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

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16
1+
v20

eslint.config.mjs

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
],
11+
extends: [eslintConfigScratch.legacy.node]
12+
},
13+
{
14+
files: ['src/**/*.{js,cjs,mjs,jsx,ts,tsx}'],
15+
extends: [
16+
eslintConfigScratch.legacy.es6,
17+
eslintConfigScratch.legacy.typescript
18+
],
19+
languageOptions: {
20+
globals: globals.node
21+
},
22+
rules: {
23+
// TODO: Enable these rules after fixing existing violations. This will change the API!
24+
'@typescript-eslint/no-redeclare': 'off', // allow types and values with the same name
25+
'@typescript-eslint/prefer-promise-reject-errors': 'off' // allow rejecting with non-Error values
26+
}
27+
},
28+
{
29+
files: ['test/**/*.{js,cjs,mjs,jsx,ts,tsx}'],
30+
extends: [
31+
eslintConfigScratch.legacy.es6
32+
],
33+
languageOptions: {
34+
globals: {
35+
...globals.jest,
36+
...globals.node
37+
}
38+
},
39+
rules: {
40+
'no-console': 'off'
41+
}
42+
},
43+
globalIgnores([
44+
'dist/**',
45+
'node_modules/**'
46+
])
47+
);

0 commit comments

Comments
 (0)