Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
vdiez committed Dec 19, 2024
1 parent 9b82f33 commit d66145e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/ruling/tests/tools/testProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export function setupBeforeAll(projectFile: string) {
sonarlint: false,
bundles: [],
});
await initializeRules(rules);
await initializeRules(rules, project);
});

return {
Expand All @@ -106,14 +106,19 @@ export function setupBeforeAll(projectFile: string) {
rules,
};
}
async function initializeRules(rules: RuleConfig[]) {
await initializeLinter(rules, DEFAULT_ENVIRONMENTS, DEFAULT_GLOBALS);
async function initializeRules(rules: RuleConfig[], project: RulingInput) {
await initializeLinter(
rules,
DEFAULT_ENVIRONMENTS,
DEFAULT_GLOBALS,
path.join(jsTsProjectsPath, project.folder ?? project.name),
);
const htmlRules = rules.filter(rule => rule.key !== 'S3504');
await initializeLinter(
htmlRules,
DEFAULT_ENVIRONMENTS,
DEFAULT_GLOBALS,
undefined,
path.join(jsTsProjectsPath, project.folder ?? project.name),
HTML_LINTER_ID,
);
}
Expand Down

0 comments on commit d66145e

Please sign in to comment.