Skip to content

Commit

Permalink
feat: new config to disable all rules that require type info
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Mar 10, 2024
1 parent 6f322b9 commit af30f15
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/configs/disable-type-checked.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { type Linter } from "@typescript-eslint/utils/ts-eslint";

import { rules } from "#eslint-plugin-functional/rules";

const config: Linter.Config = {
rules: Object.fromEntries(
Object.entries(rules)
.filter(([, rule]) => rule.meta.docs?.requiresTypeChecking === true)
.map(([name]) => [`functional/${name}`, "off"]),
),
};

export default config;
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { type Linter } from "@typescript-eslint/utils/ts-eslint";

import all from "#eslint-plugin-functional/configs/all";
import currying from "#eslint-plugin-functional/configs/currying";
import disableTypeChecked from "#eslint-plugin-functional/configs/disable-type-checked";
import externalTypeScriptRecommended from "#eslint-plugin-functional/configs/external-typescript-recommended";
import externalVanillaRecommended from "#eslint-plugin-functional/configs/external-vanilla-recommended";
import lite from "#eslint-plugin-functional/configs/lite";
Expand All @@ -23,6 +24,7 @@ const config: Linter.Plugin = {
recommended,
strict,
off,
"disable-type-checked": disableTypeChecked,
"external-vanilla-recommended": externalVanillaRecommended,
"external-typescript-recommended": externalTypeScriptRecommended,
currying,
Expand Down

0 comments on commit af30f15

Please sign in to comment.