@vp-tw/eslint-config 0.0.13 → 0.0.14
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.
|
@@ -70,7 +70,17 @@ const jsoncInternal = (composer, options) => {
|
|
|
70
70
|
/**
|
|
71
71
|
* Default.
|
|
72
72
|
*/
|
|
73
|
-
"jsonc/sort-keys":
|
|
73
|
+
"jsonc/sort-keys": [
|
|
74
|
+
"error",
|
|
75
|
+
{
|
|
76
|
+
pathPattern: ".*",
|
|
77
|
+
order: {
|
|
78
|
+
type: "asc",
|
|
79
|
+
caseSensitive: false,
|
|
80
|
+
natural: true
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
],
|
|
74
84
|
/**
|
|
75
85
|
* Overridable.
|
|
76
86
|
*/
|
|
@@ -131,7 +141,9 @@ const jsoncInternal = (composer, options) => {
|
|
|
131
141
|
{
|
|
132
142
|
pathPattern: ".*",
|
|
133
143
|
order: {
|
|
134
|
-
type: "asc"
|
|
144
|
+
type: "asc",
|
|
145
|
+
caseSensitive: false,
|
|
146
|
+
natural: true
|
|
135
147
|
}
|
|
136
148
|
}
|
|
137
149
|
],
|
|
@@ -24,6 +24,12 @@ const typescriptInternal = (composer, options) => {
|
|
|
24
24
|
/**
|
|
25
25
|
* Default.
|
|
26
26
|
*/
|
|
27
|
+
/**
|
|
28
|
+
* Use `Array<T>` instead of `T[]` for better DX.
|
|
29
|
+
*
|
|
30
|
+
* - [Array<T> vs T[]: Which is better?](https://www.totaltypescript.com/array-types-in-typescript)
|
|
31
|
+
* - [Array Types in TypeScript](https://tkdodo.eu/blog/array-types-in-type-script)
|
|
32
|
+
*/
|
|
27
33
|
"ts/array-type": ["error", { default: "generic" }],
|
|
28
34
|
/**
|
|
29
35
|
* Namespaces are useful for centralizing the management of types. Just avoid
|
|
@@ -59,7 +59,17 @@ const yamlInternal = (composer, options) => {
|
|
|
59
59
|
...options?.sortKeys,
|
|
60
60
|
files: [GLOB_PNPM_WORKSPACE_YAML, ...options?.sortKeys?.files ?? []],
|
|
61
61
|
rules: {
|
|
62
|
-
"yaml/sort-keys": [
|
|
62
|
+
"yaml/sort-keys": [
|
|
63
|
+
"error",
|
|
64
|
+
{
|
|
65
|
+
pathPattern: ".*",
|
|
66
|
+
order: {
|
|
67
|
+
type: "asc",
|
|
68
|
+
caseSensitive: false,
|
|
69
|
+
natural: true
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
63
73
|
...options?.sortKeys?.rules
|
|
64
74
|
}
|
|
65
75
|
}
|
package/dist/extends/jsonc.js
CHANGED
|
@@ -66,7 +66,14 @@ const jsoncInternal = (composer, options) => {
|
|
|
66
66
|
/**
|
|
67
67
|
* Default.
|
|
68
68
|
*/
|
|
69
|
-
"jsonc/sort-keys": "error",
|
|
69
|
+
"jsonc/sort-keys": ["error", {
|
|
70
|
+
pathPattern: ".*",
|
|
71
|
+
order: {
|
|
72
|
+
type: "asc",
|
|
73
|
+
caseSensitive: false,
|
|
74
|
+
natural: true
|
|
75
|
+
}
|
|
76
|
+
}],
|
|
70
77
|
/**
|
|
71
78
|
* Overridable.
|
|
72
79
|
*/
|
|
@@ -122,7 +129,9 @@ const jsoncInternal = (composer, options) => {
|
|
|
122
129
|
"jsonc/sort-array-values": ["error", {
|
|
123
130
|
pathPattern: ".*",
|
|
124
131
|
order: {
|
|
125
|
-
type: "asc"
|
|
132
|
+
type: "asc",
|
|
133
|
+
caseSensitive: false,
|
|
134
|
+
natural: true
|
|
126
135
|
}
|
|
127
136
|
}],
|
|
128
137
|
...options?.sortArrayValues?.rules
|
|
@@ -28,6 +28,12 @@ const typescriptInternal = (composer, options) => {
|
|
|
28
28
|
/**
|
|
29
29
|
* Default.
|
|
30
30
|
*/
|
|
31
|
+
/**
|
|
32
|
+
* Use `Array<T>` instead of `T[]` for better DX.
|
|
33
|
+
*
|
|
34
|
+
* - [Array<T> vs T[]: Which is better?](https://www.totaltypescript.com/array-types-in-typescript)
|
|
35
|
+
* - [Array Types in TypeScript](https://tkdodo.eu/blog/array-types-in-type-script)
|
|
36
|
+
*/
|
|
31
37
|
"ts/array-type": ["error", {
|
|
32
38
|
default: "generic"
|
|
33
39
|
}],
|
package/dist/extends/yaml.js
CHANGED
|
@@ -56,7 +56,14 @@ const yamlInternal = (composer, options) => {
|
|
|
56
56
|
...options?.sortKeys,
|
|
57
57
|
files: [_globs.GLOB_PNPM_WORKSPACE_YAML, ...(options?.sortKeys?.files ?? [])],
|
|
58
58
|
rules: {
|
|
59
|
-
"yaml/sort-keys": ["error",
|
|
59
|
+
"yaml/sort-keys": ["error", {
|
|
60
|
+
pathPattern: ".*",
|
|
61
|
+
order: {
|
|
62
|
+
type: "asc",
|
|
63
|
+
caseSensitive: false,
|
|
64
|
+
natural: true
|
|
65
|
+
}
|
|
66
|
+
}],
|
|
60
67
|
...options?.sortKeys?.rules
|
|
61
68
|
}
|
|
62
69
|
}]);
|