Skip to content

Commit bc56937

Browse files
committed
Migrate to ESLint 9
1 parent 0e31db4 commit bc56937

File tree

7 files changed

+1183
-1591
lines changed

7 files changed

+1183
-1591
lines changed

.eslintrc

Lines changed: 0 additions & 12 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: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import globals from 'globals';
2+
3+
import compat from 'eslint-plugin-compat';
4+
5+
export default [
6+
{
7+
files: ['./assets/scripts/**/*.js'],
8+
languageOptions: {
9+
globals: {
10+
...globals.browser,
11+
...globals.node
12+
},
13+
parserOptions: {
14+
ecmaVersion: 2023,
15+
sourceType: 'module'
16+
}
17+
},
18+
plugins: {
19+
compat
20+
},
21+
rules: {
22+
'no-console': 'error'
23+
},
24+
settings: {
25+
react: {
26+
version: 'detect'
27+
}
28+
}
29+
}
30+
];

package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
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",
3737
"lint": "yarn lint:js && yarn lint:scss",
38-
"lint:js": "eslint './assets/scripts/**/*.js'",
38+
"lint:js": "eslint",
3939
"lint:scss": "stylelint assets/styles/**/*.scss"
4040
},
4141
"dependencies": {
@@ -82,12 +82,6 @@
8282
"webpack-shell-plugin-next": "2.3.1",
8383
"webpack-spritesmith": "1.1.0"
8484
},
85-
"resolutions": {
86-
"got": "^11.8.5",
87-
"http-cache-semantics": "^4.1.1",
88-
"semver-regex": "^4.0.0",
89-
"ua-parser-js": "^1.0.33"
90-
},
9185
"bin": {
9286
"wmpa": "./bin/cli.js"
9387
},

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');
@@ -28,7 +26,6 @@ const browserSyncConfig = server => ({
2826
host: 'localhost',
2927
port: 3000,
3028
open: 'external',
31-
/* eslint-disable no-mixed-spaces-and-tabs */
3229
files: [
3330
server
3431
? {
@@ -44,7 +41,6 @@ const browserSyncConfig = server => ({
4441
'./assets/dist/app.css',
4542
'./assets/dist/app.js'
4643
],
47-
/* eslint-enable */
4844
ghostMode: {
4945
clicks: false,
5046
scroll: true,

0 commit comments

Comments
 (0)