@ethang/eslint-config 19.2.0 → 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.
|
@@ -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,7 +2,6 @@
|
|
|
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";
|
|
@@ -10,13 +9,14 @@ import { updateAstroRules } from "./build/update-astro-rules.js";
|
|
|
10
9
|
await projectBuilder("eslint-config-ethang", "master", {
|
|
11
10
|
isLibrary: true,
|
|
12
11
|
scripts: ["UPDATE", "DEDUPE", "LINT"],
|
|
13
|
-
postInstall: () => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
postInstall: async () => {
|
|
13
|
+
await Promise.all([
|
|
14
|
+
updateRules(),
|
|
15
|
+
updateReactRules(),
|
|
16
|
+
updateSolidRules(),
|
|
17
|
+
updateAstroRules(),
|
|
18
|
+
updateReadme(),
|
|
19
|
+
]);
|
|
20
20
|
},
|
|
21
21
|
tsupOptions: {
|
|
22
22
|
bundle: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethang/eslint-config",
|
|
3
|
-
"version": "19.2.
|
|
3
|
+
"version": "19.2.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/eglove/eslint-config-ethang.git"
|
|
6
6
|
},
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
29
29
|
"eslint-plugin-lodash": "^8.0.0",
|
|
30
30
|
"eslint-plugin-n": "^17.10.2",
|
|
31
|
-
"eslint-plugin-perfectionist": "^3.
|
|
31
|
+
"eslint-plugin-perfectionist": "^3.3.0",
|
|
32
32
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
33
33
|
"eslint-plugin-solid": "^0.14.2",
|
|
34
34
|
"eslint-plugin-sonarjs": "2.0.1",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
61
61
|
"eslint-plugin-lodash": "^8.0.0",
|
|
62
62
|
"eslint-plugin-n": "^17.10.2",
|
|
63
|
-
"eslint-plugin-perfectionist": "^3.
|
|
63
|
+
"eslint-plugin-perfectionist": "^3.3.0",
|
|
64
64
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
65
65
|
"eslint-plugin-solid": "^0.14.2",
|
|
66
66
|
"eslint-plugin-sonarjs": "2.0.1",
|