You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,8 +29,8 @@ Because of the complexity of this config, it is exported as a factory function t
29
29
30
30
This package exports:
31
31
32
-
-`defineConfig`, a utility function whose type signature is the same as the [`config` function from `typescript-eslint`](https://typescript-eslint.io/packages/typescript-eslint#config).
33
-
-`configs`, contains all the [shared configruations from `typescript-eslint`](https://typescript-eslint.io/users/configs) (in camelCase, e.g. `configs.recommendedTypeChecked`).
32
+
-`defineConfigWithVueTs`, a utility function whose type signature is the same as the [`config` function from `typescript-eslint`](https://typescript-eslint.io/packages/typescript-eslint#config), but will modify the given config to work with Vue.js + TypeScript.
33
+
-`vueTsConfigs`, contains all the [shared configruations from `typescript-eslint`](https://typescript-eslint.io/users/configs) (in camelCase, e.g. `configs.recommendedTypeChecked`).
34
34
- a Vue-specific config factory: `configureVueProject({ scriptLangs, rootDir })`. More info below.
35
35
36
36
### Minimal Setup
@@ -39,13 +39,13 @@ This package exports:
39
39
// eslint.config.mjs
40
40
importpluginVuefrom'eslint-plugin-vue'
41
41
import {
42
-
defineConfig,
43
-
configs,
42
+
defineConfigWithVueTs,
43
+
vueTsConfigs,
44
44
} from'@vue/eslint-config-typescript'
45
45
46
-
exportdefaultdefineConfig(
46
+
exportdefaultdefineConfigWithVueTs(
47
47
pluginVue.configs['flat/essential'],
48
-
configs.recommended,
48
+
vueTsConfigs.recommended,
49
49
)
50
50
```
51
51
@@ -59,9 +59,9 @@ All the `<script>` blocks in `.vue` files *MUST* be written in TypeScript (shoul
59
59
// eslint.config.mjs
60
60
importpluginVuefrom'eslint-plugin-vue'
61
61
import {
62
-
defineConfig,
62
+
defineConfigWithVueTs,
63
+
vueTsConfigs,
63
64
configureVueProject,
64
-
configs,
65
65
} from'@vue/eslint-config-typescript'
66
66
67
67
configureVueProject({
@@ -97,13 +97,13 @@ configureVueProject({
97
97
rootDir:import.meta.dirname,
98
98
})
99
99
100
-
exportdefaultdefineConfig(
100
+
exportdefaultdefineConfigWithVueTs(
101
101
pluginVue.configs["flat/essential"],
102
102
103
103
// We STRONGLY RECOMMEND you to start with `recommended` or `recommendedTypeChecked`.
104
104
// But if you are determined to configure all rules by yourself,
105
105
// you can start with `base`, and then turn on/off the rules you need.
106
-
configs.base,
106
+
vueTsConfigs.base,
107
107
)
108
108
```
109
109
@@ -120,13 +120,13 @@ Instead, you can start by extending from the `recommendedTypeChecked` configurat
0 commit comments