Skip to content

Commit

Permalink
test: restore tests; reapply check-examples testing for eslint@7
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Nov 29, 2021
1 parent 4649a37 commit 66502df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/rules/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
import camelCase from 'camelcase';
import {
ESLint,
RuleTester,
} from 'eslint';
import defaultsDeep from 'lodash.defaultsdeep';
import semver from 'semver';
import config from '../../src';
import ruleNames from './ruleNames.json';

const ruleTester = new RuleTester();

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

const rule = config.rules[ruleName];
Expand Down

0 comments on commit 66502df

Please sign in to comment.