@phaicom/eslint-config 0.2.1 → 0.2.3
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/dist/index.js +7 -17
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -14,21 +14,6 @@ var base = {
|
|
|
14
14
|
// unicorn rule customizations
|
|
15
15
|
"unicorn/prevent-abbreviations": "off",
|
|
16
16
|
"unicorn/consistent-function-scoping": "off",
|
|
17
|
-
// ignore composable/hook based filenames, LICENSE, and README
|
|
18
|
-
"unicorn/filename-case": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
case: "kebabCase",
|
|
22
|
-
ignore: [
|
|
23
|
-
// This regex matches files that start with 'use' followed by an uppercase letter
|
|
24
|
-
// and then any sequence of characters, ending with '.ts'. Useful for React hooks.
|
|
25
|
-
String.raw`^use[A-Z].*\.ts$`,
|
|
26
|
-
"LICENSE",
|
|
27
|
-
"README",
|
|
28
|
-
"CHANGELOG"
|
|
29
|
-
]
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
17
|
// jsonc rule customizations
|
|
33
18
|
"jsonc/sort-keys": "off",
|
|
34
19
|
// node customizations
|
|
@@ -73,14 +58,19 @@ async function tailwind() {
|
|
|
73
58
|
}
|
|
74
59
|
|
|
75
60
|
// src/index.ts
|
|
76
|
-
var eslintConfig = (
|
|
61
|
+
var eslintConfig = (options, ...configs) => {
|
|
62
|
+
const {
|
|
63
|
+
phaicom: enablePhaicom = true,
|
|
64
|
+
tailwind: enableTailwind = false,
|
|
65
|
+
vue: enableVue
|
|
66
|
+
} = options;
|
|
77
67
|
if (enableTailwind) {
|
|
78
68
|
configs.push(tailwind());
|
|
79
69
|
}
|
|
80
70
|
if (enablePhaicom) {
|
|
81
71
|
options.unicorn = true;
|
|
82
72
|
configs.push(base_default.base);
|
|
83
|
-
if (
|
|
73
|
+
if (enableVue) {
|
|
84
74
|
configs.push(base_default.vue);
|
|
85
75
|
}
|
|
86
76
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phaicom/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.3",
|
|
5
5
|
"description": "Phaicom's config based on @antfu/eslint-config",
|
|
6
6
|
"author": "Reawpai Chunsoi <reawpai.chunsoi@gmail.com> (https://github.com/phaicom)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"eslint-plugin-readable-tailwind": ">=2.0.0-beta.
|
|
24
|
+
"eslint-plugin-readable-tailwind": ">=2.0.0-beta.1"
|
|
25
25
|
},
|
|
26
26
|
"peerDependenciesMeta": {
|
|
27
27
|
"eslint-plugin-readable-tailwind": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"@commitlint/config-conventional": "^19.6.0",
|
|
38
38
|
"bumpp": "^10.0.1",
|
|
39
39
|
"eslint-plugin-format": "^1.0.1",
|
|
40
|
+
"eslint-plugin-readable-tailwind": "^2.0.0-beta.1",
|
|
40
41
|
"lint-staged": "^15.4.3",
|
|
41
42
|
"simple-git-hooks": "^2.11.1",
|
|
42
43
|
"tsup": "^8.3.6",
|
|
43
|
-
"typescript": "^5.7.3"
|
|
44
|
-
"eslint-plugin-readable-tailwind": "2.0.0-beta.0"
|
|
44
|
+
"typescript": "^5.7.3"
|
|
45
45
|
},
|
|
46
46
|
"commitlint": {
|
|
47
47
|
"extends": [
|