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
+10-8Lines changed: 10 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,8 @@ A part of its design is that this config may implicitly depend on
12
12
other parts of `create-vue` setups, such as `eslint-plugin-vue` being
13
13
extended in the same resulting config.
14
14
15
-
> Note: the current version doesn't support the legacy `.eslintrc*` configuraion format. For that you need to use version 9 or earlier. See the [corresponding README](https://www.npmjs.com/package/@vue/eslint-config-typescript/v/legacy-eslintrc) for more usage instructions.
15
+
> [!NOTE]
16
+
> The current version doesn't support the legacy `.eslintrc*` configuraion format. For that you need to use version 9 or earlier. See the [corresponding README](https://www.npmjs.com/package/@vue/eslint-config-typescript/v/legacy-eslintrc) for more usage instructions.
16
17
17
18
## Installation
18
19
@@ -36,7 +37,7 @@ import vueTsEslintConfig from "@vue/eslint-config-typescript";
36
37
exportdefault [
37
38
...pluginVue.configs["flat/essential"],
38
39
...vueTsEslintConfig(),
39
-
}]
40
+
]
40
41
```
41
42
42
43
The above configuration enables [the essential rules for Vue 3](https://eslint.vuejs.org/rules/#priority-a-essential-error-prevention) and [the recommended rules for TypeScript](https://typescript-eslint.io/rules/?=recommended).
@@ -54,14 +55,15 @@ export default [
54
55
...pluginVue.configs["flat/essential"],
55
56
56
57
...vueTsEslintConfig({
57
-
// Supports all the recommended configurations in https://typescript-eslint.io/users/configs#recommended-configurations
58
+
// Optional: extend additional configurations from `typescript-eslint`.
59
+
// Supports all the configurations in https://typescript-eslint.io/users/configs#recommended-configurations
58
60
extends: [
59
61
// By default, only the recommended rules are enabled.
60
62
"recommended",
61
63
// You can also manually enable the stylistic rules.
62
64
// "stylistic",
63
65
64
-
// The ones with `-type-checked` are not yet tested.
66
+
//[!NOTE] The ones with `-type-checked` are not yet tested.
65
67
66
68
// Other utility configurations, such as `eslint-recommended`,
67
69
// are also extendable here. But we don't recommend using them directly.
@@ -72,24 +74,24 @@ export default [
72
74
supportedScriptLangs: {
73
75
ts:true,
74
76
75
-
// [Discouraged]
77
+
// [!DISCOURAGED]
76
78
// Set to `true` to allow plain `<script>` or `<script setup>` blocks.
77
79
// This might result-in false positive or negatives in some rules for `.vue` files.
78
80
// Note you also need to configure `allowJs: true` in corresponding `tsconfig.json` files.
79
81
js:false,
80
82
81
-
// [Strongly discouraged]
83
+
// [!STRONGLY DISCOURAGED]
82
84
// Set to `true` to allow `<script lang="tsx">` blocks.
83
85
// This would be in conflict with all type-aware rules.
84
86
tsx:false,
85
87
86
-
// [Strongly discouraged]
88
+
// [!STRONGLY DISCOURAGED]
87
89
// Set to `true` to allow `<script lang="jsx">` blocks.
88
90
// This would be in conflict with all type-aware rules and may result in false positives.
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
12
+
13
+
## Customize configuration
14
+
15
+
See [Vite Configuration Reference](https://vitejs.dev/config/).
0 commit comments