@net.christianto/eslint-config 0.4.0 → 0.4.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/dist/index.d.mts +2 -3
- package/dist/index.mjs +44 -3
- package/dist/react.d.mts +2 -3
- package/dist/react.mjs +3 -6
- package/dist/types.d.mts +2 -4
- package/dist/types.mjs +1 -0
- package/package.json +4 -4
- package/dist/src-B5rm1zSg.mjs +0 -50
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineConfig } from "eslint/config";
|
|
2
|
-
|
|
3
2
|
//#region src/index.d.ts
|
|
4
|
-
declare const configs: Parameters<typeof defineConfig>;
|
|
3
|
+
export declare const configs: Parameters<typeof defineConfig>;
|
|
5
4
|
//#endregion
|
|
6
|
-
export { configs
|
|
5
|
+
export { configs as default };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import js from "@eslint/js";
|
|
3
|
+
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
4
|
+
import { globalIgnores } from "eslint/config";
|
|
5
|
+
import tseslint from "typescript-eslint";
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region src/index.ts
|
|
8
|
+
const nodePlugin = (/* @__PURE__ */ (() => createRequire(import.meta.url))())("eslint-plugin-n");
|
|
9
|
+
const configs = [
|
|
10
|
+
{
|
|
11
|
+
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
12
|
+
plugins: {
|
|
13
|
+
js,
|
|
14
|
+
n: nodePlugin
|
|
15
|
+
},
|
|
16
|
+
extends: ["js/recommended"],
|
|
17
|
+
rules: {
|
|
18
|
+
"no-ternary": "error",
|
|
19
|
+
"n/no-process-env": "error",
|
|
20
|
+
"n/no-process-exit": "error",
|
|
21
|
+
"n/no-path-concat": "error",
|
|
22
|
+
"n/prefer-node-protocol": "error"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
files: ["**/env.js", "**/env.ts"],
|
|
27
|
+
rules: { "n/no-process-env": "off" }
|
|
28
|
+
},
|
|
29
|
+
tseslint.configs.recommended,
|
|
30
|
+
{
|
|
31
|
+
files: ["eslint.config.*"],
|
|
32
|
+
rules: { "@typescript-eslint/no-require-imports": "off" }
|
|
33
|
+
},
|
|
34
|
+
eslintConfigPrettier,
|
|
35
|
+
globalIgnores([
|
|
36
|
+
"**/node_modules/**",
|
|
37
|
+
"**/dist/**",
|
|
38
|
+
"**/build/**",
|
|
39
|
+
"**/.next/**",
|
|
40
|
+
"**/coverage/**"
|
|
41
|
+
])
|
|
42
|
+
];
|
|
43
|
+
//#endregion
|
|
44
|
+
export { configs, configs as default };
|
package/dist/react.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { defineConfig } from "eslint/config";
|
|
2
|
-
|
|
3
2
|
//#region src/react.d.ts
|
|
4
|
-
declare const reactConfig: Parameters<typeof defineConfig>;
|
|
3
|
+
export declare const reactConfig: Parameters<typeof defineConfig>;
|
|
5
4
|
//#endregion
|
|
6
|
-
export { reactConfig as default
|
|
5
|
+
export { reactConfig as default };
|
package/dist/react.mjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { configs } from "./index.mjs";
|
|
2
2
|
import pluginReact from "eslint-plugin-react";
|
|
3
3
|
import globals from "globals";
|
|
4
|
-
|
|
5
4
|
//#region src/react.ts
|
|
6
5
|
const reactConfig = [
|
|
7
|
-
...
|
|
6
|
+
...configs,
|
|
8
7
|
{
|
|
9
8
|
files: ["**/*.{jsx,tsx}"],
|
|
10
9
|
plugins: { react: pluginReact },
|
|
@@ -17,7 +16,5 @@ const reactConfig = [
|
|
|
17
16
|
pluginReact.configs.flat.recommended,
|
|
18
17
|
pluginReact.configs.flat["jsx-runtime"]
|
|
19
18
|
];
|
|
20
|
-
var react_default = reactConfig;
|
|
21
|
-
|
|
22
19
|
//#endregion
|
|
23
|
-
export {
|
|
20
|
+
export { reactConfig as default, reactConfig };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { defineConfig } from "eslint/config";
|
|
2
|
-
|
|
3
2
|
//#region src/types.d.ts
|
|
4
|
-
type ConfigWithExtends = Parameters<typeof defineConfig>[number];
|
|
5
|
-
//#endregion
|
|
6
|
-
export { ConfigWithExtends };
|
|
3
|
+
export type ConfigWithExtends = Parameters<typeof defineConfig>[number];
|
|
4
|
+
//#endregion
|
package/dist/types.mjs
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net.christianto/eslint-config",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "ESLint configuration for JavaScript and TypeScript",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.mts",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@net.christianto/tsconfig": "file:../tsconfig",
|
|
32
32
|
"@types/eslint": "*",
|
|
33
|
-
"@types/node": "^
|
|
33
|
+
"@types/node": "^26.6.3",
|
|
34
34
|
"eslint": "*",
|
|
35
35
|
"eslint-config-prettier": "*",
|
|
36
36
|
"eslint-plugin-n": "*",
|
|
37
37
|
"eslint-plugin-react": "*",
|
|
38
38
|
"globals": "*",
|
|
39
|
-
"tsdown": "^0.
|
|
40
|
-
"typescript": "^
|
|
39
|
+
"tsdown": "^0.23.0",
|
|
40
|
+
"typescript": "^7.0.2",
|
|
41
41
|
"typescript-eslint": "*"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/dist/src-B5rm1zSg.mjs
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import js from "@eslint/js";
|
|
3
|
-
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
4
|
-
import { globalIgnores } from "eslint/config";
|
|
5
|
-
import tseslint from "typescript-eslint";
|
|
6
|
-
|
|
7
|
-
//#region rolldown:runtime
|
|
8
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
//#region src/index.ts
|
|
12
|
-
const nodePlugin = __require("eslint-plugin-n");
|
|
13
|
-
const configs = [
|
|
14
|
-
{
|
|
15
|
-
files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
|
|
16
|
-
plugins: {
|
|
17
|
-
js,
|
|
18
|
-
n: nodePlugin
|
|
19
|
-
},
|
|
20
|
-
extends: ["js/recommended"],
|
|
21
|
-
rules: {
|
|
22
|
-
"no-ternary": "error",
|
|
23
|
-
"n/no-process-env": "error",
|
|
24
|
-
"n/no-process-exit": "error",
|
|
25
|
-
"n/no-path-concat": "error",
|
|
26
|
-
"n/prefer-node-protocol": "error"
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
files: ["**/env.js", "**/env.ts"],
|
|
31
|
-
rules: { "n/no-process-env": "off" }
|
|
32
|
-
},
|
|
33
|
-
tseslint.configs.recommended,
|
|
34
|
-
{
|
|
35
|
-
files: ["eslint.config.*"],
|
|
36
|
-
rules: { "@typescript-eslint/no-require-imports": "off" }
|
|
37
|
-
},
|
|
38
|
-
eslintConfigPrettier,
|
|
39
|
-
globalIgnores([
|
|
40
|
-
"**/node_modules/**",
|
|
41
|
-
"**/dist/**",
|
|
42
|
-
"**/build/**",
|
|
43
|
-
"**/.next/**",
|
|
44
|
-
"**/coverage/**"
|
|
45
|
-
])
|
|
46
|
-
];
|
|
47
|
-
var src_default = configs;
|
|
48
|
-
|
|
49
|
-
//#endregion
|
|
50
|
-
export { configs, src_default };
|