Skip to content

Commit 315dc29

Browse files
committed
feat: use eslint ts config
1 parent b254acb commit 315dc29

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
"source.fixAll.eslint": "explicit",
44
"source.organizeImports": "never"
55
},
6+
"eslint.options": {
7+
"flags": ["unstable_ts_config"]
8+
},
69
"editor.formatOnSave": false,
710
"eslint.validate": [
811
"html",

eslint.config.js renamed to eslint.config.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1+
// @ts-expect-error missing types
12
import styleMigrate from '@stylistic/eslint-plugin-migrate'
2-
import JITI from 'jiti'
33

4-
const jiti = JITI(import.meta.url)
5-
/**
6-
* @type {import('./src').defineConfig}
7-
*/
8-
const { defineConfig } = jiti('./src')
4+
import { defineConfig } from './src'
5+
96
export default defineConfig(
107
{
118
vue: true,

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"scripts": {
3939
"build": "nr build:typegen && tsup",
4040
"dev": "npx @eslint/config-inspector",
41-
"lint": "eslint .",
41+
"lint": "eslint --flag unstable_ts_config .",
4242
"lint:fix": "eslint . --fix",
4343
"build:inspector": "pnpm build && npx @eslint/config-inspector build",
4444
"build:typegen": "tsx scripts/typegen.ts",
@@ -50,7 +50,7 @@
5050
"peerDependencies": {
5151
"@eslint-react/eslint-plugin": "^1.5.8",
5252
"@unocss/eslint-plugin": ">=0.50.0",
53-
"eslint": "^8.56.0 || ^9.0.0",
53+
"eslint": "^9.5.0",
5454
"eslint-plugin-react-hooks": "^4.6.0",
5555
"eslint-plugin-react-refresh": "^0.4.4",
5656
"eslint-plugin-svelte": ">=2.35.1",
@@ -136,6 +136,7 @@
136136
"execa": "^9.3.1",
137137
"fast-glob": "^3.3.2",
138138
"fs-extra": "^11.2.0",
139+
"jiti": "^1.21.6",
139140
"lint-staged": "^15.2.9",
140141
"rimraf": "^6.0.1",
141142
"simple-git-hooks": "^2.11.1",
@@ -149,6 +150,6 @@
149150
"pre-commit": "pnpx nano-staged"
150151
},
151152
"nano-staged": {
152-
"*": "eslint --fix"
153+
"*": "eslint --flag unstable_ts_config --fix"
153154
}
154155
}

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)