@1024pix/eslint-plugin 2.1.20 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.nvmrc CHANGED
@@ -1 +1 @@
1
- 24.14.0
1
+ 24.18.0
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ # [3.0.0](https://github.com/1024pix/eslint-plugin/compare/v2.1.21...v3.0.0) (2026-08-06)
2
+
3
+ ### :boom: BREAKING CHANGE
4
+
5
+ - [#79](https://github.com/1024pix/eslint-plugin/pull/79) Montée de version d'eslint-plugin-yml en v3
6
+
7
+ ## [2.1.21](https://github.com/1024pix/eslint-plugin/compare/v2.1.20...v2.1.21) (2026-07-28)
8
+
9
+ ### :arrow_up: Montée de version
10
+
11
+ - [#77](https://github.com/1024pix/eslint-plugin/pull/77) Update Node.js to v24.18.0
12
+
1
13
  ## [2.1.20](https://github.com/1024pix/eslint-plugin/compare/v2.1.19...v2.1.20) (2026-07-28)
2
14
 
3
15
  ### :arrow_up: Montée de version
package/config.test.js ADDED
@@ -0,0 +1,47 @@
1
+ import test from 'ava';
2
+ import { ESLint } from 'eslint';
3
+
4
+ import config from './config.js';
5
+
6
+ async function reportedRuleIds({ code, filePath }) {
7
+ const eslint = new ESLint({ overrideConfig: config, overrideConfigFile: true });
8
+ const [result] = await eslint.lintText(code, { filePath });
9
+
10
+ return result.messages.map((message) => message.ruleId);
11
+ }
12
+
13
+ const cases = [
14
+ {
15
+ name: 'Unsorted imports and console call',
16
+ code: "import b from 'b';\nimport a from 'a';\nconsole.log(a, b);\n",
17
+ filePath: 'sample.js',
18
+ errors: ['simple-import-sort/imports', 'no-console'],
19
+ },
20
+ {
21
+ name: 'Sinon stub with args one liner',
22
+ code: "import sinon from 'sinon';\nconst stub = sinon.stub().withArgs('hello').returns('world');\n",
23
+ filePath: 'sample.js',
24
+ errors: ['@1024pix/no-sinon-stub-with-args-oneliner'],
25
+ },
26
+ {
27
+ name: 'Double quoted YAML value with extra spacing',
28
+ code: 'key: "value"\n',
29
+ filePath: 'sample.yml',
30
+ errors: ['yml/quotes', 'yml/key-spacing'],
31
+ },
32
+ ];
33
+
34
+ test('Config is loadable', (t) => {
35
+ t.true(Array.isArray(config));
36
+ t.true(config.length > 0);
37
+ });
38
+
39
+ for (const { name, code, filePath, errors } of cases) {
40
+ test(name, async (t) => {
41
+ const ruleIds = await reportedRuleIds({ code, filePath });
42
+
43
+ for (const error of errors) {
44
+ t.true(ruleIds.includes(error), `${error} should be reported`);
45
+ }
46
+ });
47
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@1024pix/eslint-plugin",
3
- "version": "2.1.20",
3
+ "version": "3.0.0",
4
4
  "description": "Des règles de lint pour les projets 1024pix",
5
5
  "type": "module",
6
6
  "engines": {
7
- "node": "^20 || ^22 || ^24"
7
+ "node": "^20.19 || ^22.13 || ^24"
8
8
  },
9
9
  "exports": {
10
10
  ".": "./index.js",
@@ -15,16 +15,17 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
18
+ "@eslint/js": "^9.39.0",
18
19
  "eslint-plugin-simple-import-sort": "^12.1.1",
19
- "eslint-plugin-yml": "^1.16.0"
20
+ "eslint-plugin-yml": "^3.0.0"
20
21
  },
21
22
  "devDependencies": {
22
23
  "ava": "^7.0.0",
23
- "eslint": "^9.17.0",
24
+ "eslint": "^9.39.0",
24
25
  "eslint-ava-rule-tester": "^5.0.1"
25
26
  },
26
27
  "peerDependencies": {
27
- "eslint": ">=9.17.0"
28
+ "eslint": ">=9.38.0"
28
29
  },
29
30
  "repository": {
30
31
  "type": "git",