Skip to content

Commit 66502df

Browse files
committed
test: restore tests; reapply check-examples testing for eslint@7
1 parent 4649a37 commit 66502df

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: test/rules/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
import camelCase from 'camelcase';
22
import {
3+
ESLint,
34
RuleTester,
45
} from 'eslint';
56
import defaultsDeep from 'lodash.defaultsdeep';
7+
import semver from 'semver';
68
import config from '../../src';
79
import ruleNames from './ruleNames.json';
810

911
const ruleTester = new RuleTester();
1012

1113
const main = async () => {
1214
for (const ruleName of process.env.npm_config_rule ? process.env.npm_config_rule.split(',') : ruleNames) {
13-
if (ruleName === 'check-examples') {
15+
if (semver.gte(ESLint.version, '8.0.0') && ruleName === 'check-examples') {
1416
// TODO: This rule cannot yet be supported for ESLint 8;
1517
// The possibility for ESLint 8 support is being tracked at https://github.com/eslint/eslint/issues/14745
16-
return;
18+
continue;
1719
}
1820

1921
const rule = config.rules[ruleName];

0 commit comments

Comments
 (0)