Skip to content

Commit b1dfaae

Browse files
committed
Remove ESLint configuration files and update package-lock.json
1 parent 19dd3fd commit b1dfaae

File tree

5 files changed

+86
-75
lines changed

5 files changed

+86
-75
lines changed

.eslintignore

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

.eslintrc.cjs

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

eslint.config.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
const tsParser = require('@typescript-eslint/parser')
2+
const tsPlugin = require('@typescript-eslint/eslint-plugin')
3+
const reactPlugin = require('eslint-plugin-react')
4+
const prettierPlugin = require('eslint-plugin-prettier')
5+
6+
module.exports = [
7+
{
8+
files: ['src/**/*.{js,ts,jsx,tsx}'],
9+
ignores: ['node_modules/**', 'dist/**', 'out/**', 'build/**'],
10+
languageOptions: {
11+
sourceType: 'module', // `ecmaVersion` is no longer necessary
12+
globals: {
13+
window: 'readonly',
14+
document: 'readonly',
15+
navigator: 'readonly',
16+
console: 'readonly',
17+
module: 'readonly',
18+
require: 'readonly',
19+
process: 'readonly',
20+
__dirname: 'readonly',
21+
Buffer: 'readonly',
22+
setImmediate: 'readonly',
23+
clearImmediate: 'readonly',
24+
setTimeout: 'readonly',
25+
clearTimeout: 'readonly',
26+
setInterval: 'readonly',
27+
clearInterval: 'readonly'
28+
},
29+
parser: tsParser
30+
},
31+
plugins: {
32+
'@typescript-eslint': tsPlugin,
33+
react: reactPlugin,
34+
prettier: prettierPlugin
35+
},
36+
rules: {
37+
'@typescript-eslint/ban-ts-comment': ['error', { 'ts-ignore': 'allow-with-description' }],
38+
'@typescript-eslint/explicit-function-return-type': 'error',
39+
'@typescript-eslint/explicit-module-boundary-types': 'off',
40+
'@typescript-eslint/no-empty-function': ['error', { allow: ['arrowFunctions'] }],
41+
'@typescript-eslint/no-explicit-any': 'error',
42+
'@typescript-eslint/no-non-null-assertion': 'off',
43+
'@typescript-eslint/no-var-requires': 'off',
44+
'prettier/prettier': 'error' // Prettier formatting rule
45+
},
46+
linterOptions: {
47+
reportUnusedDisableDirectives: true
48+
}
49+
},
50+
{
51+
files: ['*.js'],
52+
rules: {
53+
'@typescript-eslint/explicit-function-return-type': 'off'
54+
}
55+
},
56+
{
57+
files: ['**/*.ts', '**/*.tsx'],
58+
languageOptions: {
59+
parser: tsParser
60+
},
61+
rules: {
62+
// TypeScript-specific rules can be added here if needed
63+
}
64+
}
65+
]

package-lock.json

Lines changed: 16 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"homepage": "",
88
"scripts": {
99
"format": "prettier --write .",
10-
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
10+
"lint": "eslint src --fix",
1111
"typecheck:node": "tsc --noEmit -p tsconfig.node.json --composite false",
1212
"typecheck:web": "tsc --noEmit -p tsconfig.web.json --composite false",
1313
"typecheck": "npm run typecheck:node && npm run typecheck:web",
@@ -28,9 +28,9 @@
2828
"devDependencies": {
2929
"@electron-toolkit/tsconfig": "^1.0.1",
3030
"@electron/notarize": "^2.4.0",
31-
"@types/node": "^20.14.2",
32-
"@types/react": "^18.2.64",
33-
"@types/react-dom": "^18.2.19",
31+
"@types/node": "^22.7.5",
32+
"@types/react": "^18.3.11",
33+
"@types/react-dom": "^18.3.1",
3434
"@typescript-eslint/eslint-plugin": "^8.9.0",
3535
"@typescript-eslint/parser": "^8.9.0",
3636
"@vitejs/plugin-react": "^4.2.1",
@@ -48,4 +48,4 @@
4848
"vite": "^5.4.9",
4949
"vite-plugin-static-copy": "^2.0.0"
5050
}
51-
}
51+
}

0 commit comments

Comments
 (0)