Skip to content

Commit fd6b3e1

Browse files
authored
Supports ESLint v7.x (#1077)
* Supports ESLint v7.x * update
1 parent 9d559b2 commit fd6b3e1

6 files changed

+38
-19
lines changed

.circleci/config.yml

+20-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ workflows:
55
- node-v8
66
- node-v10
77
- node-v12
8+
- node-v14
89

910
version: 2
1011
jobs:
@@ -31,9 +32,23 @@ jobs:
3132
command: npm test
3233

3334
node-v8:
34-
<<: *node-base
3535
docker:
3636
- image: node:8
37+
steps:
38+
- run:
39+
name: Versions
40+
command: npm version
41+
- checkout
42+
- run:
43+
name: Install eslint@6
44+
command: |
45+
npm install -D [email protected]
46+
- run:
47+
name: Install dependencies
48+
command: npm install
49+
- run:
50+
name: Test
51+
command: npm test
3752
node-v10:
3853
<<: *node-base
3954
docker:
@@ -42,3 +57,7 @@ jobs:
4257
<<: *node-base
4358
docker:
4459
- image: node:12
60+
node-v14:
61+
<<: *node-base
62+
docker:
63+
- image: node:14

.eslintrc.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ module.exports = {
2727
overrides: [{
2828
files: ['lib/rules/*.js'],
2929
rules: {
30-
"consistent-docs-description": "error",
31-
"no-invalid-meta": "error",
32-
"no-invalid-meta-docs-categories": "error",
30+
'consistent-docs-description': 'error',
31+
'no-invalid-meta': 'error',
32+
'no-invalid-meta-docs-categories': 'error',
3333
'eslint-plugin/require-meta-type': 'error',
34-
"require-meta-docs-url": ["error", {
35-
"pattern": `https://eslint.vuejs.org/rules/{{name}}.html`
34+
'require-meta-docs-url': ['error', {
35+
'pattern': `https://eslint.vuejs.org/rules/{{name}}.html`
3636
}]
3737
}
3838
}]

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"node": ">=8.10"
4848
},
4949
"peerDependencies": {
50-
"eslint": "^5.0.0 || ^6.0.0"
50+
"eslint": "^6.0.0 || ^7.0.0"
5151
},
5252
"dependencies": {
5353
"eslint-utils": "^2.0.0",
@@ -62,7 +62,7 @@
6262
"acorn": "^7.1.0",
6363
"babel-eslint": "^10.0.2",
6464
"chai": "^4.1.0",
65-
"eslint": "^6.0.0",
65+
"eslint": "^7.0.0",
6666
"eslint-plugin-eslint-plugin": "^2.0.1",
6767
"eslint-plugin-import": "^2.18.2",
6868
"eslint-plugin-vue": "file:.",

tests/lib/rules/attributes-order.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -625,23 +625,23 @@ tester.run('attributes-order', rule, {
625625
errors: [
626626
{
627627
message: 'Attribute "is" should go before "v-once".',
628-
nodeType: 'VIdentifier'
628+
type: 'VIdentifier'
629629
},
630630
{
631631
message: 'Attribute "v-on:click" should go before "v-once".',
632-
nodeType: 'VDirectiveKey'
632+
type: 'VDirectiveKey'
633633
},
634634
{
635635
message: 'Attribute "ref" should go before "v-once".',
636-
nodeType: 'VIdentifier'
636+
type: 'VIdentifier'
637637
},
638638
{
639639
message: 'Attribute "id" should go before "v-text".',
640-
nodeType: 'VIdentifier'
640+
type: 'VIdentifier'
641641
},
642642
{
643643
message: 'Attribute "myProp" should go before "v-text".',
644-
nodeType: 'VIdentifier'
644+
type: 'VIdentifier'
645645
}
646646
]
647647
},
@@ -683,7 +683,7 @@ tester.run('attributes-order', rule, {
683683
errors: [
684684
{
685685
message: 'Attribute "v-if" should go before "class".',
686-
nodeType: 'VIdentifier'
686+
type: 'VDirectiveKey'
687687
}
688688
]
689689
},
@@ -709,7 +709,7 @@ tester.run('attributes-order', rule, {
709709
errors: [
710710
{
711711
message: 'Attribute "v-slot" should go before "v-model".',
712-
nodeType: 'VIdentifier'
712+
type: 'VDirectiveKey'
713713
}
714714
]
715715
},

tests/lib/rules/multiline-html-element-content-newline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,15 @@ content
286286
message: 'Expected 1 line break after opening tag (`<div>`), but no line breaks found.',
287287
line: 5,
288288
column: 12,
289-
nodeType: 'HTMLTagClose',
289+
type: 'HTMLTagClose',
290290
endLine: 5,
291291
endColumn: 12
292292
},
293293
{
294294
message: 'Expected 1 line break before closing tag (`</div>`), but no line breaks found.',
295295
line: 5,
296296
column: 19,
297-
nodeType: 'HTMLEndTagOpen',
297+
type: 'HTMLEndTagOpen',
298298
endLine: 5,
299299
endColumn: 19
300300
}

tests/lib/rules/singleline-html-element-content-newline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ content
227227
message: 'Expected 1 line break after opening tag (`<div>`), but no line breaks found.',
228228
line: 3,
229229
column: 30,
230-
nodeType: 'HTMLTagClose',
230+
type: 'HTMLTagClose',
231231
endLine: 3,
232232
endColumn: 30
233233
},
234234
{
235235
message: 'Expected 1 line break before closing tag (`</div>`), but no line breaks found.',
236236
line: 3,
237237
column: 37,
238-
nodeType: 'HTMLEndTagOpen',
238+
type: 'HTMLEndTagOpen',
239239
endLine: 3,
240240
endColumn: 37
241241
}

0 commit comments

Comments
 (0)