@net.christianto/eslint-config 0.4.2 → 1.0.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
@@ -7,12 +7,17 @@ ESLint configuration for JavaScript and TypeScript
7
7
  ### Manual Install
8
8
 
9
9
  ```bash
10
- pnpm add -D eslint @eslint/js eslint-config-prettier eslint-plugin-n typescript-eslint @net.christianto/eslint-config
10
+ pnpm add -D eslint @eslint/js eslint-config-prettier eslint-plugin-n eslint-plugin-package-json typescript-eslint @net.christianto/eslint-config
11
11
  ```
12
12
 
13
13
  Supported ESLint versions: 9.x and 10.x. Install the `@eslint/js` major
14
14
  that matches your `eslint` major.
15
15
 
16
+ The base config also lints `package.json` files using the `recommended` config
17
+ from [`eslint-plugin-package-json`](https://www.npmjs.com/package/eslint-plugin-package-json),
18
+ so every package follows the same structure (required fields, sorted
19
+ collections, valid values, etc.)
20
+
16
21
  For the React config (`@net.christianto/eslint-config/react`), also install the
17
22
  optional peers:
18
23
 
package/dist/index.d.mts CHANGED
@@ -1,5 +1,3 @@
1
1
  import { defineConfig } from "eslint/config";
2
- //#region src/index.d.ts
3
2
  export declare const configs: Parameters<typeof defineConfig>;
4
- //#endregion
5
3
  export { configs as default };
package/dist/index.mjs CHANGED
@@ -1,11 +1,10 @@
1
- import { createRequire } from "node:module";
2
1
  import js from "@eslint/js";
3
2
  import eslintConfigPrettier from "eslint-config-prettier/flat";
3
+ import nodePlugin from "eslint-plugin-n";
4
+ import packageJson from "eslint-plugin-package-json";
4
5
  import { globalIgnores } from "eslint/config";
5
6
  import tseslint from "typescript-eslint";
6
- //#endregion
7
- //#region src/index.ts
8
- const nodePlugin = (/* @__PURE__ */ (() => createRequire(import.meta.url))())("eslint-plugin-n");
7
+ // src/index.ts
9
8
  const configs = [
10
9
  {
11
10
  files: ["**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
@@ -31,6 +30,7 @@ const configs = [
31
30
  files: ["eslint.config.*"],
32
31
  rules: { "@typescript-eslint/no-require-imports": "off" }
33
32
  },
33
+ packageJson.configs.recommended,
34
34
  eslintConfigPrettier,
35
35
  globalIgnores([
36
36
  "**/node_modules/**",
@@ -40,5 +40,4 @@ const configs = [
40
40
  "**/coverage/**"
41
41
  ])
42
42
  ];
43
- //#endregion
44
43
  export { configs, configs as default };
package/dist/react.d.mts CHANGED
@@ -1,5 +1,3 @@
1
1
  import { defineConfig } from "eslint/config";
2
- //#region src/react.d.ts
3
2
  export declare const reactConfig: Parameters<typeof defineConfig>;
4
- //#endregion
5
3
  export { reactConfig as default };
package/dist/react.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { configs } from "./index.mjs";
2
2
  import pluginReact from "eslint-plugin-react";
3
3
  import globals from "globals";
4
- //#region src/react.ts
4
+ // src/react.ts
5
5
  const reactConfig = [
6
6
  ...configs,
7
7
  {
@@ -16,5 +16,4 @@ const reactConfig = [
16
16
  pluginReact.configs.flat.recommended,
17
17
  pluginReact.configs.flat["jsx-runtime"]
18
18
  ];
19
- //#endregion
20
19
  export { reactConfig as default, reactConfig };
package/dist/types.d.mts CHANGED
@@ -1,4 +1,2 @@
1
1
  import { defineConfig } from "eslint/config";
2
- //#region src/types.d.ts
3
- export type ConfigWithExtends = Parameters<typeof defineConfig>[number];
4
- //#endregion
2
+ export type ConfigWithExtends = Parameters<typeof defineConfig>[number];
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@net.christianto/eslint-config",
3
- "version": "0.4.2",
3
+ "version": "1.0.1",
4
4
  "description": "ESLint configuration for JavaScript and TypeScript",
5
+ "sideEffects": false,
6
+ "type": "module",
5
7
  "main": "dist/index.mjs",
6
8
  "types": "dist/index.d.mts",
7
9
  "repository": {
@@ -24,7 +26,6 @@
24
26
  "require": "./dist/*.mjs"
25
27
  }
26
28
  },
27
- "keywords": [],
28
29
  "author": "Gunawan \"chez14\" Christianto <chris@christianto.net>",
29
30
  "license": "MIT",
30
31
  "devDependencies": {
@@ -35,6 +36,7 @@
35
36
  "eslint": "*",
36
37
  "eslint-config-prettier": "*",
37
38
  "eslint-plugin-n": "*",
39
+ "eslint-plugin-package-json": "*",
38
40
  "eslint-plugin-react": "*",
39
41
  "globals": "*",
40
42
  "tsdown": "^0.23.0",
@@ -46,6 +48,7 @@
46
48
  "eslint": "^9.28.0 || ^10.0.0",
47
49
  "eslint-config-prettier": ">=10.1.5",
48
50
  "eslint-plugin-n": "^17.19.0 || ^18.0.0",
51
+ "eslint-plugin-package-json": "^1.0.0",
49
52
  "eslint-plugin-react": "^7.37.5",
50
53
  "globals": "^15.15.0 || ^16.0.0 || ^17.0.0",
51
54
  "typescript-eslint": "^8.34.0"
@@ -58,14 +61,18 @@
58
61
  "optional": true
59
62
  }
60
63
  },
64
+ "engines": {
65
+ "node": "^22.22.2 || >=24.15.0"
66
+ },
61
67
  "publishConfig": {
62
68
  "access": "public",
63
69
  "provenance": true
64
70
  },
65
71
  "scripts": {
66
- "test": "echo \"Error: no test specified\" && exit 1",
72
+ "build": "tsdown",
67
73
  "lint": "eslint .",
68
74
  "lint:fix": "eslint . --fix",
69
- "build": "tsdown"
75
+ "lint:publish": "publint --strict",
76
+ "test": "echo \"Error: no test specified\" && exit 1"
70
77
  }
71
78
  }