@1024pix/eslint-plugin 2.1.21 → 3.0.1

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.
@@ -7,6 +7,6 @@ jobs:
7
7
  runs-on: ubuntu-latest
8
8
  steps:
9
9
  - name: Checkout Repository
10
- uses: actions/checkout@v6
10
+ uses: actions/checkout@v7
11
11
 
12
12
  - uses: 1024pix/pix-actions/check-node-version-availability-on-scalingo@v0
@@ -17,7 +17,7 @@ jobs:
17
17
  release:
18
18
  runs-on: ubuntu-latest
19
19
  steps:
20
- - uses: actions/checkout@v6
20
+ - uses: actions/checkout@v7
21
21
  with:
22
22
  persist-credentials: false
23
23
 
@@ -6,7 +6,7 @@ jobs:
6
6
  test:
7
7
  runs-on: ubuntu-latest
8
8
  steps:
9
- - uses: actions/checkout@v6
9
+ - uses: actions/checkout@v7
10
10
  - uses: actions/setup-node@v6
11
11
  with:
12
12
  node-version-file: '.nvmrc'
package/CHANGELOG.md CHANGED
@@ -1,3 +1,15 @@
1
+ ## [3.0.1](https://github.com/1024pix/eslint-plugin/compare/v3.0.0...v3.0.1) (2026-08-06)
2
+
3
+ ### :arrow_up: Montée de version
4
+
5
+ - [#78](https://github.com/1024pix/eslint-plugin/pull/78) Update actions/checkout action to v7 (workflows)
6
+
7
+ # [3.0.0](https://github.com/1024pix/eslint-plugin/compare/v2.1.21...v3.0.0) (2026-08-06)
8
+
9
+ ### :boom: BREAKING CHANGE
10
+
11
+ - [#79](https://github.com/1024pix/eslint-plugin/pull/79) Montée de version d'eslint-plugin-yml en v3
12
+
1
13
  ## [2.1.21](https://github.com/1024pix/eslint-plugin/compare/v2.1.20...v2.1.21) (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.21",
3
+ "version": "3.0.1",
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",