Skip to content

Commit e9a4dbd

Browse files
committed
chore: upgrade eslint config & remove post-build script
1 parent 50574d0 commit e9a4dbd

File tree

16 files changed

+677
-582
lines changed

16 files changed

+677
-582
lines changed

.eslintrc.js

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

.prettierignore

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

.prettierrc

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

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"editor.formatOnSave": true
2+
"editor.formatOnSave": true,
3+
"eslint.experimental.useFlatConfig": true
34
}

eslint.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const { sxzz } = require('@sxzz/eslint-config')
2+
module.exports = sxzz({
3+
rules: {
4+
'vue/no-ref-as-operand': 'off',
5+
'vue/prefer-import-from-vue': 'off',
6+
},
7+
})

package.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@
5959
"access": "public"
6060
},
6161
"scripts": {
62-
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.json,.md",
62+
"lint": "eslint .",
6363
"lint:fix": "pnpm run lint --fix",
64-
"build": "tsup && tsx scripts/postbuild.mts",
64+
"build": "tsup",
6565
"test": "vitest",
6666
"release": "bumpp && pnpm publish",
6767
"prepublishOnly": "pnpm run build"
@@ -78,27 +78,27 @@
7878
"@rollup/pluginutils": "^5.0.2"
7979
},
8080
"devDependencies": {
81-
"@sxzz/eslint-config-prettier": "^2.4.6",
82-
"@sxzz/eslint-config-vue": "^2.4.6",
81+
"@sxzz/eslint-config": "^3.3.2",
82+
"@sxzz/prettier-config": "^1.0.4",
8383
"@types/node": "^20.4.5",
8484
"@vue/reactivity": "^3.3.4",
8585
"@vue/shared": "^3.3.4",
8686
"bumpp": "^9.1.1",
8787
"esbuild": "^0.18.17",
8888
"eslint": "^8.46.0",
89-
"eslint-define-config": "^1.22.0",
9089
"expect-type": "^0.16.0",
9190
"fast-glob": "^3.3.1",
9291
"prettier": "^3.0.0",
9392
"rollup": "^3.27.0",
94-
"tsup": "^7.1.0",
93+
"tsup": "^7.2.0",
9594
"tsx": "^3.12.7",
9695
"typescript": "^5.1.6",
97-
"vite": "^4.4.7",
98-
"vitest": "^0.33.0",
96+
"vite": "^4.4.8",
97+
"vitest": "^0.34.1",
9998
"vue": "^3.3.4"
10099
},
101100
"engines": {
102101
"node": ">=14.19.0"
103-
}
102+
},
103+
"prettier": "@sxzz/prettier-config"
104104
}

playground/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"devDependencies": {
1717
"@vitejs/plugin-vue": "^4.2.3",
1818
"typescript": "^5.1.6",
19-
"vite": "^4.4.7",
19+
"vite": "^4.4.8",
2020
"vue-tsc": "^1.8.8"
2121
}
2222
}

playground/src/vite-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/// <reference types="vite/client" />
22

33
declare module '*.vue' {
4-
import type { DefineComponent } from 'vue'
4+
import { type DefineComponent } from 'vue'
55
const component: DefineComponent<{}, {}, any>
66
export default component
77
}

0 commit comments

Comments
 (0)