@haltcase/style 6.2.1 → 7.0.0-canary.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/eslint/configs/browser.js +19 -0
- package/eslint/configs/cjs.js +1 -0
- package/eslint/configs/internal/base.js +180 -0
- package/eslint/configs/internal/commonjs.js +22 -0
- package/eslint/{rules → configs/internal}/es2015.js +14 -16
- package/eslint/configs/internal/simple-import-sort.js +24 -0
- package/eslint/configs/internal/tsdoc.js +17 -0
- package/eslint/{rules → configs/internal}/unicorn.js +116 -121
- package/eslint/configs/next.js +36 -0
- package/eslint/configs/node.js +19 -0
- package/eslint/configs/playwright-test.js +17 -0
- package/eslint/configs/react.js +54 -0
- package/eslint/configs/typescript.js +84 -0
- package/eslint/constants.js +12 -28
- package/eslint/index.js +27 -0
- package/eslint/rules/best-practice.js +250 -245
- package/eslint/rules/imports.js +94 -0
- package/eslint/rules/jsx-a11y.js +11 -10
- package/eslint/rules/playwright-test.js +25 -26
- package/eslint/rules/possible-errors.js +38 -45
- package/eslint/rules/react.js +105 -104
- package/eslint/rules/stylistic.js +83 -84
- package/eslint/rules/typescript/extension.js +55 -39
- package/eslint/rules/typescript/import.js +16 -15
- package/eslint/rules/typescript/index.js +109 -121
- package/eslint/rules/typescript/naming-convention.js +71 -0
- package/eslint/rules/variables.js +34 -34
- package/eslint/withFiles.js +15 -0
- package/package.json +58 -56
- package/prettier/index.js +4 -11
- package/readme.md +181 -98
- package/stylelint/_base.js +2 -4
- package/stylelint/index.js +6 -7
- package/stylelint/modules.js +7 -8
- package/stylelint/standard.js +2 -5
- package/typescript/tsconfig.base.json +2 -1
- package/typescript/tsconfig.bundler.json +7 -3
- package/typescript/tsconfig.next.json +14 -6
- package/typescript/tsconfig.node.json +1 -1
- package/typescript/tsconfig.node18.json +4 -7
- package/typescript/tsconfig.node20.json +4 -7
- package/typescript/tsconfig.node22.json +10 -0
- package/typescript/tsconfig.web.json +1 -1
- package/eslint/_base.js +0 -82
- package/eslint/astro.js +0 -40
- package/eslint/browser.js +0 -8
- package/eslint/cjs.js +0 -12
- package/eslint/jest.js +0 -28
- package/eslint/next.js +0 -38
- package/eslint/node.js +0 -8
- package/eslint/playwright-test.js +0 -8
- package/eslint/react.js +0 -18
- package/eslint/rules/import.js +0 -92
- package/eslint/rules/jest.js +0 -28
- package/eslint/rules/simple-import-sort.js +0 -23
- package/eslint/rules/tsdoc.js +0 -17
- package/eslint/rules/typescript/strict.js +0 -18
- package/eslint/typescript.js +0 -26
- package/eslint/utils/require-package.js +0 -44
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
levels: { off }
|
|
5
|
-
} = require("../../constants");
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
6
4
|
|
|
7
5
|
/**
|
|
8
|
-
* These are enabled by `import/recommended`, but are better handled by
|
|
9
|
-
* TypeScript and
|
|
6
|
+
* These are enabled by `import-x/recommended`, but are better handled by
|
|
7
|
+
* TypeScript and `typescript-eslint`.
|
|
8
|
+
*
|
|
9
|
+
* @type {Linter.RulesRecord}
|
|
10
10
|
*/
|
|
11
11
|
const disabledRules = {
|
|
12
|
-
"import/default": off,
|
|
13
|
-
"import/export": off,
|
|
14
|
-
"import/namespace": off,
|
|
15
|
-
"import/no-unresolved": off
|
|
12
|
+
"import-x/default": "off",
|
|
13
|
+
"import-x/export": "off",
|
|
14
|
+
"import-x/namespace": "off",
|
|
15
|
+
"import-x/no-unresolved": "off"
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
/**
|
|
19
|
+
* @type {Linter.RulesRecord}
|
|
20
|
+
*/
|
|
21
|
+
export const typescriptImportRules = {
|
|
22
|
+
...disabledRules
|
|
22
23
|
};
|
|
@@ -1,125 +1,113 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Prevent `void` type expressions from being used in misleading locations
|
|
71
|
-
* such as being assigned to a variable, provided as a function argument,
|
|
72
|
-
* or returned from a function (except concise arrow functions).
|
|
73
|
-
*
|
|
74
|
-
* 🔧 Fixable - https://typescript-eslint.io/rules/no-confusing-void-expression/
|
|
75
|
-
*/
|
|
76
|
-
"@typescript-eslint/no-confusing-void-expression": [
|
|
77
|
-
error,
|
|
78
|
-
{
|
|
79
|
-
ignoreArrowShorthand: true
|
|
5
|
+
/**
|
|
6
|
+
* @type {Linter.RulesRecord}
|
|
7
|
+
*/
|
|
8
|
+
export const typescriptBaseRules = {
|
|
9
|
+
/**
|
|
10
|
+
* Require consistent usage of type exports.
|
|
11
|
+
*
|
|
12
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/consistent-type-exports/
|
|
13
|
+
*/
|
|
14
|
+
"@typescript-eslint/consistent-type-exports": [
|
|
15
|
+
"warn",
|
|
16
|
+
{ fixMixedExportsWithInlineTypeSpecifier: true }
|
|
17
|
+
],
|
|
18
|
+
/**
|
|
19
|
+
* Require consistent usage of type imports.
|
|
20
|
+
*
|
|
21
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/consistent-type-imports/
|
|
22
|
+
*/
|
|
23
|
+
"@typescript-eslint/consistent-type-imports": "warn",
|
|
24
|
+
/**
|
|
25
|
+
* Require explicit return types on functions and class methods.
|
|
26
|
+
*
|
|
27
|
+
* 🚫 Not fixable - https://typescript-eslint.io/rules/explicit-function-return-type/
|
|
28
|
+
*/
|
|
29
|
+
"@typescript-eslint/explicit-function-return-type": [
|
|
30
|
+
"warn",
|
|
31
|
+
{
|
|
32
|
+
allowExpressions: true,
|
|
33
|
+
allowFunctionsWithoutTypeParameters: true,
|
|
34
|
+
allowTypedFunctionExpressions: true
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
/**
|
|
38
|
+
* Require using function property types in method signatures.
|
|
39
|
+
*
|
|
40
|
+
* These have enhanced typechecking, whereas method signatures do not.
|
|
41
|
+
*
|
|
42
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/method-signature-style/
|
|
43
|
+
*/
|
|
44
|
+
"@typescript-eslint/method-signature-style": "warn",
|
|
45
|
+
/**
|
|
46
|
+
* Prevent `void` type expressions from being used in misleading locations
|
|
47
|
+
* such as being assigned to a variable, provided as a function argument,
|
|
48
|
+
* or returned from a function (except concise arrow functions).
|
|
49
|
+
*
|
|
50
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/no-confusing-void-expression/
|
|
51
|
+
*/
|
|
52
|
+
"@typescript-eslint/no-confusing-void-expression": [
|
|
53
|
+
"error",
|
|
54
|
+
{
|
|
55
|
+
ignoreArrowShorthand: true
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
/**
|
|
59
|
+
* Disallow Promises in places not designed to handle them.
|
|
60
|
+
*
|
|
61
|
+
* Function arguments and JSX attributes are allowed.
|
|
62
|
+
*
|
|
63
|
+
* 🚫 Not fixable - https://typescript-eslint.io/rules/no-misused-promises
|
|
64
|
+
*/
|
|
65
|
+
"@typescript-eslint/no-misused-promises": [
|
|
66
|
+
"error",
|
|
67
|
+
{
|
|
68
|
+
checksVoidReturn: {
|
|
69
|
+
arguments: false,
|
|
70
|
+
attributes: false
|
|
80
71
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
/**
|
|
75
|
+
* Disallow members of unions and intersections that do nothing or override type information.
|
|
76
|
+
*
|
|
77
|
+
* 🚫 Not fixable - https://typescript-eslint.io/rules/no-redundant-type-constituents/
|
|
78
|
+
*/
|
|
79
|
+
"@typescript-eslint/no-redundant-type-constituents": "warn",
|
|
80
|
+
/**
|
|
81
|
+
* Disallow unnecessary namespace qualifiers.
|
|
82
|
+
*
|
|
83
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/no-unnecessary-qualifier/
|
|
84
|
+
*/
|
|
85
|
+
"@typescript-eslint/no-unnecessary-qualifier": "warn",
|
|
86
|
+
/**
|
|
87
|
+
* Enforce using the nullish coalescing operator instead of logical assignments or chaining.
|
|
88
|
+
*
|
|
89
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/prefer-nullish-coalescing/
|
|
90
|
+
*/
|
|
91
|
+
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
92
|
+
"error",
|
|
93
|
+
{
|
|
94
|
+
ignorePrimitives: {
|
|
95
|
+
string: true
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
* 🔧 Fixable - https://typescript-eslint.io/rules/prefer-regexp-exec/
|
|
114
|
-
*/
|
|
115
|
-
"@typescript-eslint/prefer-regexp-exec": warn,
|
|
116
|
-
/**
|
|
117
|
-
* Require exhaustive checks when using union types in switch statements.
|
|
118
|
-
*
|
|
119
|
-
* This ensures cases are considered when items are later added to a union.
|
|
120
|
-
*
|
|
121
|
-
* 🚫 Not fixable - https://typescript-eslint.io/rules/switch-exhaustiveness-check/
|
|
122
|
-
*/
|
|
123
|
-
"@typescript-eslint/switch-exhaustiveness-check": error
|
|
124
|
-
}
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
/**
|
|
100
|
+
* Require using `RegExp.exec()` over `String.match()` for consistency.
|
|
101
|
+
*
|
|
102
|
+
* 🔧 Fixable - https://typescript-eslint.io/rules/prefer-regexp-exec/
|
|
103
|
+
*/
|
|
104
|
+
"@typescript-eslint/prefer-regexp-exec": "warn",
|
|
105
|
+
/**
|
|
106
|
+
* Require exhaustive checks when using union types in switch statements.
|
|
107
|
+
*
|
|
108
|
+
* This ensures cases are considered when items are later added to a union.
|
|
109
|
+
*
|
|
110
|
+
* 🚫 Not fixable - https://typescript-eslint.io/rules/switch-exhaustiveness-check/
|
|
111
|
+
*/
|
|
112
|
+
"@typescript-eslint/switch-exhaustiveness-check": "error"
|
|
125
113
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @param {object} [options]
|
|
7
|
+
* @param {boolean} [options.isTsx = false] - Whether to lint as TSX (JSX).
|
|
8
|
+
* @returns {Linter.RulesRecord}
|
|
9
|
+
*/
|
|
10
|
+
export const getTypescriptNamingConventionRule = ({ isTsx = false } = {}) => ({
|
|
11
|
+
/**
|
|
12
|
+
* Require consistent naming conventions.
|
|
13
|
+
*
|
|
14
|
+
* Improves IntelliSense suggestions and avoids name collisions.
|
|
15
|
+
*
|
|
16
|
+
* 🚫 Not fixable - https://typescript-eslint.io/rules/naming-convention/
|
|
17
|
+
*/
|
|
18
|
+
"@typescript-eslint/naming-convention": [
|
|
19
|
+
"error",
|
|
20
|
+
// enforce that everything is camelCase by default
|
|
21
|
+
{
|
|
22
|
+
format: ["camelCase", isTsx && "StrictPascalCase"].filter(Boolean),
|
|
23
|
+
leadingUnderscore: "forbid",
|
|
24
|
+
selector: "default",
|
|
25
|
+
trailingUnderscore: "forbid"
|
|
26
|
+
},
|
|
27
|
+
// anything type-like must be written in PascalCase
|
|
28
|
+
{
|
|
29
|
+
format: ["PascalCase"],
|
|
30
|
+
leadingUnderscore: "forbid",
|
|
31
|
+
selector: ["typeLike", "enumMember"],
|
|
32
|
+
trailingUnderscore: "forbid"
|
|
33
|
+
},
|
|
34
|
+
// interfaces must not be prefixed with `I` or have restricted names
|
|
35
|
+
{
|
|
36
|
+
custom: {
|
|
37
|
+
match: false,
|
|
38
|
+
regex: "^I[A-Z]|^(Interface|Props|State)$"
|
|
39
|
+
},
|
|
40
|
+
format: ["PascalCase"],
|
|
41
|
+
selector: "interface"
|
|
42
|
+
},
|
|
43
|
+
// allow leading underscore(s) in object properties for things like brand identifiers
|
|
44
|
+
{
|
|
45
|
+
format: null,
|
|
46
|
+
leadingUnderscore: "allowSingleOrDouble",
|
|
47
|
+
selector: "objectLiteralProperty",
|
|
48
|
+
trailingUnderscore: "forbid"
|
|
49
|
+
},
|
|
50
|
+
// booleans must be prefixed with an allowed verb
|
|
51
|
+
// https://typescript-eslint.io/rules/naming-convention/#enforce-that-boolean-variables-are-prefixed-with-an-allowed-verb
|
|
52
|
+
{
|
|
53
|
+
format: ["PascalCase"],
|
|
54
|
+
leadingUnderscore: "forbid",
|
|
55
|
+
prefix: ["is", "has", "should", "can", "did", "will"],
|
|
56
|
+
selector: "variable",
|
|
57
|
+
trailingUnderscore: "forbid",
|
|
58
|
+
types: ["boolean"]
|
|
59
|
+
},
|
|
60
|
+
// ignore destructured properties (which are often out of our control)
|
|
61
|
+
{
|
|
62
|
+
format: null,
|
|
63
|
+
modifiers: ["destructured"],
|
|
64
|
+
selector: "variable"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
format: null,
|
|
68
|
+
selector: "typeProperty"
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
});
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
]
|
|
35
|
-
}
|
|
5
|
+
/**
|
|
6
|
+
* @type {Linter.RulesRecord}
|
|
7
|
+
*/
|
|
8
|
+
export const variablesRules = {
|
|
9
|
+
/**
|
|
10
|
+
* Disallow labels that share a name with a variable.
|
|
11
|
+
*
|
|
12
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
|
|
13
|
+
*/
|
|
14
|
+
"no-label-var": "error",
|
|
15
|
+
/**
|
|
16
|
+
* Disallow initializing variables to `undefined`.
|
|
17
|
+
*
|
|
18
|
+
* 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init
|
|
19
|
+
*/
|
|
20
|
+
"no-undef-init": "warn",
|
|
21
|
+
/**
|
|
22
|
+
* Disallow unused variables.
|
|
23
|
+
*
|
|
24
|
+
* 🚫 Not fixable - https://eslint.org/docs/rules/no-unused-vars
|
|
25
|
+
*/
|
|
26
|
+
"no-unused-vars": [
|
|
27
|
+
"error",
|
|
28
|
+
{
|
|
29
|
+
args: "after-used",
|
|
30
|
+
argsIgnorePattern: "^_",
|
|
31
|
+
ignoreRestSiblings: true,
|
|
32
|
+
vars: "all",
|
|
33
|
+
varsIgnorePattern: "^_"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
36
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Linter } from "eslint"
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @param {Linter.Config[]} configArray
|
|
8
|
+
* @param {string[]} files
|
|
9
|
+
* @returns {Linter.Config[]}
|
|
10
|
+
*/
|
|
11
|
+
export const withFiles = (configArray, files) =>
|
|
12
|
+
configArray.map((config) => ({
|
|
13
|
+
...config,
|
|
14
|
+
files
|
|
15
|
+
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haltcase/style",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0-canary.2",
|
|
4
4
|
"description": "haltcase's web ecosystem style guide & configurations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
},
|
|
18
18
|
"license": "MPL-2.0",
|
|
19
19
|
"author": "Bo Lingen <bo@haltcase.dev> (https://haltcase.dev)",
|
|
20
|
+
"type": "module",
|
|
20
21
|
"exports": {
|
|
22
|
+
"./eslint": "./eslint/index.js",
|
|
21
23
|
"./eslint/rules/*": "./eslint/rules/*.js",
|
|
22
24
|
"./eslint/rules/*.js": "./eslint/rules/*.js",
|
|
23
|
-
"./eslint/
|
|
24
|
-
"./eslint/
|
|
25
|
-
"./eslint/
|
|
26
|
-
"./eslint/
|
|
27
|
-
"./eslint/
|
|
28
|
-
"./eslint/
|
|
29
|
-
"./eslint/
|
|
30
|
-
"./eslint/react": "./eslint/react.js",
|
|
31
|
-
"./eslint/typescript": "./eslint/typescript.js",
|
|
25
|
+
"./eslint/browser": "./eslint/configs/browser.js",
|
|
26
|
+
"./eslint/cjs": "./eslint/configs/cjs.js",
|
|
27
|
+
"./eslint/next": "./eslint/configs/next.js",
|
|
28
|
+
"./eslint/node": "./eslint/configs/node.js",
|
|
29
|
+
"./eslint/playwright-test": "./eslint/configs/playwright-test.js",
|
|
30
|
+
"./eslint/react": "./eslint/configs/react.js",
|
|
31
|
+
"./eslint/typescript": "./eslint/configs/typescript.js",
|
|
32
32
|
"./prettier": "./prettier/index.js",
|
|
33
33
|
"./stylelint": "./stylelint/index.js",
|
|
34
34
|
"./stylelint/modules": "./stylelint/modules.js",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"./typescript/node": "./typescript/tsconfig.node.json",
|
|
40
40
|
"./typescript/node18": "./typescript/tsconfig.node18.json",
|
|
41
41
|
"./typescript/node20": "./typescript/tsconfig.node20.json",
|
|
42
|
+
"./typescript/node22": "./typescript/tsconfig.node22.json",
|
|
42
43
|
"./typescript/web": "./typescript/tsconfig.web.json"
|
|
43
44
|
},
|
|
44
45
|
"files": [
|
|
@@ -46,13 +47,12 @@
|
|
|
46
47
|
"prettier",
|
|
47
48
|
"stylelint",
|
|
48
49
|
"typescript",
|
|
49
|
-
"astro",
|
|
50
50
|
"next"
|
|
51
51
|
],
|
|
52
52
|
"scripts": {
|
|
53
53
|
"eslint-check": "eslint --max-warnings=0 .",
|
|
54
54
|
"format": "eslint --fix . && prettier --write .",
|
|
55
|
-
"prepare": "husky
|
|
55
|
+
"prepare": "husky",
|
|
56
56
|
"prettier-check": "prettier --check .",
|
|
57
57
|
"semantic-release": "semantic-release",
|
|
58
58
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
@@ -60,58 +60,63 @@
|
|
|
60
60
|
"lint-staged": {
|
|
61
61
|
"*.{js,jsx,ts,tsx,css,yml,yaml}": "pnpm prettier --write"
|
|
62
62
|
},
|
|
63
|
-
"prettier": "./prettier",
|
|
63
|
+
"prettier": "./prettier/index.js",
|
|
64
64
|
"stylelint": {
|
|
65
65
|
"extends": "./stylelint/index.js"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@babel/core": "^7.
|
|
69
|
-
"@babel/eslint-parser": "^7.
|
|
70
|
-
"@
|
|
71
|
-
"
|
|
72
|
-
"@typescript-eslint/parser": "^6.9.0",
|
|
73
|
-
"eslint-config-prettier": "^9.0.0",
|
|
68
|
+
"@babel/core": "^7.26.0",
|
|
69
|
+
"@babel/eslint-parser": "^7.25.9",
|
|
70
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
|
|
71
|
+
"eslint-config-prettier": "^9.1.0",
|
|
74
72
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
75
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
76
|
-
"eslint-plugin-
|
|
77
|
-
"eslint-plugin-
|
|
78
|
-
"eslint-plugin-
|
|
79
|
-
"eslint-plugin-
|
|
80
|
-
"eslint-plugin-
|
|
81
|
-
"eslint-plugin-
|
|
82
|
-
"eslint-plugin-
|
|
83
|
-
"eslint-plugin-
|
|
84
|
-
"eslint-plugin-
|
|
85
|
-
"eslint-plugin-
|
|
86
|
-
"
|
|
87
|
-
"
|
|
88
|
-
"prettier-plugin-
|
|
89
|
-
"
|
|
90
|
-
"stylelint-config-clean-order": "^5.4.1",
|
|
73
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
74
|
+
"eslint-plugin-import-x": "^4.4.0",
|
|
75
|
+
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
76
|
+
"eslint-plugin-playwright": "^2.0.0",
|
|
77
|
+
"eslint-plugin-react": "^7.37.2",
|
|
78
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
79
|
+
"eslint-plugin-regexp": "^2.6.0",
|
|
80
|
+
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
81
|
+
"eslint-plugin-testing-library": "^6.4.0",
|
|
82
|
+
"eslint-plugin-tsdoc": "^0.3.0",
|
|
83
|
+
"eslint-plugin-unicorn": "^56.0.0",
|
|
84
|
+
"postcss-html": "^1.7.0",
|
|
85
|
+
"prettier-plugin-packagejson": "^2.5.3",
|
|
86
|
+
"prettier-plugin-tailwindcss": "^0.6.8",
|
|
87
|
+
"stylelint-config-clean-order": "^6.1.0",
|
|
91
88
|
"stylelint-config-html": "^1.1.0",
|
|
92
|
-
"stylelint-config-standard": "^36.0.
|
|
93
|
-
"stylelint-define-config": "^1.
|
|
89
|
+
"stylelint-config-standard": "^36.0.1",
|
|
90
|
+
"stylelint-define-config": "^1.7.0",
|
|
91
|
+
"typescript-eslint": "^8.12.2"
|
|
94
92
|
},
|
|
95
93
|
"devDependencies": {
|
|
96
|
-
"@actions/core": "^1.
|
|
94
|
+
"@actions/core": "^1.11.1",
|
|
97
95
|
"@actions/exec": "^1.1.1",
|
|
98
|
-
"@actions/github": "^
|
|
99
|
-
"@commitlint/cli": "^
|
|
100
|
-
"@commitlint/config-conventional": "^
|
|
101
|
-
"@
|
|
96
|
+
"@actions/github": "^6.0.0",
|
|
97
|
+
"@commitlint/cli": "^19.5.0",
|
|
98
|
+
"@commitlint/config-conventional": "^19.5.0",
|
|
99
|
+
"@eslint/eslintrc": "^3.1.0",
|
|
100
|
+
"@eslint/js": "^9.14.0",
|
|
101
|
+
"@octokit/types": "^13.6.1",
|
|
102
102
|
"@semantic-release/git": "^10.0.1",
|
|
103
|
-
"@types/
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
103
|
+
"@types/eslint-config-prettier": "^6.11.3",
|
|
104
|
+
"@types/eslint__js": "^8.42.3",
|
|
105
|
+
"@types/node": "22",
|
|
106
|
+
"@typescript-eslint/types": "^8.12.2",
|
|
107
|
+
"eslint": "^9.14.0",
|
|
108
|
+
"eslint-define-config": "^2.1.0",
|
|
109
|
+
"globals": "^15.11.0",
|
|
110
|
+
"husky": "^9.1.6",
|
|
111
|
+
"lint-staged": "^15.2.10",
|
|
112
|
+
"prettier": "^3.3.3",
|
|
113
|
+
"semantic-release": "^24.2.0",
|
|
114
|
+
"stylelint": "^16.10.0",
|
|
115
|
+
"typescript": "^5.6.3"
|
|
111
116
|
},
|
|
112
117
|
"peerDependencies": {
|
|
113
|
-
"@next/eslint-plugin-next": ">=
|
|
114
|
-
"eslint": ">=
|
|
118
|
+
"@next/eslint-plugin-next": ">=14 <16",
|
|
119
|
+
"eslint": ">=9",
|
|
115
120
|
"prettier": ">=3.0.0 <4",
|
|
116
121
|
"stylelint": ">=16.3.1 <17",
|
|
117
122
|
"typescript": ">=5.0.0 <6"
|
|
@@ -123,9 +128,6 @@
|
|
|
123
128
|
"eslint": {
|
|
124
129
|
"optional": true
|
|
125
130
|
},
|
|
126
|
-
"eslint-plugin-astro": {
|
|
127
|
-
"optional": true
|
|
128
|
-
},
|
|
129
131
|
"prettier": {
|
|
130
132
|
"optional": true
|
|
131
133
|
},
|
|
@@ -136,7 +138,7 @@
|
|
|
136
138
|
"optional": true
|
|
137
139
|
}
|
|
138
140
|
},
|
|
139
|
-
"packageManager": "pnpm@
|
|
141
|
+
"packageManager": "pnpm@9.10.0+sha256.355a8ab8dbb6ad41befbef39bc4fd6b5df85e12761d2724bd01f13e878de4b13",
|
|
140
142
|
"engines": {
|
|
141
143
|
"node": ">=20"
|
|
142
144
|
},
|
package/prettier/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable import-x/no-default-export */
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Some of Prettier's defaults can be overridden by an EditorConfig file. We
|
|
@@ -13,17 +13,10 @@ const overridableDefaults = {
|
|
|
13
13
|
useTabs: true
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
export default {
|
|
17
17
|
...overridableDefaults,
|
|
18
18
|
singleQuote: false,
|
|
19
19
|
trailingComma: "none",
|
|
20
|
-
plugins: ["prettier-plugin-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
files: "*.astro",
|
|
24
|
-
options: {
|
|
25
|
-
parser: "astro"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
]
|
|
20
|
+
plugins: ["prettier-plugin-packagejson", "prettier-plugin-tailwindcss"],
|
|
21
|
+
tailwindAttributes: ["classNames", "clsx", "cx", "twMerge"]
|
|
29
22
|
};
|