Skip to content

Commit f15d8c1

Browse files
Update dependency eslint to v9 (#1291)
1 parent f2f97cf commit f15d8c1

File tree

7 files changed

+1247
-1350
lines changed

7 files changed

+1247
-1350
lines changed

.eslintrc

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

bin/copy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const {
1212

1313
const mkdir = dir => {
1414
try {
15-
mkdirSync(dir, 0755);
15+
mkdirSync(dir, 0o755);
1616
} catch (e) {
1717
if (e.code !== 'EEXIST') {
1818
throw e;

eslint.config.mjs

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import globals from 'globals';
2+
3+
import compat from 'eslint-plugin-compat';
4+
import prettier from 'eslint-config-prettier';
5+
import tsEsLint from '@typescript-eslint/eslint-plugin';
6+
import tsParser from '@typescript-eslint/parser';
7+
8+
export default [
9+
{
10+
files: ['./assets/scripts/**/*.ts'],
11+
languageOptions: {
12+
globals: {
13+
...globals.browser,
14+
...globals.node
15+
},
16+
parser: tsParser,
17+
parserOptions: {
18+
project: 'tsconfig.json',
19+
sourceType: 'module'
20+
}
21+
},
22+
plugins: {
23+
compat,
24+
prettier,
25+
tsEsLint
26+
},
27+
ignores: ['webpack.config.js'],
28+
rules: {
29+
'no-console': 'error'
30+
},
31+
settings: {
32+
react: {
33+
version: 'detect'
34+
}
35+
}
36+
}
37+
];

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"rm-html": "rm index.html",
3535
"pwa": "create-pwa --icon=\"./assets/images/favicon/icon.png\" --launch=\"./assets/images/favicon/launch.png\"",
3636
"prod": "yarn build && yarn html && yarn critical && yarn rm-html",
37-
"lint:ts": "eslint 'assets/scripts/**/*.ts'",
37+
"lint:ts": "eslint",
3838
"lint:scss": "stylelint assets/styles/**/*.scss",
3939
"lint": "yarn lint:ts && yarn lint:scss"
4040
},
@@ -54,7 +54,7 @@
5454
"critical": "7.1.1",
5555
"css-loader": "7.1.1",
5656
"cssnano": "6.1.2",
57-
"eslint": "8.57.0",
57+
"eslint": "9.0.0",
5858
"eslint-config-prettier": "9.1.0",
5959
"eslint-config-recommended": "4.1.0",
6060
"eslint-plugin-compat": "4.2.0",
@@ -86,12 +86,6 @@
8686
"webpack-shell-plugin-next": "2.3.1",
8787
"webpack-spritesmith": "1.1.0"
8888
},
89-
"resolutions": {
90-
"got": "^11.8.5",
91-
"http-cache-semantics": "^4.1.1",
92-
"semver-regex": "^4.0.0",
93-
"ua-parser-js": "^1.0.33"
94-
},
9589
"bin": {
9690
"wmpats": "./bin/cli.js"
9791
},

svgo.config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-nocheck
2-
31
const { extendDefaultPlugins } = require('svgo');
42

53
module.exports = {

webpack.config.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-nocheck
2-
31
const { exec } = require('child_process');
42
const { parse } = require('url');
53
const { resolve } = require('path');
@@ -17,7 +15,6 @@ const browserSyncConfig = server => ({
1715
host: 'localhost',
1816
port: 3000,
1917
open: 'external',
20-
/* eslint-disable no-mixed-spaces-and-tabs */
2118
files: [
2219
server
2320
? {
@@ -33,7 +30,6 @@ const browserSyncConfig = server => ({
3330
'./assets/dist/app.css',
3431
'./assets/dist/app.js'
3532
],
36-
/* eslint-enable */
3733
ghostMode: {
3834
clicks: false,
3935
scroll: true,

0 commit comments

Comments
 (0)