Skip to content

Commit

Permalink
fix: πŸ› disable typescript-eslint/no-unsafe- in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Nov 7, 2024
1 parent fcda1ae commit 8369d08
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/configs/__snapshots__/typescript.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -8905,5 +8905,19 @@ If your function does not access \`this\`, you can annotate it with \`this: void
"@typescript-eslint/use-unknown-in-catch-callback-variable": "off",
},
},
{
"files": [
"**/__tests__/**/*.?([cm])[jt]s?(x)",
"**/*.spec.?([cm])[jt]s?(x)",
"**/*.test.?([cm])[jt]s?(x)",
"**/*.bench.?([cm])[jt]s?(x)",
"**/*.benchmark.?([cm])[jt]s?(x)",
],
"name": "jimmy.codes/typescript/testing",
"rules": {
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
},
]
`;
10 changes: 9 additions & 1 deletion src/configs/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { config, configs } from "typescript-eslint";

import type { TypescriptOptions } from "../types";

import { GLOB_JS, GLOB_JSX } from "../constants";
import { GLOB_JS, GLOB_JSX, GLOB_TESTS } from "../constants";

const typescriptConfig = (options: TypescriptOptions) => {
return config(
Expand Down Expand Up @@ -42,6 +42,14 @@ const typescriptConfig = (options: TypescriptOptions) => {
files: [GLOB_JS, GLOB_JSX],
...configs.disableTypeChecked,
},
{
files: GLOB_TESTS,
name: "jimmy.codes/typescript/testing",
rules: {
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
},
},
);
};

Expand Down

0 comments on commit 8369d08

Please sign in to comment.