Skip to content

Commit

Permalink
feat(utils): add dependency constraint filtering for RuleTester (#5750
Browse files Browse the repository at this point in the history
)

* feat(utils): add dependency constraint filtering for eslint plugin RuleTester

* address feedback and add more tests

* Update packages/utils/src/eslint-utils/rule-tester/dependencyConstraints.ts

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>

* Update packages/utils/src/eslint-utils/rule-tester/RuleTester.ts

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>

Co-authored-by: Josh Goldberg <git@joshuakgoldberg.com>
  • Loading branch information
bradzacher and JoshuaKGoldberg committed Oct 9, 2022
1 parent 6477f38 commit 121f4c0
Show file tree
Hide file tree
Showing 10 changed files with 1,058 additions and 135 deletions.
1 change: 1 addition & 0 deletions packages/eslint-plugin-internal/jest.config.js
Expand Up @@ -4,4 +4,5 @@
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
...require('../../jest.config.base.js'),
coveragePathIgnorePatterns: ['src/index.ts$', 'src/configs/.*.ts$'],
};
1 change: 1 addition & 0 deletions packages/eslint-plugin/jest.config.js
Expand Up @@ -4,4 +4,5 @@
/** @type {import('@jest/types').Config.InitialOptions} */
module.exports = {
...require('../../jest.config.base.js'),
coveragePathIgnorePatterns: ['src/index.ts$', 'src/configs/.*.ts$'],
};
4 changes: 3 additions & 1 deletion packages/utils/package.json
Expand Up @@ -44,12 +44,14 @@
"@typescript-eslint/types": "5.39.0",
"@typescript-eslint/typescript-estree": "5.39.0",
"eslint-scope": "^5.1.1",
"eslint-utils": "^3.0.0"
"eslint-utils": "^3.0.0",
"semver": "^7.3.7"
},
"peerDependencies": {
"eslint": "^6.0.0 || ^7.0.0 || ^8.0.0"
},
"devDependencies": {
"@typescript-eslint/parser": "5.39.0",
"typescript": "*"
},
"funding": {
Expand Down
130 changes: 0 additions & 130 deletions packages/utils/src/eslint-utils/RuleTester.ts

This file was deleted.

5 changes: 4 additions & 1 deletion packages/utils/src/eslint-utils/batchedSingleLineTests.ts
@@ -1,4 +1,7 @@
import type { InvalidTestCase, ValidTestCase } from '../ts-eslint';
import type {
InvalidTestCase,
ValidTestCase,
} from '../eslint-utils/rule-tester/RuleTester';

/**
* Converts a batch of single line tests into a number of separate test cases.
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/src/eslint-utils/index.ts
Expand Up @@ -3,6 +3,6 @@ export * from './batchedSingleLineTests';
export * from './getParserServices';
export * from './InferTypesFromRule';
export * from './RuleCreator';
export * from './RuleTester';
export * from './rule-tester/RuleTester';
export * from './deepMerge';
export * from './nullThrows';

0 comments on commit 121f4c0

Please sign in to comment.