Skip to content

Commit 1e673d0

Browse files
committed
Fix eslint-plugin/meta-property-ordering lint issues
1 parent 6726117 commit 1e673d0

27 files changed

+53
-52
lines changed

eslint-internal-rules/require-eslint-community.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ module.exports = {
88
categories: ['Internal']
99
},
1010
fixable: 'code',
11+
schema: [],
1112
messages: {
1213
useCommunityPackageInstead:
1314
'Please use `@eslint-community/{{name}}` instead.'
14-
},
15-
schema: []
15+
}
1616
},
1717

1818
/** @param {import('eslint').Rule.RuleContext} context */

lib/rules/define-emits-declaration.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ module.exports = {
1515
url: 'https://eslint.vuejs.org/rules/define-emits-declaration.html'
1616
},
1717
fixable: null,
18-
messages: {
19-
hasArg: 'Use type-based declaration instead of runtime declaration.',
20-
hasTypeArg: 'Use runtime declaration instead of type-based declaration.'
21-
},
2218
schema: [
2319
{
2420
enum: ['type-based', 'runtime']
2521
}
26-
]
22+
],
23+
messages: {
24+
hasArg: 'Use type-based declaration instead of runtime declaration.',
25+
hasTypeArg: 'Use runtime declaration instead of type-based declaration.'
26+
}
2727
},
2828
/** @param {RuleContext} context */
2929
create(context) {

lib/rules/define-props-declaration.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ module.exports = {
1515
url: 'https://eslint.vuejs.org/rules/define-props-declaration.html'
1616
},
1717
fixable: null,
18-
messages: {
19-
hasArg: 'Use type-based declaration instead of runtime declaration.',
20-
hasTypeArg: 'Use runtime declaration instead of type-based declaration.'
21-
},
2218
schema: [
2319
{
2420
enum: ['type-based', 'runtime']
2521
}
26-
]
22+
],
23+
messages: {
24+
hasArg: 'Use type-based declaration instead of runtime declaration.',
25+
hasTypeArg: 'Use runtime declaration instead of type-based declaration.'
26+
}
2727
},
2828
/** @param {RuleContext} context */
2929
create(context) {

lib/rules/html-closing-bracket-spacing.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ module.exports = {
5959
categories: ['vue3-strongly-recommended', 'strongly-recommended'],
6060
url: 'https://eslint.vuejs.org/rules/html-closing-bracket-spacing.html'
6161
},
62+
fixable: 'whitespace',
6263
schema: [
6364
{
6465
type: 'object',
@@ -70,7 +71,6 @@ module.exports = {
7071
additionalProperties: false
7172
}
7273
],
73-
fixable: 'whitespace',
7474
messages: {
7575
missing: "Expected a space before '{{bracket}}', but not found.",
7676
unexpected: "Expected no space before '{{bracket}}', but found."

lib/rules/match-component-file-name.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ function canVerify(node) {
2323

2424
module.exports = {
2525
meta: {
26-
hasSuggestions: true,
2726
type: 'suggestion',
2827
docs: {
2928
description: 'require component name property to match its file name',
3029
categories: undefined,
3130
url: 'https://eslint.vuejs.org/rules/match-component-file-name.html'
3231
},
3332
fixable: null,
33+
hasSuggestions: true,
3434
schema: [
3535
{
3636
type: 'object',

lib/rules/match-component-import-name.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ function getExpectedNames(identifier) {
1818
module.exports = {
1919
meta: {
2020
type: 'problem',
21-
schema: [],
2221
docs: {
2322
description:
2423
'require the registered component name to match the imported component name',
2524
categories: undefined,
2625
url: 'https://eslint.vuejs.org/rules/match-component-import-name.html'
2726
},
2827
fixable: null,
28+
schema: [],
2929
messages: {
3030
unexpected:
3131
'Component alias {{importedName}} should be one of: {{expectedName}}.'

lib/rules/no-child-content.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ function getLocationRange(nodes) {
7070

7171
module.exports = {
7272
meta: {
73-
hasSuggestions: true,
7473
type: 'problem',
7574
docs: {
7675
description:
@@ -79,6 +78,7 @@ module.exports = {
7978
url: 'https://eslint.vuejs.org/rules/no-child-content.html'
8079
},
8180
fixable: null,
81+
hasSuggestions: true,
8282
schema: [
8383
{
8484
type: 'object',

lib/rules/no-invalid-model-keys.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ module.exports = {
66
// eslint-disable-next-line eslint-plugin/prefer-message-ids
77
meta: {
88
...baseRule.meta,
9+
// eslint-disable-next-line eslint-plugin/meta-property-ordering
910
type: baseRule.meta.type,
1011
docs: {
1112
description: baseRule.meta.docs.description,
1213
categories: undefined,
1314
url: 'https://eslint.vuejs.org/rules/no-invalid-model-keys.html'
1415
},
16+
schema: [],
1517
deprecated: true,
16-
replacedBy: ['valid-model-definition'],
17-
schema: []
18+
replacedBy: ['valid-model-definition']
1819
},
1920
/** @param {RuleContext} context */
2021
create(context) {

lib/rules/no-potential-component-option-typo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ const utils = require('../utils')
88
const vueComponentOptions = require('../utils/vue-component-options.json')
99
module.exports = {
1010
meta: {
11-
hasSuggestions: true,
1211
type: 'suggestion',
1312
docs: {
1413
description: 'disallow a potential typo in your component property',
@@ -17,6 +16,7 @@ module.exports = {
1716
url: 'https://eslint.vuejs.org/rules/no-potential-component-option-typo.html'
1817
},
1918
fixable: null,
19+
hasSuggestions: true,
2020
schema: [
2121
{
2222
type: 'object',

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ const utils = require('../utils')
1414

1515
module.exports = {
1616
meta: {
17-
hasSuggestions: true,
1817
type: 'problem',
1918
docs: {
2019
description: 'enforce props with default values to be optional',
2120
categories: undefined,
2221
url: 'https://eslint.vuejs.org/rules/no-required-prop-with-default.html'
2322
},
2423
fixable: 'code',
24+
hasSuggestions: true,
2525
schema: [
2626
{
2727
type: 'object',

lib/rules/no-restricted-class.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,14 +110,14 @@ module.exports = {
110110
categories: undefined
111111
},
112112
fixable: null,
113-
messages: {
114-
forbiddenClass: "'{{class}}' class is not allowed."
115-
},
116113
schema: {
117114
type: 'array',
118115
items: {
119116
type: 'string'
120117
}
118+
},
119+
messages: {
120+
forbiddenClass: "'{{class}}' class is not allowed."
121121
}
122122
},
123123

lib/rules/no-restricted-component-names.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ function createSuggest(property, suggest) {
6868

6969
module.exports = {
7070
meta: {
71-
hasSuggestions: true,
7271
type: 'suggestion',
7372
docs: {
7473
description: 'disallow specific component names',
7574
categories: undefined,
7675
url: 'https://eslint.vuejs.org/rules/no-restricted-component-names.html'
7776
},
7877
fixable: null,
78+
hasSuggestions: true,
7979
schema: {
8080
type: 'array',
8181
items: {

lib/rules/no-restricted-custom-event.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,14 @@ function getCalleeMemberNode(node) {
8888
}
8989
module.exports = {
9090
meta: {
91-
hasSuggestions: true,
9291
type: 'suggestion',
9392
docs: {
9493
description: 'disallow specific custom event',
9594
categories: undefined,
9695
url: 'https://eslint.vuejs.org/rules/no-restricted-custom-event.html'
9796
},
9897
fixable: null,
98+
hasSuggestions: true,
9999
schema: {
100100
type: 'array',
101101
items: {

lib/rules/no-restricted-props.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,14 +53,14 @@ function parseOption(option) {
5353

5454
module.exports = {
5555
meta: {
56-
hasSuggestions: true,
5756
type: 'suggestion',
5857
docs: {
5958
description: 'disallow specific props',
6059
categories: undefined,
6160
url: 'https://eslint.vuejs.org/rules/no-restricted-props.html'
6261
},
6362
fixable: null,
63+
hasSuggestions: true,
6464
schema: {
6565
type: 'array',
6666
items: {

lib/rules/no-unused-vars.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ function isDestructuringVar(variable) {
5151

5252
module.exports = {
5353
meta: {
54-
hasSuggestions: true,
5554
type: 'suggestion',
5655
docs: {
5756
description:
@@ -60,6 +59,7 @@ module.exports = {
6059
url: 'https://eslint.vuejs.org/rules/no-unused-vars.html'
6160
},
6261
fixable: null,
62+
hasSuggestions: true,
6363
schema: [
6464
{
6565
type: 'object',

lib/rules/no-useless-mustaches.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@ function stripQuotesForHTML(text) {
3131

3232
module.exports = {
3333
meta: {
34+
type: 'suggestion',
3435
docs: {
3536
description: 'disallow unnecessary mustache interpolations',
3637
categories: undefined,
3738
url: 'https://eslint.vuejs.org/rules/no-useless-mustaches.html'
3839
},
3940
fixable: 'code',
40-
messages: {
41-
unexpected:
42-
'Unexpected mustache interpolation with a string literal value.'
43-
},
4441
schema: [
4542
{
4643
type: 'object',
@@ -55,7 +52,10 @@ module.exports = {
5552
additionalProperties: false
5653
}
5754
],
58-
type: 'suggestion'
55+
messages: {
56+
unexpected:
57+
'Unexpected mustache interpolation with a string literal value.'
58+
}
5959
},
6060
/** @param {RuleContext} context */
6161
create(context) {

lib/rules/no-useless-v-bind.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ const SINGLE_QUOTES_RE = /'/gu
1111

1212
module.exports = {
1313
meta: {
14+
type: 'suggestion',
1415
docs: {
1516
description: 'disallow unnecessary `v-bind` directives',
1617
categories: undefined,
1718
url: 'https://eslint.vuejs.org/rules/no-useless-v-bind.html'
1819
},
1920
fixable: 'code',
20-
messages: {
21-
unexpected: 'Unexpected `v-bind` with a string literal value.'
22-
},
2321
schema: [
2422
{
2523
type: 'object',
@@ -34,7 +32,9 @@ module.exports = {
3432
additionalProperties: false
3533
}
3634
],
37-
type: 'suggestion'
35+
messages: {
36+
unexpected: 'Unexpected `v-bind` with a string literal value.'
37+
}
3838
},
3939
/** @param {RuleContext} context */
4040
create(context) {

lib/rules/require-emit-validator.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@ const utils = require('../utils')
1212

1313
module.exports = {
1414
meta: {
15-
hasSuggestions: true,
1615
type: 'suggestion',
1716
docs: {
1817
description: 'require type definitions in emits',
1918
categories: undefined,
2019
url: 'https://eslint.vuejs.org/rules/require-emit-validator.html'
2120
},
2221
fixable: null,
22+
hasSuggestions: true,
23+
schema: [],
2324
messages: {
2425
missing: 'Emit "{{name}}" should define at least its validator function.',
2526
skipped:
2627
'Emit "{{name}}" should not skip validation, or you may define a validator function with no parameters.',
2728
emptyValidation: 'Replace with a validator function with no parameters.'
28-
},
29-
schema: []
29+
}
3030
},
3131
/** @param {RuleContext} context */
3232
create(context) {

lib/rules/require-explicit-emits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,14 @@ function getNameParamNode(node) {
7373

7474
module.exports = {
7575
meta: {
76-
hasSuggestions: true,
7776
type: 'suggestion',
7877
docs: {
7978
description: 'require `emits` option with name triggered by `$emit()`',
8079
categories: ['vue3-strongly-recommended'],
8180
url: 'https://eslint.vuejs.org/rules/require-explicit-emits.html'
8281
},
8382
fixable: null,
83+
hasSuggestions: true,
8484
schema: [
8585
{
8686
type: 'object',

lib/rules/require-expose.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ function getCalleeMemberNode(node) {
5555

5656
module.exports = {
5757
meta: {
58-
hasSuggestions: true,
5958
type: 'suggestion',
6059
docs: {
6160
description: 'require declare public properties using `expose`',
6261
categories: undefined,
6362
url: 'https://eslint.vuejs.org/rules/require-expose.html'
6463
},
6564
fixable: null,
65+
hasSuggestions: true,
6666
schema: [],
6767
messages: {
6868
requireExpose:

lib/rules/require-macro-variable-name.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ const DEFAULT_OPTIONS = {
1616

1717
module.exports = {
1818
meta: {
19-
hasSuggestions: true,
2019
type: 'suggestion',
2120
docs: {
2221
description: 'require a certain macro variable name',
2322
categories: undefined,
2423
url: 'https://eslint.vuejs.org/rules/require-macro-variable-name.html'
2524
},
2625
fixable: null,
26+
hasSuggestions: true,
2727
schema: [
2828
{
2929
type: 'object',

lib/rules/require-typed-object-prop.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ module.exports = {
120120
url: 'https://eslint.vuejs.org/rules/require-typed-object-prop.html'
121121
},
122122
fixable: null,
123-
schema: [],
124123
hasSuggestions: true,
124+
schema: [],
125125
messages: {
126126
expectedTypeAnnotation: 'Expected type annotation on object prop.',
127127
addTypeAnnotation: 'Add `{{ type }}` type annotation.'

0 commit comments

Comments
 (0)