Skip to content

Commit c082183

Browse files
committed
Merge branch 'master' into feat/add-no-use-computed-property-like-method
2 parents c2bc020 + 738132c commit c082183

File tree

321 files changed

+13440
-3105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+13440
-3105
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- run:
4444
name: Install eslint@6
4545
command: |
46-
npm install -D eslint@6.2.0
46+
npm install --save-exact eslint@6.8.0 @typescript-eslint/parser@3.10.1 typescript@4.0.8
4747
- run:
4848
name: Install dependencies
4949
command: npm install

.vscode/settings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@
99
"vue"
1010
],
1111
"typescript.tsdk": "node_modules/typescript/lib",
12-
"vetur.validation.script": false
12+
"vetur.validation.script": false,
13+
"[typescript]": {
14+
"editor.formatOnSave": true,
15+
"editor.defaultFormatter": "esbenp.prettier-vscode"
16+
},
1317
}

docs/.vuepress/components/eslint-code-block.vue

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,22 +122,20 @@ export default {
122122
123123
async mounted() {
124124
// Load linter.
125-
const [
126-
{ default: Linter },
127-
{ default: coreRules },
128-
{ parseForESLint }
129-
] = await Promise.all([
130-
import('eslint4b/dist/linter'),
131-
import('eslint4b/dist/core-rules'),
132-
import('espree').then(() => import('vue-eslint-parser'))
133-
])
125+
const [{ default: Linter }, { default: coreRules }, { parseForESLint }] =
126+
await Promise.all([
127+
import('eslint4b/dist/linter'),
128+
import('eslint4b/dist/core-rules'),
129+
import('espree').then(() => import('vue-eslint-parser'))
130+
])
134131
135132
const linter = (this.linter = new Linter())
136133
137134
for (const ruleId of Object.keys(rules)) {
138135
linter.defineRule(`vue/${ruleId}`, rules[ruleId])
139136
}
140137
linter.defineRule('no-undef', coreRules['no-undef'])
138+
linter.defineRule('no-unused-vars', coreRules['no-unused-vars'])
141139
142140
linter.defineParser('vue-eslint-parser', { parseForESLint })
143141
}

docs/.vuepress/config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ module.exports = {
155155
{ text: 'User Guide', link: '/user-guide/' },
156156
{ text: 'Developer Guide', link: '/developer-guide/' },
157157
{ text: 'Rules', link: '/rules/' },
158-
{ text: 'Demo', link: 'https://mysticatea.github.io/vue-eslint-demo' }
158+
{
159+
text: 'Demo',
160+
link: 'https://ota-meshi.github.io/eslint-plugin-vue-demo/'
161+
}
159162
],
160163

161164
sidebar: {

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ This plugin allows us to check the `<template>` and `<script>` of `.vue` files w
1515
ESLint editor integrations are useful to check your code in real-time.
1616

1717
:::warning Status of Vue.js 3.x supports
18-
This plugin supports the basic syntax of Vue.js 3.0, but the Vue.js 3.0 experimental features `<script setup>` and `<style vars>` are not yet supported. Follow [#1248](https://github.com/vuejs/eslint-plugin-vue/issues/1248) for more details.
18+
This plugin supports the basic syntax of Vue.js 3.0 and `<script setup>`, but the Vue.js 3.0 experimental feature CSS variable injection is not yet supported.
19+
If you have issues with these, please also refer to the [FAQ](./user-guide/README.md#does-not-work-well-with-script-setup). If you can't find a solution, search for the issue and if the issue doesn't exist, open a new issue.
1920
:::
2021

2122
## :traffic_light: Versioning policy

docs/rules/README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
2424
| Rule ID | Description | |
2525
|:--------|:------------|:---|
2626
| [vue/comment-directive](./comment-directive.md) | support comment-directives in `<template>` | |
27-
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | prevent variables defined in `<script setup>` to be marked as undefined | |
2827
| [vue/jsx-uses-vars](./jsx-uses-vars.md) | prevent variables used in JSX to be marked as unused | |
28+
| [vue/script-setup-uses-vars](./script-setup-uses-vars.md) | prevent `<script setup>` variables used in `<template>` to be marked as unused | |
2929

3030
## Priority A: Essential (Error Prevention) <badge text="for Vue.js 3.x" vertical="middle">for Vue.js 3.x</badge>
3131

@@ -42,15 +42,15 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
4242
| [vue/no-arrow-functions-in-watch](./no-arrow-functions-in-watch.md) | disallow using arrow functions to define watcher | |
4343
| [vue/no-async-in-computed-properties](./no-async-in-computed-properties.md) | disallow asynchronous actions in computed properties | |
4444
| [vue/no-deprecated-data-object-declaration](./no-deprecated-data-object-declaration.md) | disallow using deprecated object declaration on data (in Vue.js 3.0.0+) | :wrench: |
45-
| [vue/no-deprecated-destroyed-lifecycle](./no-deprecated-destroyed-lifecycle.md) | disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+) | |
45+
| [vue/no-deprecated-destroyed-lifecycle](./no-deprecated-destroyed-lifecycle.md) | disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+) | :wrench: |
4646
| [vue/no-deprecated-dollar-listeners-api](./no-deprecated-dollar-listeners-api.md) | disallow using deprecated `$listeners` (in Vue.js 3.0.0+) | |
4747
| [vue/no-deprecated-dollar-scopedslots-api](./no-deprecated-dollar-scopedslots-api.md) | disallow using deprecated `$scopedSlots` (in Vue.js 3.0.0+) | :wrench: |
4848
| [vue/no-deprecated-events-api](./no-deprecated-events-api.md) | disallow using deprecated events api (in Vue.js 3.0.0+) | |
4949
| [vue/no-deprecated-filter](./no-deprecated-filter.md) | disallow using deprecated filters syntax (in Vue.js 3.0.0+) | |
5050
| [vue/no-deprecated-functional-template](./no-deprecated-functional-template.md) | disallow using deprecated the `functional` template (in Vue.js 3.0.0+) | |
5151
| [vue/no-deprecated-html-element-is](./no-deprecated-html-element-is.md) | disallow using deprecated the `is` attribute on HTML elements (in Vue.js 3.0.0+) | |
5252
| [vue/no-deprecated-inline-template](./no-deprecated-inline-template.md) | disallow using deprecated `inline-template` attribute (in Vue.js 3.0.0+) | |
53-
| [vue/no-deprecated-props-default-this](./no-deprecated-props-default-this.md) | disallow props default function `this` access | |
53+
| [vue/no-deprecated-props-default-this](./no-deprecated-props-default-this.md) | disallow deprecated `this` access in props default function (in Vue.js 3.0.0+) | |
5454
| [vue/no-deprecated-scope-attribute](./no-deprecated-scope-attribute.md) | disallow deprecated `scope` attribute (in Vue.js 2.5.0+) | :wrench: |
5555
| [vue/no-deprecated-slot-attribute](./no-deprecated-slot-attribute.md) | disallow deprecated `slot` attribute (in Vue.js 2.6.0+) | :wrench: |
5656
| [vue/no-deprecated-slot-scope-attribute](./no-deprecated-slot-scope-attribute.md) | disallow deprecated `slot-scope` attribute (in Vue.js 2.6.0+) | :wrench: |
@@ -157,7 +157,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
157157
| [vue/no-multiple-slot-args](./no-multiple-slot-args.md) | disallow to pass multiple arguments to scoped slots | |
158158
| [vue/no-v-html](./no-v-html.md) | disallow use of v-html to prevent XSS attack | |
159159
| [vue/order-in-components](./order-in-components.md) | enforce order of properties in components | :wrench: |
160-
| [vue/this-in-template](./this-in-template.md) | disallow usage of `this` in template | |
160+
| [vue/this-in-template](./this-in-template.md) | disallow usage of `this` in template | :wrench: |
161161

162162
## Priority A: Essential (Error Prevention) <badge text="for Vue.js 2.x" vertical="middle" type="warn">for Vue.js 2.x</badge>
163163

@@ -267,7 +267,7 @@ Enforce all the rules in this category, as well as all higher priority rules, wi
267267
| [vue/no-multiple-slot-args](./no-multiple-slot-args.md) | disallow to pass multiple arguments to scoped slots | |
268268
| [vue/no-v-html](./no-v-html.md) | disallow use of v-html to prevent XSS attack | |
269269
| [vue/order-in-components](./order-in-components.md) | enforce order of properties in components | :wrench: |
270-
| [vue/this-in-template](./this-in-template.md) | disallow usage of `this` in template | |
270+
| [vue/this-in-template](./this-in-template.md) | disallow usage of `this` in template | :wrench: |
271271

272272
## Uncategorized
273273

@@ -298,8 +298,10 @@ For example:
298298
| [vue/next-tick-style](./next-tick-style.md) | enforce Promise or callback style in `nextTick` | :wrench: |
299299
| [vue/no-bare-strings-in-template](./no-bare-strings-in-template.md) | disallow the use of bare strings in `<template>` | |
300300
| [vue/no-boolean-default](./no-boolean-default.md) | disallow boolean defaults | :wrench: |
301+
| [vue/no-deprecated-v-is](./no-deprecated-v-is.md) | disallow deprecated `v-is` directive (in Vue.js 3.1.0+) | :wrench: |
301302
| [vue/no-duplicate-attr-inheritance](./no-duplicate-attr-inheritance.md) | enforce `inheritAttrs` to be set to `false` when using `v-bind="$attrs"` | |
302303
| [vue/no-empty-component-block](./no-empty-component-block.md) | disallow the `<template>` `<script>` `<style>` block to be empty | |
304+
| [vue/no-export-in-script-setup](./no-export-in-script-setup.md) | disallow `export` in `<script setup>` | |
303305
| [vue/no-invalid-model-keys](./no-invalid-model-keys.md) | require valid keys in model option | |
304306
| [vue/no-multiple-objects-in-class](./no-multiple-objects-in-class.md) | disallow to pass multiple objects into array to class | |
305307
| [vue/no-potential-component-option-typo](./no-potential-component-option-typo.md) | disallow a potential typo in your component property | |
@@ -313,6 +315,7 @@ For example:
313315
| [vue/no-restricted-v-bind](./no-restricted-v-bind.md) | disallow specific argument in `v-bind` | |
314316
| [vue/no-static-inline-styles](./no-static-inline-styles.md) | disallow static inline `style` attributes | |
315317
| [vue/no-template-target-blank](./no-template-target-blank.md) | disallow target="_blank" attribute without rel="noopener noreferrer" | |
318+
| [vue/no-this-in-before-route-enter](./no-this-in-before-route-enter.md) | disallow `this` usage in a `beforeRouteEnter` method | |
316319
| [vue/no-unregistered-components](./no-unregistered-components.md) | disallow using components that are not registered inside templates | |
317320
| [vue/no-unsupported-features](./no-unsupported-features.md) | disallow unsupported Vue.js syntax on the specified version | :wrench: |
318321
| [vue/no-unused-properties](./no-unused-properties.md) | disallow unused properties | |
@@ -322,13 +325,16 @@ For example:
322325
| [vue/no-useless-v-bind](./no-useless-v-bind.md) | disallow unnecessary `v-bind` directives | :wrench: |
323326
| [vue/padding-line-between-blocks](./padding-line-between-blocks.md) | require or disallow padding lines between blocks | :wrench: |
324327
| [vue/require-direct-export](./require-direct-export.md) | require the component to be directly exported | |
328+
| [vue/require-emit-validator](./require-emit-validator.md) | require type definitions in emits | |
325329
| [vue/require-name-property](./require-name-property.md) | require a name property in Vue components | |
326330
| [vue/script-indent](./script-indent.md) | enforce consistent indentation in `<script>` | :wrench: |
327331
| [vue/sort-keys](./sort-keys.md) | enforce sort-keys in a manner that is compatible with order-in-components | |
328332
| [vue/static-class-names-order](./static-class-names-order.md) | enforce static class names order | :wrench: |
329333
| [vue/v-for-delimiter-style](./v-for-delimiter-style.md) | enforce `v-for` directive's delimiter style | :wrench: |
330334
| [vue/v-on-event-hyphenation](./v-on-event-hyphenation.md) | enforce v-on event naming style on custom components in template | :wrench: |
331335
| [vue/v-on-function-call](./v-on-function-call.md) | enforce or forbid parentheses after method calls without arguments in `v-on` directives | :wrench: |
336+
| [vue/valid-define-emits](./valid-define-emits.md) | enforce valid `defineEmits` compiler macro | |
337+
| [vue/valid-define-props](./valid-define-props.md) | enforce valid `defineProps` compiler macro | |
332338
| [vue/valid-next-tick](./valid-next-tick.md) | enforce valid `nextTick` function calls | :wrench: |
333339

334340
### Extension Rules
@@ -377,5 +383,6 @@ The following rules extend the rules provided by ESLint itself and apply them to
377383

378384
| Rule ID | Replaced by |
379385
|:--------|:------------|
386+
| [vue/experimental-script-setup-vars](./experimental-script-setup-vars.md) | (no replacement) |
380387
| [vue/name-property-casing](./name-property-casing.md) | [vue/component-definition-name-casing](./component-definition-name-casing.md) |
381388
| [vue/no-confusing-v-for-v-if](./no-confusing-v-for-v-if.md) | [vue/no-use-v-if-with-v-for](./no-use-v-if-with-v-for.md) |

docs/rules/attribute-hyphenation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ This rule enforces using hyphenated attribute names on custom components in Vue
4040
}
4141
```
4242

43-
Default casing is set to `always` with `['data-', 'aria-', 'slot-scope']` set to be ignored
43+
Default casing is set to `always`. By default the following attributes are ignored: `data-`, `aria-`, `slot-scope`,
44+
and all the [SVG attributes](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute) with either an upper case letter or an hyphen.
4445

4546
- `"always"` (default) ... Use hyphenated name.
46-
- `"never"` ... Don't use hyphenated name except `data-`, `aria-` and `slot-scope`.
47+
- `"never"` ... Don't use hyphenated name except the ones that are ignored.
4748
- `"ignore"` ... Array of ignored names
4849

4950
### `"always"`
@@ -66,7 +67,7 @@ It errors on upper case letters.
6667

6768
### `"never"`
6869

69-
It errors on hyphens except `data-`, `aria-` and `slot-scope`.
70+
It errors on hyphens except on the attributes in the ignored attributes list.
7071

7172
<eslint-code-block fix :rules="{'vue/attribute-hyphenation': ['error', 'never']}">
7273

docs/rules/experimental-script-setup-vars.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ since: v7.0.0
99

1010
> prevent variables defined in `<script setup>` to be marked as undefined
1111
12-
- :gear: This rule is included in all of `"plugin:vue/base"`, `"plugin:vue/essential"`, `"plugin:vue/vue3-essential"`, `"plugin:vue/strongly-recommended"`, `"plugin:vue/vue3-strongly-recommended"`, `"plugin:vue/recommended"` and `"plugin:vue/vue3-recommended"`.
12+
- :warning: This rule was **deprecated**.
1313

1414
:::warning
1515
This rule is an experimental rule. It may be removed without notice.
@@ -19,6 +19,10 @@ This rule will find variables defined in `<script setup="args">` and mark them a
1919

2020
This rule only has an effect when the `no-undef` rule is enabled.
2121

22+
:::warning
23+
`<script setup="args">` syntax was rejected by Vue's RFC. Check out the [new syntax](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0040-script-setup.md).
24+
:::
25+
2226
## :book: Rule Details
2327

2428
Without this rule this code triggers warning:

docs/rules/html-button-has-type.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ This rule aims to warn if no type or an invalid type is used on a button type at
4848

4949
- `button` ... `<button type="button"></button>`
5050
- `true` (default) ... allow value `button`.
51-
- `false"` ... disallow value `button`.
51+
- `false` ... disallow value `button`.
5252
- `submit` ... `<button type="submit"></button>`
5353
- `true` (default) ... allow value `submit`.
54-
- `false"` ... disallow value `submit`.
54+
- `false` ... disallow value `submit`.
5555
- `reset` ... `<button type="reset"></button>`
5656
- `true` (default) ... allow value `reset`.
57-
- `false"` ... disallow value `reset`.
57+
- `false` ... disallow value `reset`.
5858

5959
## :rocket: Version
6060

docs/rules/html-indent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ since: v3.14.0
1717
This rule enforces a consistent indentation style in `<template>`. The default style is 2 spaces.
1818

1919
- This rule checks all tags, also all expressions in directives and mustaches.
20-
- In the expressions, this rule supports ECMAScript 2020 syntaxes. It ignores unknown AST nodes, but it might be confused by non-standard syntaxes.
20+
- In the expressions, this rule supports ECMAScript 2022 syntaxes. It ignores unknown AST nodes, but it might be confused by non-standard syntaxes.
2121

2222
<eslint-code-block fix :rules="{'vue/html-indent': ['error']}">
2323

docs/rules/jsx-uses-vars.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ After turning on, `HelloWorld` is being marked as used and `no-unused-vars` rule
3838

3939
If you are not using JSX or if you do not use the `no-unused-vars` rule then you can disable this rule.
4040

41+
## :couple: Related Rules
42+
43+
- [vue/script-setup-uses-vars](./script-setup-uses-vars.md)
44+
- [no-unused-vars](https://eslint.org/docs/rules/no-unused-vars)
45+
4146
## :rocket: Version
4247

4348
This rule was introduced in eslint-plugin-vue v2.0.0

docs/rules/no-deprecated-destroyed-lifecycle.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,13 @@ since: v7.0.0
1010
> disallow using deprecated `destroyed` and `beforeDestroy` lifecycle hooks (in Vue.js 3.0.0+)
1111
1212
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
13+
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
1314

1415
## :book: Rule Details
1516

1617
This rule reports use of deprecated `destroyed` and `beforeDestroy` lifecycle hooks. (in Vue.js 3.0.0+).
1718

18-
<eslint-code-block :rules="{'vue/no-deprecated-destroyed-lifecycle': ['error']}">
19+
<eslint-code-block fix :rules="{'vue/no-deprecated-destroyed-lifecycle': ['error']}">
1920

2021
```vue
2122
<script>

docs/rules/no-deprecated-props-default-this.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
pageClass: rule-details
33
sidebarDepth: 0
44
title: vue/no-deprecated-props-default-this
5-
description: disallow props default function `this` access
5+
description: disallow deprecated `this` access in props default function (in Vue.js 3.0.0+)
66
since: v7.0.0
77
---
88
# vue/no-deprecated-props-default-this
99

10-
> disallow props default function `this` access
10+
> disallow deprecated `this` access in props default function (in Vue.js 3.0.0+)
1111
1212
- :gear: This rule is included in all of `"plugin:vue/vue3-essential"`, `"plugin:vue/vue3-strongly-recommended"` and `"plugin:vue/vue3-recommended"`.
1313

docs/rules/no-deprecated-v-is.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
pageClass: rule-details
3+
sidebarDepth: 0
4+
title: vue/no-deprecated-v-is
5+
description: disallow deprecated `v-is` directive (in Vue.js 3.1.0+)
6+
since: v7.11.0
7+
---
8+
# vue/no-deprecated-v-is
9+
10+
> disallow deprecated `v-is` directive (in Vue.js 3.1.0+)
11+
12+
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) can automatically fix some of the problems reported by this rule.
13+
14+
## :book: Rule Details
15+
16+
This rule reports deprecated `v-is` directive in Vue.js v3.1.0+.
17+
18+
Use [`is` attribute with `vue:` prefix](https://v3.vuejs.org/api/special-attributes.html#is) instead.
19+
20+
<eslint-code-block fix :rules="{'vue/no-deprecated-v-is': ['error']}">
21+
22+
```vue
23+
<template>
24+
<!-- ✓ GOOD -->
25+
<div is="vue:MyComponent" />
26+
<component is="MyComponent" />
27+
28+
<!-- ✗ BAD -->
29+
<div v-is="'MyComponent'" />
30+
</template>
31+
```
32+
33+
</eslint-code-block>
34+
35+
## :couple: Related Rules
36+
37+
- [vue/valid-v-is]
38+
39+
[vue/valid-v-is]: ./valid-v-is.md
40+
41+
## :books: Further Reading
42+
43+
- [API - v-is](https://v3.vuejs.org/api/directives.html#v-is)
44+
- [API - v-is (Old)](https://github.com/vuejs/docs-next/blob/008613756c3d781128d96b64a2d27f7598f8f548/src/api/directives.md#v-is)
45+
46+
## :rocket: Version
47+
48+
This rule was introduced in eslint-plugin-vue v7.11.0
49+
50+
## :mag: Implementation
51+
52+
- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-deprecated-v-is.js)
53+
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/no-deprecated-v-is.js)
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
pageClass: rule-details
3+
sidebarDepth: 0
4+
title: vue/no-export-in-script-setup
5+
description: disallow `export` in `<script setup>`
6+
since: v7.13.0
7+
---
8+
# vue/no-export-in-script-setup
9+
10+
> disallow `export` in `<script setup>`
11+
12+
## :book: Rule Details
13+
14+
This rule warns ES module exports in `<script setup>`.
15+
16+
The previous version of `<script setup>` RFC used `export` to define variables used in templates, but the new `<script setup>` RFC has been updated to define without using `export`.
17+
See [Vue RFCs - 0040-script-setup] for more details.
18+
19+
<eslint-code-block :rules="{'vue/no-export-in-script-setup': ['error']}">
20+
21+
```vue
22+
<script setup>
23+
/* ✓ GOOD */
24+
let msg = 'Hello!'
25+
</script>
26+
```
27+
28+
</eslint-code-block>
29+
30+
<eslint-code-block :rules="{'vue/no-export-in-script-setup': ['error']}">
31+
32+
```vue
33+
<script setup>
34+
/* ✗ BAD */
35+
export let msg = 'Hello!'
36+
</script>
37+
```
38+
39+
</eslint-code-block>
40+
41+
## :wrench: Options
42+
43+
Nothing.
44+
45+
## :books: Further Reading
46+
47+
- [Vue RFCs - 0040-script-setup]
48+
49+
[Vue RFCs - 0040-script-setup]: https://github.com/vuejs/rfcs/blob/master/active-rfcs/0040-script-setup.md
50+
51+
## :rocket: Version
52+
53+
This rule was introduced in eslint-plugin-vue v7.13.0
54+
55+
## :mag: Implementation
56+
57+
- [Rule source](https://github.com/vuejs/eslint-plugin-vue/blob/master/lib/rules/no-export-in-script-setup.js)
58+
- [Test source](https://github.com/vuejs/eslint-plugin-vue/blob/master/tests/lib/rules/no-export-in-script-setup.js)

0 commit comments

Comments
 (0)