Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 90e4d05

Browse filesBrowse files
committed
Add vue/no-required-prop-with-default to recommended configs (#2640)
1 parent 11043e4 commit 90e4d05
Copy full SHA for 90e4d05

7 files changed

+7
-2
lines changed

‎docs/rules/index.md

Copy file name to clipboardExpand all lines: docs/rules/index.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ Rules in this category are enabled for all presets provided by eslint-plugin-vue
182182
| [vue/block-order] | enforce order of component top-level elements | :wrench: | :three::two::hammer: |
183183
| [vue/no-lone-template] | disallow unnecessary `<template>` | | :three::two::warning: |
184184
| [vue/no-multiple-slot-args] | disallow passing multiple arguments to scoped slots | | :three::two::warning: |
185+
| [vue/no-required-prop-with-default] | enforce props with default values to be optional | :wrench::bulb: | :three::two::warning: |
185186
| [vue/no-v-html] | disallow use of v-html to prevent XSS attack | | :three::two::hammer: |
186187
| [vue/order-in-components] | enforce order of properties in components | :wrench::bulb: | :three::two::hammer: |
187188
| [vue/this-in-template] | disallow usage of `this` in template | :wrench: | :three::two::hammer: |
@@ -235,7 +236,6 @@ For example:
235236
| [vue/no-multiple-objects-in-class] | disallow passing multiple objects in an array to class | | :hammer: |
236237
| [vue/no-potential-component-option-typo] | disallow a potential typo in your component property | :bulb: | :hammer: |
237238
| [vue/no-ref-object-reactivity-loss] | disallow usages of ref objects that can lead to loss of reactivity | | :warning: |
238-
| [vue/no-required-prop-with-default] | enforce props with default values to be optional | :wrench::bulb: | :warning: |
239239
| [vue/no-restricted-block] | disallow specific block | | :hammer: |
240240
| [vue/no-restricted-call-after-await] | disallow asynchronously called restricted methods | | :hammer: |
241241
| [vue/no-restricted-class] | disallow specific classes in Vue components | | :warning: |

‎docs/rules/no-required-prop-with-default.md

Copy file name to clipboardExpand all lines: docs/rules/no-required-prop-with-default.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ since: v9.6.0
1010

1111
> enforce props with default values to be optional
1212
13+
- :gear: This rule is included in all of `"plugin:vue/recommended"`, `*.configs["flat/vue2-recommended"]`, `"plugin:vue/vue3-recommended"` and `*.configs["flat/recommended"]`.
1314
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.
1415
- :bulb: Some problems reported by this rule are manually fixable by editor [suggestions](https://eslint.org/docs/developer-guide/working-with-rules#providing-suggestions).
1516

‎lib/configs/flat/vue2-recommended.js

Copy file name to clipboardExpand all lines: lib/configs/flat/vue2-recommended.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = [
1515
'vue/block-order': 'warn',
1616
'vue/no-lone-template': 'warn',
1717
'vue/no-multiple-slot-args': 'warn',
18+
'vue/no-required-prop-with-default': 'warn',
1819
'vue/no-v-html': 'warn',
1920
'vue/order-in-components': 'warn',
2021
'vue/this-in-template': 'warn'

‎lib/configs/flat/vue3-recommended.js

Copy file name to clipboardExpand all lines: lib/configs/flat/vue3-recommended.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module.exports = [
1515
'vue/block-order': 'warn',
1616
'vue/no-lone-template': 'warn',
1717
'vue/no-multiple-slot-args': 'warn',
18+
'vue/no-required-prop-with-default': 'warn',
1819
'vue/no-v-html': 'warn',
1920
'vue/order-in-components': 'warn',
2021
'vue/this-in-template': 'warn'

‎lib/configs/vue2-recommended.js

Copy file name to clipboardExpand all lines: lib/configs/vue2-recommended.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
'vue/block-order': 'warn',
1111
'vue/no-lone-template': 'warn',
1212
'vue/no-multiple-slot-args': 'warn',
13+
'vue/no-required-prop-with-default': 'warn',
1314
'vue/no-v-html': 'warn',
1415
'vue/order-in-components': 'warn',
1516
'vue/this-in-template': 'warn'

‎lib/configs/vue3-recommended.js

Copy file name to clipboardExpand all lines: lib/configs/vue3-recommended.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
'vue/block-order': 'warn',
1111
'vue/no-lone-template': 'warn',
1212
'vue/no-multiple-slot-args': 'warn',
13+
'vue/no-required-prop-with-default': 'warn',
1314
'vue/no-v-html': 'warn',
1415
'vue/order-in-components': 'warn',
1516
'vue/this-in-template': 'warn'

‎lib/rules/no-required-prop-with-default.js

Copy file name to clipboardExpand all lines: lib/rules/no-required-prop-with-default.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
type: 'problem',
1818
docs: {
1919
description: 'enforce props with default values to be optional',
20-
categories: undefined,
20+
categories: ['vue2-recommended', 'vue3-recommended'],
2121
url: 'https://eslint.vuejs.org/rules/no-required-prop-with-default.html'
2222
},
2323
fixable: 'code',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.