@tommy-mitchell/eslint-config-xo 0.5.0 → 0.6.0
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/index.js +15 -9
- package/package.json +3 -3
- package/react.js +12 -0
- package/tailwind.js +1 -0
package/index.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
4
|
plugins: ["perfectionist", "simple-import-sort"],
|
|
5
|
+
settings: {
|
|
6
|
+
perfectionist: {
|
|
7
|
+
partitionByComment: "(group) *",
|
|
8
|
+
type: "natural",
|
|
9
|
+
},
|
|
10
|
+
},
|
|
5
11
|
rules: {
|
|
6
12
|
// https://github.com/xojs/eslint-config-xo/blob/v0.44.0/index.js#L304
|
|
7
13
|
"capitalized-comments": "off",
|
|
@@ -10,11 +16,11 @@ module.exports = {
|
|
|
10
16
|
// https://github.com/xojs/eslint-config-xo/blob/v0.44.0/index.js#L186
|
|
11
17
|
"no-warning-comments": ["warn", { decoration: ["/", "*"] }],
|
|
12
18
|
"object-shorthand": "off",
|
|
13
|
-
"perfectionist/sort-array-includes":
|
|
14
|
-
"perfectionist/sort-maps":
|
|
15
|
-
"perfectionist/sort-objects":
|
|
19
|
+
"perfectionist/sort-array-includes": "error",
|
|
20
|
+
"perfectionist/sort-maps": "error",
|
|
21
|
+
"perfectionist/sort-objects": "error",
|
|
16
22
|
// TODO: doesn't play nice with unicorn/switch-case-braces: https://github.com/azat-io/eslint-plugin-perfectionist/issues/54#issuecomment-2268283085
|
|
17
|
-
"perfectionist/sort-switch-case":
|
|
23
|
+
"perfectionist/sort-switch-case": "error",
|
|
18
24
|
"simple-import-sort/exports": "error",
|
|
19
25
|
"simple-import-sort/imports": ["error", {
|
|
20
26
|
groups: [["^\\u0000", "^node:", "^react", "^react-dom", "^@?\\w", "^", "^\\."]],
|
|
@@ -32,11 +38,11 @@ module.exports = {
|
|
|
32
38
|
"@typescript-eslint/no-confusing-void-expression": ["error", { ignoreArrowShorthand: true }],
|
|
33
39
|
// https://github.com/xojs/eslint-config-xo-typescript/blob/v2.0.0/index.js#L707
|
|
34
40
|
"@typescript-eslint/prefer-regexp-exec": "off",
|
|
35
|
-
"perfectionist/sort-enums": ["error", {
|
|
36
|
-
"perfectionist/sort-interfaces":
|
|
37
|
-
"perfectionist/sort-intersection-types":
|
|
38
|
-
"perfectionist/sort-object-types":
|
|
39
|
-
"perfectionist/sort-union-types":
|
|
41
|
+
"perfectionist/sort-enums": ["error", { forceNumericSort: true }],
|
|
42
|
+
"perfectionist/sort-interfaces": "error",
|
|
43
|
+
"perfectionist/sort-intersection-types": "error",
|
|
44
|
+
"perfectionist/sort-object-types": "error",
|
|
45
|
+
"perfectionist/sort-union-types": "error",
|
|
40
46
|
},
|
|
41
47
|
}],
|
|
42
48
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tommy-mitchell/eslint-config-xo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Personal config for XO.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nodejs",
|
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
"eslint-config-xo-react": "^0.27.0",
|
|
30
30
|
"eslint-plugin-dprint-integration": "^0.3.0",
|
|
31
31
|
"eslint-plugin-jsx-a11y": "^6.9.0",
|
|
32
|
-
"eslint-plugin-perfectionist": "^3.
|
|
32
|
+
"eslint-plugin-perfectionist": "^3.2.0",
|
|
33
33
|
"eslint-plugin-react": "^7.35.0",
|
|
34
34
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
35
35
|
"eslint-plugin-react-refresh": "^0.4.9",
|
|
36
|
-
"eslint-plugin-readable-tailwind": "^1.
|
|
36
|
+
"eslint-plugin-readable-tailwind": "^1.7.0",
|
|
37
37
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
38
38
|
"eslint-plugin-sort-react-dependency-arrays": "^1.0.0",
|
|
39
39
|
"eslint-plugin-tailwindcss": "^3.17.4"
|
package/react.js
CHANGED
|
@@ -24,5 +24,17 @@ module.exports = {
|
|
|
24
24
|
rules: {
|
|
25
25
|
"@typescript-eslint/naming-convention": "off",
|
|
26
26
|
},
|
|
27
|
+
}, {
|
|
28
|
+
files: "**/*.{ts,cts,mts,tsx}",
|
|
29
|
+
rules: {
|
|
30
|
+
"perfectionist/sort-interfaces": ["error", {
|
|
31
|
+
customGroups: { callback: "on*" },
|
|
32
|
+
groups: ["unknown", "callback"],
|
|
33
|
+
}],
|
|
34
|
+
"perfectionist/sort-object-types": ["error", {
|
|
35
|
+
customGroups: { callback: "on*" },
|
|
36
|
+
groups: ["unknown", "callback"],
|
|
37
|
+
}],
|
|
38
|
+
},
|
|
27
39
|
}],
|
|
28
40
|
};
|