@zjutjh/eslint-config 0.0.2
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 +14 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +57 -0
- package/package.json +36 -0
package/README.md
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/configs/javascript.ts
|
|
2
|
+
import eslintJS from "@eslint/js";
|
|
3
|
+
import globals from "globals";
|
|
4
|
+
function javascript() {
|
|
5
|
+
return [
|
|
6
|
+
{
|
|
7
|
+
name: "zjutjh/javascript/setup",
|
|
8
|
+
languageOptions: {
|
|
9
|
+
ecmaVersion: 2022,
|
|
10
|
+
globals: {
|
|
11
|
+
...globals.browser,
|
|
12
|
+
...globals.es2021,
|
|
13
|
+
...globals.node,
|
|
14
|
+
document: "readonly",
|
|
15
|
+
navigator: "readonly",
|
|
16
|
+
window: "readonly"
|
|
17
|
+
},
|
|
18
|
+
parserOptions: {
|
|
19
|
+
ecmaFeatures: {
|
|
20
|
+
jsx: true
|
|
21
|
+
},
|
|
22
|
+
ecmaVersion: 2022,
|
|
23
|
+
sourceType: "module"
|
|
24
|
+
},
|
|
25
|
+
sourceType: "module"
|
|
26
|
+
},
|
|
27
|
+
linterOptions: {
|
|
28
|
+
reportUnusedDisableDirectives: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "zjutjh/javascript/rules",
|
|
33
|
+
rules: {
|
|
34
|
+
...eslintJS.configs.recommended.rules,
|
|
35
|
+
"camelcase": "warn",
|
|
36
|
+
"no-warning-comments": "warn",
|
|
37
|
+
"no-console": ["warn", { allow: ["warn", "error"] }],
|
|
38
|
+
"no-var": "error",
|
|
39
|
+
"no-undef": "off",
|
|
40
|
+
"prefer-const": "warn"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// src/factory.ts
|
|
47
|
+
async function zjutjh() {
|
|
48
|
+
const configs = [];
|
|
49
|
+
configs.push(javascript());
|
|
50
|
+
return configs.flat(1);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// src/index.ts
|
|
54
|
+
var src_default = zjutjh;
|
|
55
|
+
export {
|
|
56
|
+
src_default as default
|
|
57
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zjutjh/eslint-config",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.0.2",
|
|
5
|
+
"license": "ISC",
|
|
6
|
+
"author": "zjutjh",
|
|
7
|
+
"description": "Eslint config used by zjutjh",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@eslint/js": "^9.15.0",
|
|
19
|
+
"globals": "^15.12.0"
|
|
20
|
+
},
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"@eslint/config-inspector": "^0.5.6",
|
|
23
|
+
"@types/eslint__js": "^8.42.3",
|
|
24
|
+
"bumpp": "^9.8.1",
|
|
25
|
+
"eslint": "^9.15.0",
|
|
26
|
+
"jiti": "^2.4.0",
|
|
27
|
+
"tsup": "^8.3.5",
|
|
28
|
+
"typescript": "^5.6.3"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsup --format esm --clean --dts",
|
|
32
|
+
"lint": "eslint --flag unstable_ts_config .",
|
|
33
|
+
"dev": "config-inspector",
|
|
34
|
+
"release": "pnpm build && bumpp && pnpm publish --access public"
|
|
35
|
+
}
|
|
36
|
+
}
|