@net.christianto/eslint-config 0.2.1 → 0.4.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/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
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from "eslint/config";
2
+
3
+ //#region src/index.d.ts
4
+ declare const configs: Parameters<typeof defineConfig>;
5
+ //#endregion
6
+ export { configs, configs as default };
package/dist/index.mjs ADDED
@@ -0,0 +1,3 @@
1
+ import { configs, src_default } from "./src-B5rm1zSg.mjs";
2
+
3
+ export { configs, src_default as default };
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from "eslint/config";
2
+
3
+ //#region src/react.d.ts
4
+ declare const reactConfig: Parameters<typeof defineConfig>;
5
+ //#endregion
6
+ export { reactConfig as default, reactConfig };
package/dist/react.mjs ADDED
@@ -0,0 +1,23 @@
1
+ import { src_default } from "./src-B5rm1zSg.mjs";
2
+ import pluginReact from "eslint-plugin-react";
3
+ import globals from "globals";
4
+
5
+ //#region src/react.ts
6
+ const reactConfig = [
7
+ ...src_default,
8
+ {
9
+ files: ["**/*.{jsx,tsx}"],
10
+ plugins: { react: pluginReact },
11
+ languageOptions: { parserOptions: { ecmaFeatures: { jsx: true } } }
12
+ },
13
+ {
14
+ files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
15
+ languageOptions: { globals: globals.browser }
16
+ },
17
+ pluginReact.configs.flat.recommended,
18
+ pluginReact.configs.flat["jsx-runtime"]
19
+ ];
20
+ var react_default = reactConfig;
21
+
22
+ //#endregion
23
+ export { react_default as default, reactConfig };
@@ -0,0 +1,50 @@
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 };
@@ -0,0 +1,6 @@
1
+ import { defineConfig } from "eslint/config";
2
+
3
+ //#region src/types.d.ts
4
+ type ConfigWithExtends = Parameters<typeof defineConfig>[number];
5
+ //#endregion
6
+ export { ConfigWithExtends };
package/dist/types.mjs ADDED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@net.christianto/eslint-config",
3
- "version": "0.2.1",
3
+ "version": "0.4.0",
4
4
  "description": "ESLint configuration for JavaScript and TypeScript",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.mts",
@@ -28,6 +28,7 @@
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
33
  "@types/node": "^20.19.0",
33
34
  "eslint": "*",
@@ -37,9 +38,7 @@
37
38
  "globals": "*",
38
39
  "tsdown": "^0.12.7",
39
40
  "typescript": "^5.0.0",
40
- "typescript-eslint": "*",
41
- "@net.christianto/eslint-config": "^0.2.1",
42
- "@net.christianto/tsconfig": "^0.1.3"
41
+ "typescript-eslint": "*"
43
42
  },
44
43
  "peerDependencies": {
45
44
  "eslint": ">=9.28.0",