Skip to content

Commit

Permalink
test(eslint-plugin): include disable-type-checked.ts config in conf…
Browse files Browse the repository at this point in the history
…igs tests (#8044)

* test(eslint-plugin): include `disable-type-checked.ts` config in configs tests

* chore: trigger ci
  • Loading branch information
auvred committed Dec 11, 2023
1 parent 3175843 commit 7ec3022
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/eslint-plugin/tests/configs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,21 @@ describe('all.ts', () => {
itHasBaseRulesOverriden(unfilteredConfigRules);
});

describe('disable-type-checked.ts', () => {
const unfilteredConfigRules: Record<string, string> =
plugin.configs['disable-type-checked'].rules;

it('disables all type checked rules', () => {
const configRules = filterRules(unfilteredConfigRules);

const ruleConfigs: [string, string][] = Object.entries(rules)
.filter(([, rule]) => rule.meta.docs?.requiresTypeChecking)
.map(([name]) => [`${RULE_NAME_PREFIX}${name}`, 'off']);

expect(entriesToObject(ruleConfigs)).toEqual(entriesToObject(configRules));
});
});

describe('recommended.ts', () => {
const unfilteredConfigRules: Record<string, string> =
plugin.configs.recommended.rules;
Expand Down

0 comments on commit 7ec3022

Please sign in to comment.