Skip to content

Commit

Permalink
sonarjs disables
Browse files Browse the repository at this point in the history
  • Loading branch information
nirtamir2 committed Sep 24, 2024
1 parent e5e91a5 commit 6195044
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 0 additions & 1 deletion eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export default nirtamir2(
"sonarjs/no-duplicate-string": "off",
"sonarjs/no-gratuitous-expressions": "off",
"sonarjs/no-nested-template-literals": "off",
"sonarjs/sonar-no-fallthrough": "off",
"sonarjs/cognitive-complexity": "off",
"sonarjs/no-nested-conditional": "off",
"sonarjs/no-commented-code": "off",
Expand Down
13 changes: 12 additions & 1 deletion src/configs/javascript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export async function javascript(
{ enforceForClassMembers: true, setWithoutGet: true },
],

'antfu/no-top-level-await': 'error',
"antfu/no-top-level-await": "error",
"array-callback-return": "error",
"block-scoped-var": "error",
"constructor-super": "error",
Expand Down Expand Up @@ -411,6 +411,17 @@ export async function javascript(
}),
eslintPluginNoUseExtendNative.configs.recommended,
sonarjs.configs.recommended,
{
name: "nirtami2/javascript/sonar/disables",
rules: {
"sonarjs/new-cap": "off", // sometimes I want api.GET()
"sonarjs/todo-tag": "off", // somtimes I want TODO: stuff

// Bugs in SonarJs
"sonarjs/sonar-no-fallthrough": "off", // error when using ESLint 9
"sonarjs/void-use": "off", // false positive on promises
},
},
...compat.extends("plugin:clsx/recommended"),
];
}

0 comments on commit 6195044

Please sign in to comment.