Skip to content

Commit

Permalink
fix: allow disabling sonar rules
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Oct 6, 2024
1 parent c1ea0a0 commit f35b2d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export async function rsEslint(
toml: tomlOptions = false,
markdown: markdownOptions = false,
formatters: formattersOptions = true,
sonar: sonarOptions = true,
mode,
projectRoot,
} = options;
Expand Down Expand Up @@ -203,7 +204,6 @@ export async function rsEslint(
}),
promise(),
regexp(),
sonar(functionalConfigOptions),
comments(),
unicorn(),
node(),
Expand All @@ -213,6 +213,10 @@ export async function rsEslint(
componentExts.push("vue");
}

if (sonarOptions) {
m_configs.push(sonar(functionalConfigOptions));
}

if (jsxOptions) {
m_configs.push(jsx());
}
Expand Down
5 changes: 5 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ export type OptionsConfig = {
*/
autoRenamePlugins?: boolean;

/**
* Enable SonarJS rules.
*/
sonar?: boolean;

ignores?: OptionsIgnores;

/**
Expand Down

0 comments on commit f35b2d1

Please sign in to comment.