Skip to content

Commit 2068717

Browse files
committed
chore: use ESLint V9 and fix errors
1 parent 2033aa9 commit 2068717

File tree

12 files changed

+4966
-3824
lines changed

12 files changed

+4966
-3824
lines changed

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
auto-install-peers=true

.vscode/settings.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,10 @@
99
"withtypes",
1010
"zoomable"
1111
],
12-
"eslint.experimental.useFlatConfig": true
12+
"editor.formatOnSave": true,
13+
"eslint.useFlatConfig": true,
14+
"editor.codeActionsOnSave": {
15+
"source.fixAll.eslint": "always",
16+
"source.fixAll.prettier": "always"
17+
}
1318
}

eslint.config.js

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,28 @@
11
// @ts-check
2-
import { defineConfig, prettier, typescript } from '@bassist/eslint'
2+
import {
3+
createGetConfigNameFactory,
4+
defineFlatConfig,
5+
javascript,
6+
jsx,
7+
typescript,
8+
vue,
9+
} from '@bassist/eslint-config'
310

4-
export default defineConfig([
5-
...prettier,
6-
...typescript,
7-
{
8-
rules: {
9-
'@typescript-eslint/no-namespace': 'off',
11+
const getConfigName = createGetConfigNameFactory('vue-picture-cropper')
12+
13+
export default defineFlatConfig(
14+
[
15+
...javascript,
16+
...jsx,
17+
...vue,
18+
...typescript,
19+
{
20+
name: getConfigName('override'),
21+
rules: {
22+
'@typescript-eslint/no-namespace': 'off',
23+
},
24+
ignores: ['dist', 'lib'],
1025
},
11-
ignores: ['dist', 'lib'],
12-
},
13-
])
26+
],
27+
{ tailwindcssEnabled: false },
28+
)

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"build:docs": "pnpm -F docs build",
2828
"preview": "pnpm -F docs preview",
2929
"lint": "eslint src",
30+
"lint:inspector": "npx @eslint/config-inspector",
3031
"format": "prettier --write src",
3132
"mirror:get": "npm config get registry",
3233
"mirror:set": "npm config set registry https://registry.npmmirror.com",
@@ -55,19 +56,19 @@
5556
},
5657
"devDependencies": {
5758
"@bassist/commit": "^0.1.0",
58-
"@bassist/eslint": "^0.5.0",
59+
"@bassist/eslint-config": "^0.1.2",
5960
"@bassist/tsconfig": "^0.1.1",
6061
"@types/node": "^20.8.2",
6162
"@vitejs/plugin-vue": "^4.4.0",
6263
"@vitejs/plugin-vue-jsx": "^3.0.2",
6364
"@withtypes/fs-extra": "^0.1.1",
6465
"dts-bundle-generator": "^8.0.1",
65-
"eslint": "^8.50.0",
66+
"eslint": "^9.22.0",
6667
"husky": "^8.0.3",
6768
"less": "^4.2.0",
6869
"lint-staged": "^14.0.1",
6970
"npm-run-all": "^4.1.5",
70-
"prettier": "^3.0.3",
71+
"prettier": "^3.5.3",
7172
"tsx": "^3.13.0",
7273
"typescript": "^5.2.2",
7374
"vite": "^4.4.11",

0 commit comments

Comments
 (0)