Skip to content

Commit

Permalink
feat: disable some rules on plain .js
Browse files Browse the repository at this point in the history
  • Loading branch information
entomb committed Mar 12, 2024
1 parent f552dac commit f8ade20
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/configs/typescript.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,7 @@ export default {
extends: ["eslint:recommended"],
overrides: [
{
files: ["*.ts", "*.tsx", "*.d.ts"],
extends: ["plugin:@typescript-eslint/recommended"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
files: ["*.js", "*.mjs", "*.cjs", "*.jsx", "*.ts", "*.tsx", "*.d.ts"],
rules: {
// disable non-typescript rules
"import/no-anonymous-default-export": "off",
Expand All @@ -22,7 +16,17 @@ export default {
"require-await": "off",
"prefer-promise-reject-errors": "off",
"no-throw-literal": "off",

},
},
{
files: ["*.ts", "*.tsx", "*.d.ts"],
extends: ["plugin:@typescript-eslint/recommended"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
},
rules: {
// off
"@typescript-eslint/require-await": "off",
"@typescript-eslint/no-var-requires": "off",
Expand Down

0 comments on commit f8ade20

Please sign in to comment.