Skip to content

Commit

Permalink
[Tests] a no-typos test fails in eslint v7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
toshi-toma authored and ljharb committed Jun 25, 2020
1 parent b8e91a5 commit a4025bd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/lib/rules/no-typos.js
Expand Up @@ -8,6 +8,8 @@
// Requirements
// -----------------------------------------------------------------------------

const semver = require('semver');
const eslintPkg = require('eslint/package.json');
const RuleTester = require('eslint').RuleTester;
const rule = require('../../../lib/rules/no-typos');

Expand Down Expand Up @@ -1286,15 +1288,15 @@ ruleTester.run('no-typos', rule, {
}, {
message: 'Typo in prop type chain qualifier: isrequired'
}]
}, {
}].concat(semver.satisfies(eslintPkg.version, '>= 7.3') ? [] : {
code: `
import 'react';
class Component extends React.Component {};
`,
parser: parsers.BABEL_ESLINT,
parserOptions,
errors: []
}, {
}, [{
code: `
import { PropTypes } from 'react';
class Component extends React.Component {};
Expand Down Expand Up @@ -1698,5 +1700,5 @@ ruleTester.run('no-typos', rule, {
parserOptions: parserOptions
},
*/
}]
}])
});

0 comments on commit a4025bd

Please sign in to comment.