Skip to content

Commit

Permalink
[Tests] make tests pass in eslint@6
Browse files Browse the repository at this point in the history
  • Loading branch information
golopot authored and ljharb committed Jun 10, 2019
1 parent 777bb54 commit 3ae3a9a
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .travis.yml
Expand Up @@ -18,7 +18,7 @@ env:
global:
- TEST=true
matrix:
- ESLINT=next
- ESLINT=^6.0.0-0
- ESLINT=5
- ESLINT=4
after_success:
Expand All @@ -32,9 +32,8 @@ matrix:
- node_js: '4'
env: ESLINT=5
- node_js: '4'
env: ESLINT=next
env: ESLINT=^6.0.0-0
- node_js: '6'
env: ESLINT=next
env: ESLINT=^6.0.0-0
allow_failures:
- node_js: '11'
- env: ESLINT=next
1 change: 1 addition & 0 deletions tests/lib/rules/jsx-child-element-spacing.js
Expand Up @@ -7,6 +7,7 @@ const parsers = require('../../helpers/parsers');

const parserOptions = {
sourceType: 'module',
ecmaVersion: 2015,
ecmaFeatures: {
jsx: true
}
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/jsx-closing-tag-location.js
Expand Up @@ -16,6 +16,7 @@ const parsers = require('../../helpers/parsers');

const parserOptions = {
sourceType: 'module',
ecmaVersion: 2015,
ecmaFeatures: {
jsx: true
}
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/jsx-curly-brace-presence.js
Expand Up @@ -18,6 +18,7 @@ const parsers = require('../../helpers/parsers');

const parserOptions = {
sourceType: 'module',
ecmaVersion: 2015,
ecmaFeatures: {
jsx: true
}
Expand Down
1 change: 1 addition & 0 deletions tests/lib/rules/jsx-max-depth.js
Expand Up @@ -16,6 +16,7 @@ const parsers = require('../../helpers/parsers');

const parserOptions = {
sourceType: 'module',
ecmaVersion: 2015,
ecmaFeatures: {
jsx: true
}
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-did-mount-set-state.js
Expand Up @@ -117,7 +117,7 @@ ruleTester.run('no-did-mount-set-state', rule, {
}
}
`,
parser: 'babel-eslint',
parser: parsers.BABEL_ESLINT,
errors: [{
message: 'Do not use setState in componentDidMount'
}]
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/rules/no-did-update-set-state.js
Expand Up @@ -117,7 +117,7 @@ ruleTester.run('no-did-update-set-state', rule, {
}
}
`,
parser: 'babel-eslint',
parser: parsers.BABEL_ESLINT,
errors: [{
message: 'Do not use setState in componentDidUpdate'
}]
Expand Down
3 changes: 2 additions & 1 deletion tests/lib/rules/no-unused-prop-types.js
Expand Up @@ -4376,7 +4376,8 @@ ruleTester.run('no-unused-prop-types', rule, {
line: 11,
column: 8
}]
}, { // None of the props are used issue #1162
}, {
// None of the props are used issue #1162
code: [
'import React from "react"; ',
'var Hello = React.createReactClass({',
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/rules/sort-prop-types.js
Expand Up @@ -447,7 +447,7 @@ ruleTester.run('sort-prop-types', rule, {
options: [{
sortShapeProp: true
}],
parser: 'babel-eslint'
parser: parsers.BABEL_ESLINT
}, {
code: `
const shape = {
Expand Down Expand Up @@ -1674,7 +1674,7 @@ ruleTester.run('sort-prop-types', rule, {
options: [{
sortShapeProp: true
}],
parser: 'babel-eslint',
parser: parsers.BABEL_ESLINT,
errors: [{
message: ERROR_MESSAGE,
line: 4,
Expand Down

0 comments on commit 3ae3a9a

Please sign in to comment.