-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated eslint-plugin-sonarjs #178
base: main
Are you sure you want to change the base?
Conversation
package.json
Outdated
@@ -59,7 +59,7 @@ | |||
"eslint-plugin-n": "17.11.1", | |||
"eslint-plugin-no-only-tests": "3.3.0", | |||
"eslint-plugin-no-secrets": "1.0.2", | |||
"eslint-plugin-sonarjs": "1.0.4", | |||
"eslint-plugin-sonarjs": "^2.0.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just noticed we have a ^
on this and other peer deps, everything should be fixed to a specific version
is it possible to have a rough list of significant changes, e.g. it seems require every file to have a peer test file which might not be the case for us. |
It looks like test files should contain at least one test case, https://sonarsource.github.io/rspec/#/rspec/S2187/javascript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few questions
index.mjs
Outdated
@@ -182,6 +182,8 @@ const tsConfigurations = [ | |||
// typeof any === "evil". | |||
'@typescript-eslint/no-explicit-any': 'error', | |||
|
|||
'sonarjs/no-empty-function': 'off', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder why these 2 rules are disabled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like v3 doesn't worry about about empty function, unused expression and this was earlier added to handle eslint error in index.ts
package.json
Outdated
@@ -60,7 +60,7 @@ | |||
"eslint-plugin-n": "17.15.1", | |||
"eslint-plugin-no-only-tests": "3.3.0", | |||
"eslint-plugin-no-secrets": "2.1.1", | |||
"eslint-plugin-sonarjs": "1.0.4", | |||
"eslint-plugin-sonarjs": "2.0.4", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i wonder if we want to pin v2 or upgrade to v3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will upgrade to v3. when i started , we have only v2
Beta Published - Install Command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a quick comment
@@ -15,14 +16,16 @@ function testHello(_?: string): number { | |||
|
|||
[].forEach((_lib) => { | |||
// do nothing | |||
// eslint-disable-next-line @typescript-eslint/no-shadow,sonarjs/prefer-immediate-return,eqeqeq | |||
// eslint-disable-next-line @typescript-eslint/no-shadow,eqeqeq |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this eqeqeq typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added earlier as part of https://eslint.org/docs/latest/rules/eqeqeq to disable rule
❌ PR review status - has 1 reviewer outstanding |
Closes #169