@net.christianto/eslint-config 0.2.2 → 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/README.md CHANGED
@@ -10,15 +10,6 @@ ESLint configuration for JavaScript and TypeScript
10
10
  pnpm add -D eslint @net.christianto/eslint-config
11
11
  ```
12
12
 
13
- ### Using chez14's Initializer
14
-
15
- ```bash
16
- pnpx @net.christianto/cs init --lint
17
- ```
18
-
19
- See more documentations on
20
- [Initializer](https://gitlab.com/net.christianto/codestyle/js/-/tree/master/packages/initializer).
21
-
22
13
  ## Usage
23
14
 
24
15
  ```json
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, configs as default };
5
+ export { configs as default };
package/dist/index.mjs CHANGED
@@ -1,3 +1,44 @@
1
- import { configs, src_default } from "./src-B5rm1zSg.mjs";
2
-
3
- export { configs, src_default as default };
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, reactConfig };
5
+ export { reactConfig as default };
package/dist/react.mjs CHANGED
@@ -1,10 +1,9 @@
1
- import { src_default } from "./src-B5rm1zSg.mjs";
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
- ...src_default,
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 { react_default as default, reactConfig };
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.2.2",
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",
@@ -28,18 +28,17 @@
28
28
  "author": "Gunawan \"chez14\" Christianto <chris@christianto.net>",
29
29
  "license": "MIT",
30
30
  "devDependencies": {
31
+ "@net.christianto/tsconfig": "file:../tsconfig",
31
32
  "@types/eslint": "*",
32
- "@types/node": "^20.19.0",
33
+ "@types/node": "^26.6.3",
33
34
  "eslint": "*",
34
35
  "eslint-config-prettier": "*",
35
36
  "eslint-plugin-n": "*",
36
37
  "eslint-plugin-react": "*",
37
38
  "globals": "*",
38
- "tsdown": "^0.12.7",
39
- "typescript": "^5.0.0",
40
- "typescript-eslint": "*",
41
- "@net.christianto/eslint-config": "^0.2.2",
42
- "@net.christianto/tsconfig": "^0.1.3"
39
+ "tsdown": "^0.23.0",
40
+ "typescript": "^7.0.2",
41
+ "typescript-eslint": "*"
43
42
  },
44
43
  "peerDependencies": {
45
44
  "eslint": ">=9.28.0",
@@ -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 };