Skip to content

Commit 02261de

Browse files
authored
Update dependencies of ESLint plugin (#63)
* Update dependencies of ESLint plugin * Update SonarQube scan action in CI workflow
1 parent 0acbfd1 commit 02261de

File tree

10 files changed

+1537
-1578
lines changed

10 files changed

+1537
-1578
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
working-directory: sonar-plugin
5353

5454
- name: SonarCloud Scan
55-
uses: SonarSource/sonarcloud-github-action@master
55+
uses: SonarSource/sonarqube-scan-action@master
5656
if: |
5757
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
5858
matrix.node-version == '20.x' &&

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ The standalone version of the ESLint plugin is available from [npmjs](https://np
4848

4949
| Plugins Version | SonarQube version | ESLint version |
5050
| --------------- | ----------------- | -------------- |
51-
| 1.4.+, 1.5.+ | 9.9.+ LTA to 25.1 | 7+ |
51+
| 2.+ | 9.9.+ LTA to 25.1 | 7+ |
52+
| 1.4, 1.5 | 9.9.+ LTA to 10.7 | 7+ |
5253

5354
## 🤝 Contribution
5455

eslint-plugin/.yarn/releases/yarn-4.1.1.cjs

Lines changed: 0 additions & 893 deletions
This file was deleted.

eslint-plugin/.yarn/releases/yarn-4.6.0.cjs

Lines changed: 934 additions & 0 deletions
Large diffs are not rendered by default.

eslint-plugin/.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ enableGlobalCache: false
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.1.1.cjs
7+
yarnPath: .yarn/releases/yarn-4.6.0.cjs

eslint-plugin/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ Add `@creedengo` to the `plugins` section of your `.eslintrc`, followed by rules
5757
}
5858
```
5959

60+
## ⚙ Configs
61+
62+
<!-- begin auto-generated configs list -->
63+
64+
| | Name |
65+
| :- | :------------ |
66+
|| `recommended` |
67+
68+
<!-- end auto-generated configs list -->
69+
6070
## 🔨 Rules
6171

6272
<!-- begin auto-generated rules list -->

eslint-plugin/docs/rules/no-import-all-from-library.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,15 @@ leading to faster execution and improved overall performance.
1717

1818
## Options
1919

20+
<!-- begin auto-generated rule options list -->
21+
22+
| Name | Type |
23+
| :------------------------------------- | :------- |
24+
| `importByNamespaceNotAllowedLibraries` | String[] |
25+
| `notAllowedLibraries` | String[] |
26+
27+
<!-- end auto-generated rule options list -->
28+
2029
You can externally add your own libraries to be checked.
2130
To add your own libraries you need to modify your .eslintrc.js by adding the following rule configuration:
2231

@@ -52,10 +61,10 @@ import _ from "underscore";
5261

5362
**Size of your bundle, if you use the whole lodash library:**
5463

55-
* **index.js - 531.46 KB**
56-
* node_modules/lodash - 531.35 KB
57-
* lodash.js - 531.35 KB
58-
* index.js - 112 B
64+
- **index.js - 531.46 KB**
65+
- node_modules/lodash - 531.35 KB
66+
- lodash.js - 531.35 KB
67+
- index.js - 112 B
5968

6069
---
6170

@@ -72,13 +81,13 @@ import map from "underscore/modules/map.js";
7281

7382
Size of your bundle, if you use only the "isEmpty" method:
7483

75-
* **index.js - 24.42 KB**
76-
* node_modules/lodash - 24.31 KB
77-
* isEmpty - 1.95 KB
78-
* _nodeUtil.js - 995 B
79-
* isArrayLike.js - 830 B
80-
* ...
81-
* index.js - 110 B
84+
- **index.js - 24.42 KB**
85+
- node_modules/lodash - 24.31 KB
86+
- isEmpty - 1.95 KB
87+
- \_nodeUtil.js - 995 B
88+
- isArrayLike.js - 830 B
89+
- ...
90+
- index.js - 110 B
8291

8392
## Resources
8493

eslint-plugin/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,27 +32,27 @@
3232
"update:eslint-docs": "eslint-doc-generator"
3333
},
3434
"devDependencies": {
35-
"@typescript-eslint/eslint-plugin": "^5.62.0",
36-
"@typescript-eslint/parser": "^5.62.0",
37-
"eslint": "^8.56.0",
35+
"@typescript-eslint/eslint-plugin": "^6.4.1",
36+
"@typescript-eslint/parser": "^6.4.1",
37+
"eslint": "^8.57.1",
3838
"eslint-config-prettier": "^9.1.0",
39-
"eslint-doc-generator": "^1.7.0",
40-
"eslint-plugin-eslint-plugin": "^5.4.0",
41-
"eslint-plugin-license-header": "^0.6.0",
39+
"eslint-doc-generator": "1.7.0",
40+
"eslint-plugin-eslint-plugin": "^6.4.0",
41+
"eslint-plugin-license-header": "^0.6.1",
4242
"eslint-plugin-node": "^11.1.0",
43-
"eslint-plugin-prettier": "^5.1.3",
43+
"eslint-plugin-prettier": "^5.2.3",
4444
"mkdirp": "^3.0.1",
45-
"mocha": "^10.3.0",
46-
"nyc": "^15.1.0",
47-
"prettier": "^3.2.5",
45+
"mocha": "^11.0.1",
46+
"nyc": "^17.1.0",
47+
"prettier": "^3.4.2",
4848
"rimraf": "^5.0.5",
49-
"typescript": "^5.3.3"
49+
"typescript": "~5.3.3"
5050
},
5151
"engines": {
5252
"node": "^14.17.0 || ^16.0.0 || >= 18.0.0"
5353
},
5454
"peerDependencies": {
5555
"eslint": ">=7"
5656
},
57-
"packageManager": "yarn@4.1.1"
57+
"packageManager": "yarn@4.6.0"
5858
}

eslint-plugin/tests/lib/rules/prefer-collections-with-pagination.js

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ const RuleTester = require("eslint").RuleTester;
3030
//------------------------------------------------------------------------------
3131

3232
const ruleTester = new RuleTester({
33+
// eslint-disable-next-line node/no-missing-require
3334
parser: require.resolve("@typescript-eslint/parser"),
3435
});
3536

@@ -46,35 +47,35 @@ ruleTester.run("prefer-collections-with-pagination", rule, {
4647
valid: [
4748
`
4849
@Controller()
49-
public class Test {
50+
class Test {
5051
@Get()
5152
public find(): Page {}
5253
}
5354
`,
5455
`
5556
@Controller()
56-
public class Test {
57+
class Test {
5758
@Get()
5859
public find(): Promise<Pagination> {}
5960
}
6061
`,
6162
`
6263
@Controller()
63-
public class Test {
64+
class Test {
6465
@Get()
6566
public find() {}
6667
}
6768
`,
6869
`
6970
@Controller()
70-
public class Test {
71+
class Test {
7172
@Get(':id')
7273
public findOne(): Promise<string> {}
7374
}
7475
`,
7576
`
7677
@Controller()
77-
public class Test {
78+
class Test {
7879
@Get()
7980
public find(): Promise<{items: string[], currentPage: number, totalPages: number}> {}
8081
}
@@ -83,42 +84,42 @@ ruleTester.run("prefer-collections-with-pagination", rule, {
8384
invalid: [
8485
{
8586
code: `
86-
@Controller()
87-
public class Test {
88-
@Get()
89-
public find(): Promise<string[]> {}
90-
}
91-
`,
87+
@Controller()
88+
class Test {
89+
@Get()
90+
public find(): Promise<string[]> {}
91+
}
92+
`,
9293
errors: [expectedReferenceError],
9394
},
9495
{
9596
code: `
96-
@Controller()
97-
public class Test {
98-
@Get()
99-
public find(): Promise<ClassicList> {}
100-
}
101-
`,
97+
@Controller()
98+
class Test {
99+
@Get()
100+
public find(): Promise<ClassicList> {}
101+
}
102+
`,
102103
errors: [expectedReferenceError],
103104
},
104105
{
105106
code: `
106-
@Controller()
107-
public class Test {
108-
@Get()
109-
public find(): string[] {}
110-
}
111-
`,
107+
@Controller()
108+
class Test {
109+
@Get()
110+
public find(): string[] {}
111+
}
112+
`,
112113
errors: [expectedArrayError],
113114
},
114115
{
115116
code: `
116-
@Controller()
117-
public class Test {
118-
@Get()
119-
public find(): Promise<{items: string[]}> {}
120-
}
121-
`,
117+
@Controller()
118+
class Test {
119+
@Get()
120+
public find(): Promise<{items: string[]}> {}
121+
}
122+
`,
122123
errors: [expectedReferenceError],
123124
},
124125
],

0 commit comments

Comments
 (0)