Skip to content

Commit 3ae3a9a

Browse files
golopotljharb
authored andcommitted
[Tests] make tests pass in eslint@6
1 parent 777bb54 commit 3ae3a9a

9 files changed

+13
-9
lines changed

.travis.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
global:
1919
- TEST=true
2020
matrix:
21-
- ESLINT=next
21+
- ESLINT=^6.0.0-0
2222
- ESLINT=5
2323
- ESLINT=4
2424
after_success:
@@ -32,9 +32,8 @@ matrix:
3232
- node_js: '4'
3333
env: ESLINT=5
3434
- node_js: '4'
35-
env: ESLINT=next
35+
env: ESLINT=^6.0.0-0
3636
- node_js: '6'
37-
env: ESLINT=next
37+
env: ESLINT=^6.0.0-0
3838
allow_failures:
3939
- node_js: '11'
40-
- env: ESLINT=next

tests/lib/rules/jsx-child-element-spacing.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const parsers = require('../../helpers/parsers');
77

88
const parserOptions = {
99
sourceType: 'module',
10+
ecmaVersion: 2015,
1011
ecmaFeatures: {
1112
jsx: true
1213
}

tests/lib/rules/jsx-closing-tag-location.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const parsers = require('../../helpers/parsers');
1616

1717
const parserOptions = {
1818
sourceType: 'module',
19+
ecmaVersion: 2015,
1920
ecmaFeatures: {
2021
jsx: true
2122
}

tests/lib/rules/jsx-curly-brace-presence.js

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const parsers = require('../../helpers/parsers');
1818

1919
const parserOptions = {
2020
sourceType: 'module',
21+
ecmaVersion: 2015,
2122
ecmaFeatures: {
2223
jsx: true
2324
}

tests/lib/rules/jsx-max-depth.js

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const parsers = require('../../helpers/parsers');
1616

1717
const parserOptions = {
1818
sourceType: 'module',
19+
ecmaVersion: 2015,
1920
ecmaFeatures: {
2021
jsx: true
2122
}

tests/lib/rules/no-did-mount-set-state.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ ruleTester.run('no-did-mount-set-state', rule, {
117117
}
118118
}
119119
`,
120-
parser: 'babel-eslint',
120+
parser: parsers.BABEL_ESLINT,
121121
errors: [{
122122
message: 'Do not use setState in componentDidMount'
123123
}]

tests/lib/rules/no-did-update-set-state.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ ruleTester.run('no-did-update-set-state', rule, {
117117
}
118118
}
119119
`,
120-
parser: 'babel-eslint',
120+
parser: parsers.BABEL_ESLINT,
121121
errors: [{
122122
message: 'Do not use setState in componentDidUpdate'
123123
}]

tests/lib/rules/no-unused-prop-types.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -4376,7 +4376,8 @@ ruleTester.run('no-unused-prop-types', rule, {
43764376
line: 11,
43774377
column: 8
43784378
}]
4379-
}, { // None of the props are used issue #1162
4379+
}, {
4380+
// None of the props are used issue #1162
43804381
code: [
43814382
'import React from "react"; ',
43824383
'var Hello = React.createReactClass({',

tests/lib/rules/sort-prop-types.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ ruleTester.run('sort-prop-types', rule, {
447447
options: [{
448448
sortShapeProp: true
449449
}],
450-
parser: 'babel-eslint'
450+
parser: parsers.BABEL_ESLINT
451451
}, {
452452
code: `
453453
const shape = {
@@ -1674,7 +1674,7 @@ ruleTester.run('sort-prop-types', rule, {
16741674
options: [{
16751675
sortShapeProp: true
16761676
}],
1677-
parser: 'babel-eslint',
1677+
parser: parsers.BABEL_ESLINT,
16781678
errors: [{
16791679
message: ERROR_MESSAGE,
16801680
line: 4,

0 commit comments

Comments
 (0)