@msobiecki/eslint-config 8.11.0 → 8.13.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/CHANGELOG.md +17 -7
- package/__tests__/base.test.js +14 -25
- package/__tests__/test-cases/base/camelcase.js +2 -0
- package/__tests__/test-cases/base/comma-dangle.js +2 -0
- package/__tests__/test-cases/base/eqeqeq.js +2 -0
- package/__tests__/test-cases/base/no-console.js +2 -0
- package/__tests__/test-cases/base/no-eval.js +3 -0
- package/__tests__/test-cases/base/no-undef.js +2 -0
- package/__tests__/test-cases/base/no-unused-vars.js +2 -0
- package/__tests__/test-cases/base/no-var.js +2 -0
- package/__tests__/test-cases/base/prefer-const.js +2 -0
- package/jest.config.js +1 -1
- package/package.json +1 -1
- package/__tests__/cases/base/no-console.js +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,30 +1,40 @@
|
|
|
1
|
-
# [8.
|
|
1
|
+
# [8.13.0](https://github.com/msobiecki/eslint-config/compare/v8.12.0...v8.13.0) (2025-04-17)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
* update ([
|
|
6
|
+
* update ([7e97251](https://github.com/msobiecki/eslint-config/commit/7e97251219f41aa48837d88a5da5c969097d2e5f))
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
# [8.
|
|
10
|
+
# [8.12.0](https://github.com/msobiecki/eslint-config/compare/v8.11.0...v8.12.0) (2025-04-17)
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
### Features
|
|
14
14
|
|
|
15
|
-
* update ([
|
|
15
|
+
* update ([ba333fb](https://github.com/msobiecki/eslint-config/commit/ba333fb53094e550ceecb0e3552b4e3605ad221a))
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
# [8.11.0](https://github.com/msobiecki/eslint-config/compare/v8.10.0...v8.11.0) (2025-04-17)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
20
23
|
|
|
24
|
+
* update ([d3088d2](https://github.com/msobiecki/eslint-config/commit/d3088d2a844617dc92ab5f3b40e4a1b77b11079f))
|
|
21
25
|
|
|
22
26
|
|
|
23
|
-
## [8.9.12](https://github.com/msobiecki/eslint-config/compare/v8.9.11...v8.9.12) (2025-03-23)
|
|
24
27
|
|
|
28
|
+
# [8.10.0](https://github.com/msobiecki/eslint-config/compare/v8.9.13...v8.10.0) (2025-04-17)
|
|
25
29
|
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* update ([2c5d766](https://github.com/msobiecki/eslint-config/commit/2c5d76693afb60b832c5c7960934fa59c5214a75))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## [8.9.13](https://github.com/msobiecki/eslint-config/compare/v8.9.12...v8.9.13) (2025-03-23)
|
|
28
38
|
|
|
29
39
|
|
|
30
40
|
|
package/__tests__/base.test.js
CHANGED
|
@@ -1,38 +1,27 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import process from "node:process";
|
|
3
4
|
|
|
4
5
|
import { ESLint } from "eslint";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
},
|
|
11
|
-
];
|
|
12
|
-
|
|
13
|
-
describe("check ESLint test cases", () => {
|
|
14
|
-
let eslint;
|
|
15
|
-
|
|
16
|
-
beforeEach(() => {
|
|
17
|
-
eslint = new ESLint({
|
|
18
|
-
useEslintrc: false,
|
|
19
|
-
overrideConfigFile: path.resolve(process.cwd(), "presets/base/base.js"),
|
|
20
|
-
});
|
|
7
|
+
describe("check base rules", () => {
|
|
8
|
+
const eslint = new ESLint({
|
|
9
|
+
useEslintrc: false,
|
|
10
|
+
overrideConfigFile: path.resolve(process.cwd(), "presets/base/base.js"),
|
|
21
11
|
});
|
|
22
12
|
|
|
13
|
+
const testDirectory = path.join(__dirname, "test-cases", "base");
|
|
14
|
+
const testFiles = fs.readdirSync(testDirectory);
|
|
15
|
+
|
|
23
16
|
// eslint-disable-next-line no-restricted-syntax
|
|
24
|
-
for (const
|
|
25
|
-
|
|
26
|
-
test(`${file} should trigger expected ESLint rules`, async () => {
|
|
27
|
-
const results = await eslint.lintFiles([file]);
|
|
28
|
-
const messages = results[0]?.messages || [];
|
|
17
|
+
for (const file of testFiles) {
|
|
18
|
+
const ruleId = path.basename(file, ".js");
|
|
29
19
|
|
|
20
|
+
test(`${file} should trigger rule: ${ruleId}`, async () => {
|
|
21
|
+
const results = await eslint.lintFiles([path.join(testDirectory, file)]);
|
|
22
|
+
const messages = results[0]?.messages || [];
|
|
30
23
|
const triggeredRules = messages.map((m) => m.ruleId).filter(Boolean);
|
|
31
|
-
|
|
32
|
-
// eslint-disable-next-line no-restricted-syntax
|
|
33
|
-
for (const expectedRule of expectedRules) {
|
|
34
|
-
expect(triggeredRules).toContain(expectedRule);
|
|
35
|
-
}
|
|
24
|
+
expect(triggeredRules).toContain(ruleId);
|
|
36
25
|
});
|
|
37
26
|
}
|
|
38
27
|
});
|
package/jest.config.js
CHANGED
|
@@ -160,7 +160,7 @@ const config = {
|
|
|
160
160
|
// ],
|
|
161
161
|
|
|
162
162
|
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
|
163
|
-
testPathIgnorePatterns: ["/__tests__/cases/"],
|
|
163
|
+
testPathIgnorePatterns: ["/__tests__/test-cases/"],
|
|
164
164
|
|
|
165
165
|
// The regexp pattern or array of patterns that Jest uses to detect test files
|
|
166
166
|
// testRegex: [],
|
package/package.json
CHANGED