Skip to content
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

Fix ESLint plugin type dependencies #4782

Merged
merged 6 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions its/eslint8-plugin-sonarjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"test": "node index.test.js"
},
"devDependencies": {
"@types/eslint": "^8.56.12",
"cross-spawn": "7.0.3",
"eslint": "8.57.0",
"eslint-plugin-import": "2.29.1",
Expand Down
4 changes: 3 additions & 1 deletion its/eslint8-plugin-sonarjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"module": "NodeNext",
"target": "es6",
"allowJs": true,
"moduleResolution": "NodeNext"
"moduleResolution": "NodeNext",
"skipLibCheck": false,
"strict": true
},
"files": ["tseslint.config.mjs"]
}
2 changes: 1 addition & 1 deletion its/eslint8-plugin-sonarjs/tseslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import plugin from 'eslint-plugin-sonarjs';
import tseslint from 'typescript-eslint';

console.log(`Loaded ${Object.keys(plugin.configs.recommended.rules).length} rules`);
console.log(`Loaded ${Object.keys(plugin.configs.recommended.rules ?? {}).length} rules`);

export default tseslint.config(plugin.configs.recommended);
1 change: 1 addition & 0 deletions its/eslint9-plugin-sonarjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"test": "node index.test.js"
},
"devDependencies": {
"@types/eslint": "^8.56.12",
"cross-spawn": "7.0.3",
"eslint": "8.57.0",
"eslint-plugin-import": "2.29.1",
Expand Down
4 changes: 3 additions & 1 deletion its/eslint9-plugin-sonarjs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"module": "NodeNext",
"target": "es6",
"allowJs": true,
"moduleResolution": "NodeNext"
"moduleResolution": "NodeNext",
"skipLibCheck": false,
"strict": true
},
"files": ["tseslint.config.mjs"]
}
2 changes: 1 addition & 1 deletion its/eslint9-plugin-sonarjs/tseslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
import plugin from 'eslint-plugin-sonarjs';
import tseslint from 'typescript-eslint';

console.log(`Loaded ${Object.keys(plugin.configs.recommended.rules).length} rules`);
console.log(`Loaded ${Object.keys(plugin.configs.recommended.rules ?? {}).length} rules`);

export default tseslint.config(plugin.configs.recommended);
1 change: 1 addition & 0 deletions its/plugin/sonarlint-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

<artifactId>javascript-it-plugin-sonarlint-tests</artifactId>
<name>JavaScript :: IT :: Plugin :: SonarLint Tests</name>
<packaging>pom</packaging>

<properties>
<surefire.argLine>-server</surefire.argLine>
Expand Down
3 changes: 2 additions & 1 deletion packages/jsts/src/rules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ SonarJS rules for ESLint to help developers produce [Clean Code](https://www.son
## Prerequisites

- Node.js (>=16.x).
- ESLint 8.x or 9.x (peer dependency for the plugin).
- ESLint 8.x (version 9.X not yet supported)
- typescript-eslint/parser 7.X (version 8.X not yet supported)

## Usage

Expand Down
Loading
Loading