@net.christianto/eslint-config 0.1.1 → 0.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.
- package/README.md +11 -0
- package/package.json +39 -6
- package/src/index.js +0 -28
package/README.md
CHANGED
|
@@ -26,3 +26,14 @@ See more documentations on
|
|
|
26
26
|
"extends": "@net.christianto/eslint-config"
|
|
27
27
|
}
|
|
28
28
|
```
|
|
29
|
+
|
|
30
|
+
or
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { defineConfig } from "eslint/config";
|
|
34
|
+
import { configs } from "@net.christianto/eslint-config";
|
|
35
|
+
|
|
36
|
+
export default defineConfig([
|
|
37
|
+
...configs,
|
|
38
|
+
]);
|
|
39
|
+
```
|
package/package.json
CHANGED
|
@@ -1,29 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@net.christianto/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "ESLint configuration for JavaScript and TypeScript",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "dist/index.mjs",
|
|
6
|
+
"types": "dist/index.d.mts",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://gitlab.com/net.christianto/codestyle/js.git"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://gitlab.com/net.christianto/codestyle/js/-/tree/master/packages/eslint-config",
|
|
12
|
+
"files": [
|
|
13
|
+
"dist/*"
|
|
14
|
+
],
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.mts",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"require": "./dist/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"./*": {
|
|
22
|
+
"types": "./dist/*.d.mts",
|
|
23
|
+
"import": "./dist/*.mjs",
|
|
24
|
+
"require": "./dist/*.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
6
27
|
"keywords": [],
|
|
7
28
|
"author": "Gunawan \"chez14\" Christianto <chris@christianto.net>",
|
|
8
29
|
"license": "MIT",
|
|
9
30
|
"devDependencies": {
|
|
10
31
|
"@types/eslint": "*",
|
|
32
|
+
"@types/node": "^20.19.0",
|
|
11
33
|
"eslint": "*",
|
|
34
|
+
"eslint-config-prettier": "*",
|
|
12
35
|
"eslint-plugin-n": "*",
|
|
13
|
-
"eslint-
|
|
36
|
+
"eslint-plugin-react": "*",
|
|
37
|
+
"globals": "*",
|
|
38
|
+
"tsdown": "^0.12.7",
|
|
39
|
+
"typescript": "^5.0.0",
|
|
40
|
+
"typescript-eslint": "*",
|
|
41
|
+
"@net.christianto/eslint-config": "^0.2.1",
|
|
42
|
+
"@net.christianto/tsconfig": "^0.1.3"
|
|
14
43
|
},
|
|
15
44
|
"peerDependencies": {
|
|
16
45
|
"eslint": ">=9.28.0",
|
|
46
|
+
"eslint-config-prettier": ">=10.1.5",
|
|
17
47
|
"eslint-plugin-n": "^17.19.0",
|
|
18
|
-
"eslint-
|
|
48
|
+
"eslint-plugin-react": "^7.37.5",
|
|
49
|
+
"globals": "^15.15.0",
|
|
50
|
+
"typescript-eslint": "^8.34.0"
|
|
19
51
|
},
|
|
20
52
|
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
53
|
+
"access": "public",
|
|
54
|
+
"provenance": true
|
|
22
55
|
},
|
|
23
56
|
"scripts": {
|
|
24
57
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
25
58
|
"lint": "eslint .",
|
|
26
59
|
"lint:fix": "eslint . --fix",
|
|
27
|
-
"build": "
|
|
60
|
+
"build": "tsdown"
|
|
28
61
|
}
|
|
29
62
|
}
|
package/src/index.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const nodePlugin = require("eslint-plugin-n")
|
|
2
|
-
import eslintConfigPrettier from "eslint-config-prettier/flat";
|
|
3
|
-
|
|
4
|
-
/** @type {import("eslint").Linter.Config[]} */
|
|
5
|
-
const configs = [
|
|
6
|
-
{
|
|
7
|
-
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
|
|
8
|
-
plugins: {
|
|
9
|
-
n: nodePlugin
|
|
10
|
-
},
|
|
11
|
-
rules: {
|
|
12
|
-
"no-ternary": "error",
|
|
13
|
-
"n/no-process-env": "error",
|
|
14
|
-
"n/no-process-exit": "error",
|
|
15
|
-
"n/no-path-concat": "error",
|
|
16
|
-
"n/prefer-node-protocol": "error"
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"files": ['**/env.js', '**/env.ts'],
|
|
21
|
-
"rules": {
|
|
22
|
-
"n/no-process-env": "off"
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
eslintConfigPrettier
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
export default configs
|