Skip to content

Commit

Permalink
tweak some sonarjs plugin rules
Browse files Browse the repository at this point in the history
  • Loading branch information
carlansley committed Jan 7, 2025
1 parent 0838895 commit 5ce6c75
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ const tsConfigurations = [
'sonarjs/no-clear-text-protocols': 'off',
'sonarjs/no-duplicate-string': 'off',
'sonarjs/no-empty-test-file': 'off',
'sonarjs/no-exclusive-tests': 'off', // duplicate
'sonarjs/no-identical-functions': 'off',
'sonarjs/no-misleading-array-reverse': 'off',
'sonarjs/pseudo-random': 'off',
Expand Down
2 changes: 1 addition & 1 deletion src/jest.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('top level describe', () => {
assert.equal(0n, 0n);
});

// eslint-disable-next-line no-only-tests/no-only-tests,jest/no-focused-tests,sonarjs/no-exclusive-tests
// eslint-disable-next-line no-only-tests/no-only-tests,jest/no-focused-tests
it.only('focused test', () => {
// do nothing
});
Expand Down
1 change: 0 additions & 1 deletion src/typescript.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ function testHello(_?: string): number {
// eslint-disable-next-line sonarjs/no-undefined-argument
testHello(undefined);

// eslint-disable-next-line sonarjs/generator-without-yield
async function* paginator() {
// no yield required since this is a test file
throw new Error('should not be called');
Expand Down
2 changes: 1 addition & 1 deletion src/typescript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function hello(_?: string): bigint {
// uuid: 'c73bcdcc-2669-4bf6-81d3-e4ae73fb11fd' <- not ok since this is a non-test file
hello();

// eslint-disable-next-line require-yield, sonarjs/generator-without-yield
// eslint-disable-next-line require-yield
async function* paginator() {
throw new Error('should not be called');
}
Expand Down

0 comments on commit 5ce6c75

Please sign in to comment.