@ethang/eslint-config 19.1.1 → 19.2.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.
- package/README.md +2 -2
- package/build/update-astro-rules.js +2 -2
- package/build/update-react-rules.js +2 -2
- package/build/update-readme.js +1 -1
- package/build/update-rules.js +3 -3
- package/build/update-solid-rules.js +3 -3
- package/build.mjs +9 -8
- package/eslint.config.js +1 -0
- package/package.json +25 -25
package/README.md
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
> [!CAUTION]
|
|
6
6
|
> Do not use this with Prettier! Styling rules are included.
|
|
7
7
|
|
|
8
|
-
-
|
|
8
|
+
- 883 errored rules.
|
|
9
9
|
- 289 rules from [eslint-plugin-sonarjs](https://github.com/SonarSource/SonarJS/blob/master/packages/jsts/src/rules/README.md)
|
|
10
10
|
- 144 rules from [@eslint/js](https://github.com/eslint/eslint/tree/main/packages/js)
|
|
11
11
|
- 113 rules from [sindresorhus/eslint-plugin-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)
|
|
12
|
-
-
|
|
12
|
+
- 104 rules from [@typescript/eslint](https://github.com/typescript-eslint/typescript-eslint)
|
|
13
13
|
- 91 rules from [@stylistic/eslint-plugin](https://eslint.style/)
|
|
14
14
|
- 42 rules from [eslint-plugin-lodash](https://github.com/wix-incubator/eslint-plugin-lodash)
|
|
15
15
|
- 35 rules from [jsx-a11y](https://github.com/jsx-eslint/eslint-plugin-jsx-a11y)
|
|
@@ -2,7 +2,7 @@ import { writeFileSync } from "node:fs";
|
|
|
2
2
|
import { join } from "node:path";
|
|
3
3
|
import { astroRules } from "../setup/astro.js";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export const updateAstroRules = async () => {
|
|
6
6
|
let configFile = "";
|
|
7
7
|
|
|
8
8
|
const rulesJson = JSON.stringify(astroRules).slice(1, -1);
|
|
@@ -36,4 +36,4 @@ export function updateAstroRules() {
|
|
|
36
36
|
configFile,
|
|
37
37
|
"utf8",
|
|
38
38
|
);
|
|
39
|
-
}
|
|
39
|
+
};
|
|
@@ -2,7 +2,7 @@ import { reactRules } from "../setup/react.js";
|
|
|
2
2
|
import { writeFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export const updateReactRules = async () => {
|
|
6
6
|
let configFile = "";
|
|
7
7
|
|
|
8
8
|
const rulesJson = JSON.stringify(reactRules).slice(1, -1);
|
|
@@ -40,4 +40,4 @@ export function updateReactRules() {
|
|
|
40
40
|
configFile,
|
|
41
41
|
"utf8",
|
|
42
42
|
);
|
|
43
|
-
}
|
|
43
|
+
};
|
package/build/update-readme.js
CHANGED
|
@@ -21,7 +21,7 @@ import { astroRules } from "../setup/astro.js";
|
|
|
21
21
|
import { reactRules } from "../setup/react.js";
|
|
22
22
|
import { solidRules } from "../setup/solid.js";
|
|
23
23
|
|
|
24
|
-
export const updateReadme = () => {
|
|
24
|
+
export const updateReadme = async () => {
|
|
25
25
|
const md = new MarkdownGenerator();
|
|
26
26
|
md.header(1, "Opinionated, Strict, Brutal, Unforgiving", 2);
|
|
27
27
|
md.link("View Config", "https://eslint-config-ethang.pages.dev/rules", 2);
|
package/build/update-rules.js
CHANGED
|
@@ -12,13 +12,13 @@ import { tailwindRules } from "../setup/tailwind.js";
|
|
|
12
12
|
import { stylisticRules } from "../setup/stylistic.js";
|
|
13
13
|
import { perfectionistRules } from "../setup/perfectionist.js";
|
|
14
14
|
import { a11yRules } from "../setup/a11y.js";
|
|
15
|
-
import {
|
|
15
|
+
import { writeFileSync } from "node:fs";
|
|
16
16
|
import { join } from "node:path";
|
|
17
17
|
import { deprecatedRules } from "../setup/deprecated.js";
|
|
18
18
|
import { markdownRules } from "../setup/markdown.js";
|
|
19
19
|
import { jsonRules } from "../setup/json.js";
|
|
20
20
|
|
|
21
|
-
export const updateRules = () => {
|
|
21
|
+
export const updateRules = async () => {
|
|
22
22
|
let configFile = "";
|
|
23
23
|
|
|
24
24
|
const jsRules = {
|
|
@@ -119,7 +119,7 @@ export default tseslint.config(
|
|
|
119
119
|
},
|
|
120
120
|
);\n`;
|
|
121
121
|
|
|
122
|
-
writeFileSync(
|
|
122
|
+
await writeFileSync(
|
|
123
123
|
join(import.meta.dirname, "../eslint.config.js"),
|
|
124
124
|
configFile,
|
|
125
125
|
"utf8",
|
|
@@ -2,7 +2,7 @@ import { solidRules } from "../setup/solid.js";
|
|
|
2
2
|
import { writeFileSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
|
|
5
|
-
export
|
|
5
|
+
export const updateSolidRules = async () => {
|
|
6
6
|
let configFile = "";
|
|
7
7
|
|
|
8
8
|
const rulesJson = JSON.stringify(solidRules).slice(1, -1);
|
|
@@ -31,9 +31,9 @@ export function updateSolidRules() {
|
|
|
31
31
|
});
|
|
32
32
|
`;
|
|
33
33
|
|
|
34
|
-
writeFileSync(
|
|
34
|
+
await writeFileSync(
|
|
35
35
|
join(import.meta.dirname, "../config.solid.js"),
|
|
36
36
|
configFile,
|
|
37
37
|
"utf8",
|
|
38
38
|
);
|
|
39
|
-
}
|
|
39
|
+
};
|
package/build.mjs
CHANGED
|
@@ -2,21 +2,22 @@
|
|
|
2
2
|
import { projectBuilder } from "@ethang/project-builder/project-builder.js";
|
|
3
3
|
import { updateRules } from "./build/update-rules.js";
|
|
4
4
|
import { updateReadme } from "./build/update-readme.js";
|
|
5
|
-
import { execSync } from "node:child_process";
|
|
6
5
|
import { updateReactRules } from "./build/update-react-rules.js";
|
|
7
6
|
import { updateSolidRules } from "./build/update-solid-rules.js";
|
|
8
7
|
import { updateAstroRules } from "./build/update-astro-rules.js";
|
|
9
8
|
|
|
10
|
-
updateRules();
|
|
11
|
-
updateReactRules();
|
|
12
|
-
updateSolidRules();
|
|
13
|
-
updateAstroRules();
|
|
14
|
-
updateReadme();
|
|
15
|
-
execSync("pnpm lint");
|
|
16
|
-
|
|
17
9
|
await projectBuilder("eslint-config-ethang", "master", {
|
|
18
10
|
isLibrary: true,
|
|
19
11
|
scripts: ["UPDATE", "DEDUPE", "LINT"],
|
|
12
|
+
postInstall: async () => {
|
|
13
|
+
await Promise.all([
|
|
14
|
+
updateRules(),
|
|
15
|
+
updateReactRules(),
|
|
16
|
+
updateSolidRules(),
|
|
17
|
+
updateAstroRules(),
|
|
18
|
+
updateReadme(),
|
|
19
|
+
]);
|
|
20
|
+
},
|
|
20
21
|
tsupOptions: {
|
|
21
22
|
bundle: true,
|
|
22
23
|
},
|
package/eslint.config.js
CHANGED
|
@@ -320,6 +320,7 @@ export default tseslint.config(
|
|
|
320
320
|
"@typescript-eslint/no-base-to-string": "error",
|
|
321
321
|
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
322
322
|
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
323
|
+
"@typescript-eslint/no-deprecated": "error",
|
|
323
324
|
"@typescript-eslint/no-dupe-class-members": "off",
|
|
324
325
|
"@typescript-eslint/no-duplicate-enum-values": "error",
|
|
325
326
|
"@typescript-eslint/no-duplicate-type-constituents": "error",
|
package/package.json
CHANGED
|
@@ -1,28 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"author": "Ethan Glover",
|
|
9
|
+
"type": "module",
|
|
7
10
|
"main": "eslint.config.js",
|
|
8
11
|
"scripts": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
12
|
+
"build": "pnpx @eslint/config-inspector build",
|
|
13
|
+
"lint": "prettier . -w"
|
|
11
14
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
},
|
|
15
|
-
"type": "module",
|
|
16
|
-
"author": "Ethan Glover",
|
|
17
|
-
"license": "ISC",
|
|
18
|
-
"peerDependencies": {
|
|
19
|
-
"@eslint-react/eslint-plugin": "^1.12.1",
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@eslint-react/eslint-plugin": "^1.12.2",
|
|
20
17
|
"@eslint/js": "^9.9.1",
|
|
21
18
|
"@eslint/json": "^0.4.0",
|
|
22
19
|
"@eslint/markdown": "^6.0.0",
|
|
23
20
|
"@stylistic/eslint-plugin": "^2.6.4",
|
|
24
21
|
"@tanstack/eslint-plugin-query": "^5.52.0",
|
|
25
|
-
"@typescript-eslint/parser": "^8.
|
|
22
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
26
23
|
"eslint": "^9.9.1",
|
|
27
24
|
"eslint-plugin-astro": "^1.2.3",
|
|
28
25
|
"eslint-plugin-barrel-files": "^2.1.0",
|
|
@@ -31,23 +28,30 @@
|
|
|
31
28
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
32
29
|
"eslint-plugin-lodash": "^8.0.0",
|
|
33
30
|
"eslint-plugin-n": "^17.10.2",
|
|
34
|
-
"eslint-plugin-perfectionist": "^3.
|
|
31
|
+
"eslint-plugin-perfectionist": "^3.3.0",
|
|
35
32
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
36
33
|
"eslint-plugin-solid": "^0.14.2",
|
|
37
34
|
"eslint-plugin-sonarjs": "2.0.1",
|
|
38
35
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
39
36
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
40
37
|
"typescript": "^5.5.4",
|
|
41
|
-
"typescript-eslint": "^8.
|
|
38
|
+
"typescript-eslint": "^8.3.0"
|
|
42
39
|
},
|
|
43
|
-
"
|
|
44
|
-
"@
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@ethang/markdown-generator": "^1.1.1",
|
|
42
|
+
"@ethang/project-builder": "^2.5.0",
|
|
43
|
+
"@tsconfig/node-lts": "^20.1.3",
|
|
44
|
+
"@tsconfig/strictest": "^2.0.5",
|
|
45
|
+
"prettier": "^3.3.3"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@eslint-react/eslint-plugin": "^1.12.2",
|
|
45
49
|
"@eslint/js": "^9.9.1",
|
|
46
50
|
"@eslint/json": "^0.4.0",
|
|
47
51
|
"@eslint/markdown": "^6.0.0",
|
|
48
52
|
"@stylistic/eslint-plugin": "^2.6.4",
|
|
49
53
|
"@tanstack/eslint-plugin-query": "^5.52.0",
|
|
50
|
-
"@typescript-eslint/parser": "^8.
|
|
54
|
+
"@typescript-eslint/parser": "^8.3.0",
|
|
51
55
|
"eslint": "^9.9.1",
|
|
52
56
|
"eslint-plugin-astro": "^1.2.3",
|
|
53
57
|
"eslint-plugin-barrel-files": "^2.1.0",
|
|
@@ -56,20 +60,16 @@
|
|
|
56
60
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
57
61
|
"eslint-plugin-lodash": "^8.0.0",
|
|
58
62
|
"eslint-plugin-n": "^17.10.2",
|
|
59
|
-
"eslint-plugin-perfectionist": "^3.
|
|
63
|
+
"eslint-plugin-perfectionist": "^3.3.0",
|
|
60
64
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
61
65
|
"eslint-plugin-solid": "^0.14.2",
|
|
62
66
|
"eslint-plugin-sonarjs": "2.0.1",
|
|
63
67
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
64
68
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
65
69
|
"typescript": "^5.5.4",
|
|
66
|
-
"typescript-eslint": "^8.
|
|
70
|
+
"typescript-eslint": "^8.3.0"
|
|
67
71
|
},
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"@ethang/project-builder": "^2.3.10",
|
|
71
|
-
"@tsconfig/node-lts": "^20.1.3",
|
|
72
|
-
"@tsconfig/strictest": "^2.0.5",
|
|
73
|
-
"prettier": "^3.3.3"
|
|
72
|
+
"engines": {
|
|
73
|
+
"node": ">=20"
|
|
74
74
|
}
|
|
75
75
|
}
|