Skip to content

Commit 95f3de5

Browse files
committed
chore: upgrade eslint config
1 parent da4c91a commit 95f3de5

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

.eslintrc.js

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ node_modules
33
dist
44
*.log
55
.vercel
6+
.eslintcache

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"editor.formatOnSave": true
2+
"editor.formatOnSave": true,
3+
"eslint.experimental.useFlatConfig": true,
4+
"eslint.options": {
5+
"overrideConfigFile": "./eslint.config.mjs"
6+
}
37
}

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { sxzz } from '@sxzz/eslint-config'
2+
3+
export default sxzz()

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
"access": "public"
6767
},
6868
"scripts": {
69-
"lint": "eslint . --ext .vue,.js,.ts,.jsx,.tsx,.json,.md",
69+
"lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c eslint.config.mjs --cache .",
7070
"lint:fix": "pnpm run lint --fix",
7171
"build": "tsup && tsx scripts/postbuild.mts",
7272
"dev": "tsup --watch",

src/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ import {
88
getLang,
99
getTransformResult,
1010
} from '@vue-macros/common'
11-
import { resolveOption } from './core/options'
12-
import type { ExportDefaultDeclaration, Node } from '@babel/types'
13-
import type { Options } from './core/options'
11+
import { type ExportDefaultDeclaration, type Node } from '@babel/types'
12+
import { type Options, resolveOption } from './core/options'
1413

1514
function resolveName(id: string) {
1615
return camelCase(path.basename(id, 'vue'))

src/vite.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import unplugin from '.'
2+
// eslint-disable-next-line antfu/prefer-inline-type-import
23
import type {} from 'vite'
34

45
export default unplugin.vite

0 commit comments

Comments
 (0)