js-style-kit 0.2.11 → 0.3.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/README.md +74 -11
- package/dist/bin/index.js +12 -16
- package/dist/bin/index.js.map +1 -1
- package/dist/index.d.ts +130 -9
- package/dist/index.js +301 -83
- package/dist/index.js.map +1 -1
- package/package.json +19 -14
- package/dist/eslint/base/config.d.ts +0 -17
- package/dist/eslint/base/config.js +0 -457
- package/dist/eslint/base/config.js.map +0 -1
- package/dist/eslint/base/rules.d.ts +0 -18
- package/dist/eslint/base/rules.js +0 -425
- package/dist/eslint/base/rules.js.map +0 -1
- package/dist/eslint/base/types.d.ts +0 -21
- package/dist/eslint/base/types.js +0 -1
- package/dist/eslint/base/types.js.map +0 -1
- package/dist/eslint/constants.d.ts +0 -28
- package/dist/eslint/constants.js +0 -25
- package/dist/eslint/constants.js.map +0 -1
- package/dist/eslint/ignores.d.ts +0 -19
- package/dist/eslint/ignores.js +0 -42
- package/dist/eslint/ignores.js.map +0 -1
- package/dist/eslint/index.d.ts +0 -55
- package/dist/eslint/index.js +0 -1410
- package/dist/eslint/index.js.map +0 -1
- package/dist/eslint/jsdoc/config.d.ts +0 -14
- package/dist/eslint/jsdoc/config.js +0 -109
- package/dist/eslint/jsdoc/config.js.map +0 -1
- package/dist/eslint/jsdoc/rules.d.ts +0 -15
- package/dist/eslint/jsdoc/rules.js +0 -73
- package/dist/eslint/jsdoc/rules.js.map +0 -1
- package/dist/eslint/jsdoc/types.d.ts +0 -52
- package/dist/eslint/jsdoc/types.js +0 -1
- package/dist/eslint/jsdoc/types.js.map +0 -1
- package/dist/eslint/nextjs/config.d.ts +0 -12
- package/dist/eslint/nextjs/config.js +0 -62
- package/dist/eslint/nextjs/config.js.map +0 -1
- package/dist/eslint/nextjs/rules.d.ts +0 -8
- package/dist/eslint/nextjs/rules.js +0 -28
- package/dist/eslint/nextjs/rules.js.map +0 -1
- package/dist/eslint/nextjs/types.d.ts +0 -29
- package/dist/eslint/nextjs/types.js +0 -1
- package/dist/eslint/nextjs/types.js.map +0 -1
- package/dist/eslint/perfectionist/config.d.ts +0 -7
- package/dist/eslint/perfectionist/config.js +0 -65
- package/dist/eslint/perfectionist/config.js.map +0 -1
- package/dist/eslint/perfectionist/rules.d.ts +0 -12
- package/dist/eslint/perfectionist/rules.js +0 -31
- package/dist/eslint/perfectionist/rules.js.map +0 -1
- package/dist/eslint/prefer-arrow-function/config.d.ts +0 -12
- package/dist/eslint/prefer-arrow-function/config.js +0 -45
- package/dist/eslint/prefer-arrow-function/config.js.map +0 -1
- package/dist/eslint/prefer-arrow-function/types.d.ts +0 -17
- package/dist/eslint/prefer-arrow-function/types.js +0 -1
- package/dist/eslint/prefer-arrow-function/types.js.map +0 -1
- package/dist/eslint/react/config.d.ts +0 -18
- package/dist/eslint/react/config.js +0 -186
- package/dist/eslint/react/config.js.map +0 -1
- package/dist/eslint/react/rules.d.ts +0 -26
- package/dist/eslint/react/rules.js +0 -132
- package/dist/eslint/react/rules.js.map +0 -1
- package/dist/eslint/react-compiler/config.d.ts +0 -12
- package/dist/eslint/react-compiler/config.js +0 -39
- package/dist/eslint/react-compiler/config.js.map +0 -1
- package/dist/eslint/react-refresh/config.d.ts +0 -16
- package/dist/eslint/react-refresh/config.js +0 -55
- package/dist/eslint/react-refresh/config.js.map +0 -1
- package/dist/eslint/react-refresh/rules.d.ts +0 -38
- package/dist/eslint/react-refresh/rules.js +0 -19
- package/dist/eslint/react-refresh/rules.js.map +0 -1
- package/dist/eslint/storybook/config.d.ts +0 -13
- package/dist/eslint/storybook/config.js +0 -67
- package/dist/eslint/storybook/config.js.map +0 -1
- package/dist/eslint/testing/config.d.ts +0 -25
- package/dist/eslint/testing/config.js +0 -169
- package/dist/eslint/testing/config.js.map +0 -1
- package/dist/eslint/testing/jest-rules.d.ts +0 -14
- package/dist/eslint/testing/jest-rules.js +0 -44
- package/dist/eslint/testing/jest-rules.js.map +0 -1
- package/dist/eslint/testing/vitest-rules.d.ts +0 -14
- package/dist/eslint/testing/vitest-rules.js +0 -50
- package/dist/eslint/testing/vitest-rules.js.map +0 -1
- package/dist/eslint/turbo/config.d.ts +0 -12
- package/dist/eslint/turbo/config.js +0 -39
- package/dist/eslint/turbo/config.js.map +0 -1
- package/dist/eslint/turbo/types.d.ts +0 -11
- package/dist/eslint/turbo/types.js +0 -1
- package/dist/eslint/turbo/types.js.map +0 -1
- package/dist/eslint/types.d.ts +0 -11
- package/dist/eslint/types.js +0 -1
- package/dist/eslint/types.js.map +0 -1
- package/dist/eslint/typescript/config.d.ts +0 -11
- package/dist/eslint/typescript/config.js +0 -186
- package/dist/eslint/typescript/config.js.map +0 -1
- package/dist/eslint/typescript/rules.d.ts +0 -8
- package/dist/eslint/typescript/rules.js +0 -135
- package/dist/eslint/typescript/rules.js.map +0 -1
- package/dist/eslint/typescript/types.d.ts +0 -7
- package/dist/eslint/typescript/types.js +0 -1
- package/dist/eslint/typescript/types.js.map +0 -1
- package/dist/eslint/unicorn/config.d.ts +0 -11
- package/dist/eslint/unicorn/config.js +0 -113
- package/dist/eslint/unicorn/config.js.map +0 -1
- package/dist/eslint/unicorn/rules.d.ts +0 -8
- package/dist/eslint/unicorn/rules.js +0 -79
- package/dist/eslint/unicorn/rules.js.map +0 -1
- package/dist/modules.d.d.ts +0 -3
- package/dist/modules.d.js +0 -1
- package/dist/modules.d.js.map +0 -1
- package/dist/prettier/index.d.ts +0 -34
- package/dist/prettier/index.js +0 -132
- package/dist/prettier/index.js.map +0 -1
- package/dist/prettier/patch-tailwind-plugin.d.ts +0 -9
- package/dist/prettier/patch-tailwind-plugin.js +0 -72
- package/dist/prettier/patch-tailwind-plugin.js.map +0 -1
- package/dist/utils/is-type.d.ts +0 -44
- package/dist/utils/is-type.js +0 -28
- package/dist/utils/is-type.js.map +0 -1
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
// src/eslint/typescript/rules.ts
|
|
2
|
-
var tseslintRules = {
|
|
3
|
-
"@typescript-eslint/adjacent-overload-signatures": "warn",
|
|
4
|
-
"@typescript-eslint/array-type": "warn",
|
|
5
|
-
"@typescript-eslint/await-thenable": "warn",
|
|
6
|
-
"@typescript-eslint/ban-ts-comment": [
|
|
7
|
-
"warn",
|
|
8
|
-
{ minimumDescriptionLength: 10 }
|
|
9
|
-
],
|
|
10
|
-
"@typescript-eslint/ban-tslint-comment": "warn",
|
|
11
|
-
"@typescript-eslint/class-literal-property-style": "warn",
|
|
12
|
-
"@typescript-eslint/consistent-generic-constructors": "warn",
|
|
13
|
-
"@typescript-eslint/consistent-indexed-object-style": "warn",
|
|
14
|
-
"@typescript-eslint/consistent-type-assertions": "warn",
|
|
15
|
-
"@typescript-eslint/consistent-type-definitions": "warn",
|
|
16
|
-
"@typescript-eslint/consistent-type-exports": [
|
|
17
|
-
"warn",
|
|
18
|
-
{ fixMixedExportsWithInlineTypeSpecifier: true }
|
|
19
|
-
],
|
|
20
|
-
"@typescript-eslint/consistent-type-imports": [
|
|
21
|
-
"warn",
|
|
22
|
-
{
|
|
23
|
-
fixStyle: "inline-type-imports",
|
|
24
|
-
prefer: "type-imports"
|
|
25
|
-
}
|
|
26
|
-
],
|
|
27
|
-
"@typescript-eslint/dot-notation": "warn",
|
|
28
|
-
"@typescript-eslint/no-array-constructor": "warn",
|
|
29
|
-
"@typescript-eslint/no-array-delete": "warn",
|
|
30
|
-
"@typescript-eslint/no-base-to-string": "warn",
|
|
31
|
-
"@typescript-eslint/no-confusing-non-null-assertion": "warn",
|
|
32
|
-
"@typescript-eslint/no-confusing-void-expression": "warn",
|
|
33
|
-
"@typescript-eslint/no-deprecated": "warn",
|
|
34
|
-
"@typescript-eslint/no-duplicate-enum-values": "warn",
|
|
35
|
-
"@typescript-eslint/no-duplicate-type-constituents": "warn",
|
|
36
|
-
"@typescript-eslint/no-dynamic-delete": "warn",
|
|
37
|
-
"@typescript-eslint/no-empty-function": "warn",
|
|
38
|
-
"@typescript-eslint/no-empty-object-type": "warn",
|
|
39
|
-
"@typescript-eslint/no-explicit-any": "warn",
|
|
40
|
-
"@typescript-eslint/no-extra-non-null-assertion": "warn",
|
|
41
|
-
"@typescript-eslint/no-extraneous-class": "warn",
|
|
42
|
-
"@typescript-eslint/no-floating-promises": "warn",
|
|
43
|
-
"@typescript-eslint/no-for-in-array": "warn",
|
|
44
|
-
"@typescript-eslint/no-implied-eval": "warn",
|
|
45
|
-
"@typescript-eslint/no-import-type-side-effects": "warn",
|
|
46
|
-
"@typescript-eslint/no-inferrable-types": "warn",
|
|
47
|
-
"@typescript-eslint/no-invalid-void-type": "warn",
|
|
48
|
-
"@typescript-eslint/no-meaningless-void-operator": "warn",
|
|
49
|
-
"@typescript-eslint/no-misused-new": "warn",
|
|
50
|
-
"@typescript-eslint/no-misused-promises": "warn",
|
|
51
|
-
"@typescript-eslint/no-mixed-enums": "warn",
|
|
52
|
-
"@typescript-eslint/no-namespace": "warn",
|
|
53
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "warn",
|
|
54
|
-
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
|
|
55
|
-
"@typescript-eslint/no-non-null-assertion": "warn",
|
|
56
|
-
"@typescript-eslint/no-redundant-type-constituents": "warn",
|
|
57
|
-
"@typescript-eslint/no-require-imports": "warn",
|
|
58
|
-
"@typescript-eslint/no-this-alias": "warn",
|
|
59
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
|
|
60
|
-
"@typescript-eslint/no-unnecessary-condition": "warn",
|
|
61
|
-
"@typescript-eslint/no-unnecessary-template-expression": "warn",
|
|
62
|
-
"@typescript-eslint/no-unnecessary-type-arguments": "warn",
|
|
63
|
-
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
|
64
|
-
"@typescript-eslint/no-unnecessary-type-constraint": "warn",
|
|
65
|
-
"@typescript-eslint/no-unnecessary-type-parameters": "warn",
|
|
66
|
-
"@typescript-eslint/no-unsafe-declaration-merging": "warn",
|
|
67
|
-
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
|
|
68
|
-
"@typescript-eslint/no-unsafe-function-type": "warn",
|
|
69
|
-
"@typescript-eslint/no-unsafe-unary-minus": "warn",
|
|
70
|
-
"@typescript-eslint/no-unused-expressions": "warn",
|
|
71
|
-
"@typescript-eslint/no-unused-vars": [
|
|
72
|
-
"warn",
|
|
73
|
-
{
|
|
74
|
-
args: "after-used",
|
|
75
|
-
argsIgnorePattern: "^_",
|
|
76
|
-
ignoreRestSiblings: false,
|
|
77
|
-
vars: "all",
|
|
78
|
-
varsIgnorePattern: "^_"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"@typescript-eslint/no-useless-constructor": "warn",
|
|
82
|
-
"@typescript-eslint/no-wrapper-object-types": "warn",
|
|
83
|
-
// TODO: Investiate non-null vs type-cast rules
|
|
84
|
-
"@typescript-eslint/non-nullable-type-assertion-style": "off",
|
|
85
|
-
"@typescript-eslint/only-throw-error": "warn",
|
|
86
|
-
"@typescript-eslint/prefer-as-const": "warn",
|
|
87
|
-
"@typescript-eslint/prefer-find": "warn",
|
|
88
|
-
"@typescript-eslint/prefer-for-of": "warn",
|
|
89
|
-
"@typescript-eslint/prefer-function-type": "warn",
|
|
90
|
-
"@typescript-eslint/prefer-includes": "warn",
|
|
91
|
-
"@typescript-eslint/prefer-literal-enum-member": "warn",
|
|
92
|
-
"@typescript-eslint/prefer-namespace-keyword": "warn",
|
|
93
|
-
"@typescript-eslint/prefer-nullish-coalescing": "warn",
|
|
94
|
-
"@typescript-eslint/prefer-optional-chain": "warn",
|
|
95
|
-
"@typescript-eslint/prefer-promise-reject-errors": "warn",
|
|
96
|
-
"@typescript-eslint/prefer-reduce-type-parameter": "warn",
|
|
97
|
-
"@typescript-eslint/prefer-regexp-exec": "warn",
|
|
98
|
-
"@typescript-eslint/prefer-return-this-type": "warn",
|
|
99
|
-
"@typescript-eslint/prefer-string-starts-ends-with": "warn",
|
|
100
|
-
"@typescript-eslint/related-getter-setter-pairs": "warn",
|
|
101
|
-
"@typescript-eslint/require-await": "warn",
|
|
102
|
-
"@typescript-eslint/restrict-plus-operands": [
|
|
103
|
-
"warn",
|
|
104
|
-
{
|
|
105
|
-
allowAny: false,
|
|
106
|
-
allowBoolean: false,
|
|
107
|
-
allowNullish: false,
|
|
108
|
-
allowNumberAndString: false,
|
|
109
|
-
allowRegExp: false
|
|
110
|
-
}
|
|
111
|
-
],
|
|
112
|
-
"@typescript-eslint/restrict-template-expressions": [
|
|
113
|
-
"warn",
|
|
114
|
-
{
|
|
115
|
-
allow: [{ from: "lib", name: ["Error", "URL", "URLSearchParams"] }],
|
|
116
|
-
allowAny: true,
|
|
117
|
-
allowBoolean: true,
|
|
118
|
-
allowNullish: true,
|
|
119
|
-
allowNumber: true,
|
|
120
|
-
allowRegExp: true
|
|
121
|
-
}
|
|
122
|
-
],
|
|
123
|
-
"@typescript-eslint/return-await": [
|
|
124
|
-
"warn",
|
|
125
|
-
"error-handling-correctness-only"
|
|
126
|
-
],
|
|
127
|
-
"@typescript-eslint/triple-slash-reference": "warn",
|
|
128
|
-
"@typescript-eslint/unbound-method": "warn",
|
|
129
|
-
"@typescript-eslint/unified-signatures": "warn",
|
|
130
|
-
"@typescript-eslint/use-unknown-in-catch-callback-variable": "warn"
|
|
131
|
-
};
|
|
132
|
-
export {
|
|
133
|
-
tseslintRules
|
|
134
|
-
};
|
|
135
|
-
//# sourceMappingURL=rules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/eslint/typescript/rules.ts"],"sourcesContent":["import type { TypescriptRules } from \"./types.js\";\n\nexport const tseslintRules: TypescriptRules = {\n \"@typescript-eslint/adjacent-overload-signatures\": \"warn\",\n \"@typescript-eslint/array-type\": \"warn\",\n \"@typescript-eslint/await-thenable\": \"warn\",\n \"@typescript-eslint/ban-ts-comment\": [\n \"warn\",\n { minimumDescriptionLength: 10 },\n ],\n \"@typescript-eslint/ban-tslint-comment\": \"warn\",\n \"@typescript-eslint/class-literal-property-style\": \"warn\",\n \"@typescript-eslint/consistent-generic-constructors\": \"warn\",\n \"@typescript-eslint/consistent-indexed-object-style\": \"warn\",\n \"@typescript-eslint/consistent-type-assertions\": \"warn\",\n \"@typescript-eslint/consistent-type-definitions\": \"warn\",\n \"@typescript-eslint/consistent-type-exports\": [\n \"warn\",\n { fixMixedExportsWithInlineTypeSpecifier: true },\n ],\n \"@typescript-eslint/consistent-type-imports\": [\n \"warn\",\n {\n fixStyle: \"inline-type-imports\",\n prefer: \"type-imports\",\n },\n ],\n \"@typescript-eslint/dot-notation\": \"warn\",\n \"@typescript-eslint/no-array-constructor\": \"warn\",\n \"@typescript-eslint/no-array-delete\": \"warn\",\n \"@typescript-eslint/no-base-to-string\": \"warn\",\n \"@typescript-eslint/no-confusing-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-confusing-void-expression\": \"warn\",\n \"@typescript-eslint/no-deprecated\": \"warn\",\n \"@typescript-eslint/no-duplicate-enum-values\": \"warn\",\n \"@typescript-eslint/no-duplicate-type-constituents\": \"warn\",\n \"@typescript-eslint/no-dynamic-delete\": \"warn\",\n \"@typescript-eslint/no-empty-function\": \"warn\",\n \"@typescript-eslint/no-empty-object-type\": \"warn\",\n \"@typescript-eslint/no-explicit-any\": \"warn\",\n \"@typescript-eslint/no-extra-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-extraneous-class\": \"warn\",\n \"@typescript-eslint/no-floating-promises\": \"warn\",\n \"@typescript-eslint/no-for-in-array\": \"warn\",\n \"@typescript-eslint/no-implied-eval\": \"warn\",\n \"@typescript-eslint/no-import-type-side-effects\": \"warn\",\n \"@typescript-eslint/no-inferrable-types\": \"warn\",\n \"@typescript-eslint/no-invalid-void-type\": \"warn\",\n \"@typescript-eslint/no-meaningless-void-operator\": \"warn\",\n \"@typescript-eslint/no-misused-new\": \"warn\",\n \"@typescript-eslint/no-misused-promises\": \"warn\",\n \"@typescript-eslint/no-mixed-enums\": \"warn\",\n \"@typescript-eslint/no-namespace\": \"warn\",\n \"@typescript-eslint/no-non-null-asserted-nullish-coalescing\": \"warn\",\n \"@typescript-eslint/no-non-null-asserted-optional-chain\": \"warn\",\n \"@typescript-eslint/no-non-null-assertion\": \"warn\",\n \"@typescript-eslint/no-redundant-type-constituents\": \"warn\",\n \"@typescript-eslint/no-require-imports\": \"warn\",\n \"@typescript-eslint/no-this-alias\": \"warn\",\n \"@typescript-eslint/no-unnecessary-boolean-literal-compare\": \"warn\",\n \"@typescript-eslint/no-unnecessary-condition\": \"warn\",\n \"@typescript-eslint/no-unnecessary-template-expression\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-arguments\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-assertion\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-constraint\": \"warn\",\n \"@typescript-eslint/no-unnecessary-type-parameters\": \"warn\",\n \"@typescript-eslint/no-unsafe-declaration-merging\": \"warn\",\n \"@typescript-eslint/no-unsafe-enum-comparison\": \"warn\",\n \"@typescript-eslint/no-unsafe-function-type\": \"warn\",\n \"@typescript-eslint/no-unsafe-unary-minus\": \"warn\",\n \"@typescript-eslint/no-unused-expressions\": \"warn\",\n \"@typescript-eslint/no-unused-vars\": [\n \"warn\",\n {\n args: \"after-used\",\n argsIgnorePattern: \"^_\",\n ignoreRestSiblings: false,\n vars: \"all\",\n varsIgnorePattern: \"^_\",\n },\n ],\n \"@typescript-eslint/no-useless-constructor\": \"warn\",\n \"@typescript-eslint/no-wrapper-object-types\": \"warn\",\n // TODO: Investiate non-null vs type-cast rules\n \"@typescript-eslint/non-nullable-type-assertion-style\": \"off\",\n \"@typescript-eslint/only-throw-error\": \"warn\",\n \"@typescript-eslint/prefer-as-const\": \"warn\",\n \"@typescript-eslint/prefer-find\": \"warn\",\n \"@typescript-eslint/prefer-for-of\": \"warn\",\n \"@typescript-eslint/prefer-function-type\": \"warn\",\n \"@typescript-eslint/prefer-includes\": \"warn\",\n \"@typescript-eslint/prefer-literal-enum-member\": \"warn\",\n \"@typescript-eslint/prefer-namespace-keyword\": \"warn\",\n \"@typescript-eslint/prefer-nullish-coalescing\": \"warn\",\n \"@typescript-eslint/prefer-optional-chain\": \"warn\",\n \"@typescript-eslint/prefer-promise-reject-errors\": \"warn\",\n \"@typescript-eslint/prefer-reduce-type-parameter\": \"warn\",\n \"@typescript-eslint/prefer-regexp-exec\": \"warn\",\n \"@typescript-eslint/prefer-return-this-type\": \"warn\",\n \"@typescript-eslint/prefer-string-starts-ends-with\": \"warn\",\n \"@typescript-eslint/related-getter-setter-pairs\": \"warn\",\n \"@typescript-eslint/require-await\": \"warn\",\n \"@typescript-eslint/restrict-plus-operands\": [\n \"warn\",\n {\n allowAny: false,\n allowBoolean: false,\n allowNullish: false,\n allowNumberAndString: false,\n allowRegExp: false,\n },\n ],\n \"@typescript-eslint/restrict-template-expressions\": [\n \"warn\",\n {\n allow: [{ from: \"lib\", name: [\"Error\", \"URL\", \"URLSearchParams\"] }],\n allowAny: true,\n allowBoolean: true,\n allowNullish: true,\n allowNumber: true,\n allowRegExp: true,\n },\n ],\n \"@typescript-eslint/return-await\": [\n \"warn\",\n \"error-handling-correctness-only\",\n ],\n \"@typescript-eslint/triple-slash-reference\": \"warn\",\n \"@typescript-eslint/unbound-method\": \"warn\",\n \"@typescript-eslint/unified-signatures\": \"warn\",\n \"@typescript-eslint/use-unknown-in-catch-callback-variable\": \"warn\",\n};\n"],"mappings":";AAEO,IAAM,gBAAiC;AAAA,EAC5C,mDAAmD;AAAA,EACnD,iCAAiC;AAAA,EACjC,qCAAqC;AAAA,EACrC,qCAAqC;AAAA,IACnC;AAAA,IACA,EAAE,0BAA0B,GAAG;AAAA,EACjC;AAAA,EACA,yCAAyC;AAAA,EACzC,mDAAmD;AAAA,EACnD,sDAAsD;AAAA,EACtD,sDAAsD;AAAA,EACtD,iDAAiD;AAAA,EACjD,kDAAkD;AAAA,EAClD,8CAA8C;AAAA,IAC5C;AAAA,IACA,EAAE,wCAAwC,KAAK;AAAA,EACjD;AAAA,EACA,8CAA8C;AAAA,IAC5C;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,mCAAmC;AAAA,EACnC,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,wCAAwC;AAAA,EACxC,sDAAsD;AAAA,EACtD,mDAAmD;AAAA,EACnD,oCAAoC;AAAA,EACpC,+CAA+C;AAAA,EAC/C,qDAAqD;AAAA,EACrD,wCAAwC;AAAA,EACxC,wCAAwC;AAAA,EACxC,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,kDAAkD;AAAA,EAClD,0CAA0C;AAAA,EAC1C,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,sCAAsC;AAAA,EACtC,kDAAkD;AAAA,EAClD,0CAA0C;AAAA,EAC1C,2CAA2C;AAAA,EAC3C,mDAAmD;AAAA,EACnD,qCAAqC;AAAA,EACrC,0CAA0C;AAAA,EAC1C,qCAAqC;AAAA,EACrC,mCAAmC;AAAA,EACnC,8DAA8D;AAAA,EAC9D,0DAA0D;AAAA,EAC1D,4CAA4C;AAAA,EAC5C,qDAAqD;AAAA,EACrD,yCAAyC;AAAA,EACzC,oCAAoC;AAAA,EACpC,6DAA6D;AAAA,EAC7D,+CAA+C;AAAA,EAC/C,yDAAyD;AAAA,EACzD,oDAAoD;AAAA,EACpD,oDAAoD;AAAA,EACpD,qDAAqD;AAAA,EACrD,qDAAqD;AAAA,EACrD,oDAAoD;AAAA,EACpD,gDAAgD;AAAA,EAChD,8CAA8C;AAAA,EAC9C,4CAA4C;AAAA,EAC5C,4CAA4C;AAAA,EAC5C,qCAAqC;AAAA,IACnC;AAAA,IACA;AAAA,MACE,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,oBAAoB;AAAA,MACpB,MAAM;AAAA,MACN,mBAAmB;AAAA,IACrB;AAAA,EACF;AAAA,EACA,6CAA6C;AAAA,EAC7C,8CAA8C;AAAA;AAAA,EAE9C,wDAAwD;AAAA,EACxD,uCAAuC;AAAA,EACvC,sCAAsC;AAAA,EACtC,kCAAkC;AAAA,EAClC,oCAAoC;AAAA,EACpC,2CAA2C;AAAA,EAC3C,sCAAsC;AAAA,EACtC,iDAAiD;AAAA,EACjD,+CAA+C;AAAA,EAC/C,gDAAgD;AAAA,EAChD,4CAA4C;AAAA,EAC5C,mDAAmD;AAAA,EACnD,mDAAmD;AAAA,EACnD,yCAAyC;AAAA,EACzC,8CAA8C;AAAA,EAC9C,qDAAqD;AAAA,EACrD,kDAAkD;AAAA,EAClD,oCAAoC;AAAA,EACpC,6CAA6C;AAAA,IAC3C;AAAA,IACA;AAAA,MACE,UAAU;AAAA,MACV,cAAc;AAAA,MACd,cAAc;AAAA,MACd,sBAAsB;AAAA,MACtB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,oDAAoD;AAAA,IAClD;AAAA,IACA;AAAA,MACE,OAAO,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC,SAAS,OAAO,iBAAiB,EAAE,CAAC;AAAA,MAClE,UAAU;AAAA,MACV,cAAc;AAAA,MACd,cAAc;AAAA,MACd,aAAa;AAAA,MACb,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,mCAAmC;AAAA,IACjC;AAAA,IACA;AAAA,EACF;AAAA,EACA,6CAA6C;AAAA,EAC7C,qCAAqC;AAAA,EACrC,yCAAyC;AAAA,EACzC,6DAA6D;AAC/D;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { EslintConfigObject } from '../types.js';
|
|
2
|
-
import 'eslint';
|
|
3
|
-
import '../constants.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* ESLint configuration for unicorn plugin.
|
|
7
|
-
* This plugin provides a set of rules to enforce consistent code style and catch common errors.
|
|
8
|
-
*/
|
|
9
|
-
declare const unicornConfig: EslintConfigObject;
|
|
10
|
-
|
|
11
|
-
export { unicornConfig };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
// src/eslint/unicorn/config.ts
|
|
2
|
-
import unicorn from "eslint-plugin-unicorn";
|
|
3
|
-
|
|
4
|
-
// src/eslint/constants.ts
|
|
5
|
-
var configNames = {
|
|
6
|
-
base: "base",
|
|
7
|
-
disableTypeChecked: "typescript-eslint/disable-type-checked",
|
|
8
|
-
ignores: "ignores",
|
|
9
|
-
jsdoc: "jsdoc",
|
|
10
|
-
markdown: "markdown",
|
|
11
|
-
nextjs: "nextjs",
|
|
12
|
-
perfectionist: "perfectionist",
|
|
13
|
-
preferArrowFunction: "prefer-arrow-function",
|
|
14
|
-
react: "react",
|
|
15
|
-
reactCompiler: "react-compiler",
|
|
16
|
-
reactRefresh: "react-refresh",
|
|
17
|
-
storybook: "storybook:stories",
|
|
18
|
-
storybookConfig: "storybook:config",
|
|
19
|
-
testing: "testing",
|
|
20
|
-
turbo: "turbo",
|
|
21
|
-
typescript: "tseslint",
|
|
22
|
-
typescriptTesting: "tseslint-testing",
|
|
23
|
-
unicorn: "unicorn"
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
// src/eslint/unicorn/rules.ts
|
|
27
|
-
var rules = {
|
|
28
|
-
/**
|
|
29
|
-
* Enforce better string content.
|
|
30
|
-
*
|
|
31
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
|
|
32
|
-
*/
|
|
33
|
-
"unicorn/better-regex": "warn",
|
|
34
|
-
/**
|
|
35
|
-
* Enforce passing a message value when creating a built-in error.
|
|
36
|
-
*
|
|
37
|
-
* 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
|
|
38
|
-
*/
|
|
39
|
-
"unicorn/error-message": "warn",
|
|
40
|
-
/**
|
|
41
|
-
* Require consistent filename case for all linted files.
|
|
42
|
-
*
|
|
43
|
-
* 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
|
|
44
|
-
*/
|
|
45
|
-
"unicorn/filename-case": [
|
|
46
|
-
"warn",
|
|
47
|
-
{
|
|
48
|
-
case: "kebabCase"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
/**
|
|
52
|
-
* Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
|
|
53
|
-
*
|
|
54
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md
|
|
55
|
-
*/
|
|
56
|
-
"unicorn/new-for-builtins": "warn",
|
|
57
|
-
"unicorn/no-console-spaces": "warn",
|
|
58
|
-
/**
|
|
59
|
-
* Enforce using for-loop instead of while-loop.
|
|
60
|
-
*
|
|
61
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md
|
|
62
|
-
*/
|
|
63
|
-
"unicorn/no-for-loop": "warn",
|
|
64
|
-
/**
|
|
65
|
-
* Enforce the use of addEventListener and removeEventListener over on-functions.
|
|
66
|
-
*
|
|
67
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md
|
|
68
|
-
*/
|
|
69
|
-
"unicorn/prefer-add-event-listener": "warn",
|
|
70
|
-
/**
|
|
71
|
-
* Require using the `node:` protocol when importing Node.js built-in modules.
|
|
72
|
-
*
|
|
73
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
|
|
74
|
-
*/
|
|
75
|
-
"unicorn/prefer-node-protocol": "warn",
|
|
76
|
-
/**
|
|
77
|
-
* Prefer String#replaceAll() over String#replace() with a global regExp.
|
|
78
|
-
*
|
|
79
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
|
|
80
|
-
*/
|
|
81
|
-
"unicorn/prefer-string-replace-all": "warn",
|
|
82
|
-
/**
|
|
83
|
-
* Enforce throwing TypeError in type checking conditions.
|
|
84
|
-
*
|
|
85
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
|
|
86
|
-
*/
|
|
87
|
-
"unicorn/prefer-type-error": "warn",
|
|
88
|
-
/**
|
|
89
|
-
* Enforce consistent brace style for case clauses.
|
|
90
|
-
*
|
|
91
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
|
|
92
|
-
*/
|
|
93
|
-
"unicorn/switch-case-braces": ["warn", "always"],
|
|
94
|
-
/**
|
|
95
|
-
* Enforce consistent case for text encoding identifiers.
|
|
96
|
-
*
|
|
97
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md
|
|
98
|
-
*/
|
|
99
|
-
"unicorn/text-encoding-identifier-case": "warn"
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
// src/eslint/unicorn/config.ts
|
|
103
|
-
var unicornConfig = {
|
|
104
|
-
name: configNames.unicorn,
|
|
105
|
-
plugins: {
|
|
106
|
-
unicorn
|
|
107
|
-
},
|
|
108
|
-
rules
|
|
109
|
-
};
|
|
110
|
-
export {
|
|
111
|
-
unicornConfig
|
|
112
|
-
};
|
|
113
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/eslint/unicorn/config.ts","../../../src/eslint/constants.ts","../../../src/eslint/unicorn/rules.ts"],"sourcesContent":["import unicorn from \"eslint-plugin-unicorn\";\n\nimport type { EslintConfigObject } from \"../types.js\";\n\nimport { configNames } from \"../constants.js\";\nimport { rules } from \"./rules.js\";\n\n/**\n * ESLint configuration for unicorn plugin.\n * This plugin provides a set of rules to enforce consistent code style and catch common errors.\n */\nexport const unicornConfig: EslintConfigObject = {\n name: configNames.unicorn,\n plugins: {\n unicorn,\n },\n rules,\n};\n","/**\n * Debug names for ESLint configuration objects.\n * These names help identify different configuration sections in ESLint's debug output\n * and error messages, making it easier to track which rules come from which config.\n */\nexport const configNames = {\n base: \"base\",\n disableTypeChecked: \"typescript-eslint/disable-type-checked\",\n ignores: \"ignores\",\n jsdoc: \"jsdoc\",\n markdown: \"markdown\",\n nextjs: \"nextjs\",\n perfectionist: \"perfectionist\",\n preferArrowFunction: \"prefer-arrow-function\",\n react: \"react\",\n reactCompiler: \"react-compiler\",\n reactRefresh: \"react-refresh\",\n storybook: \"storybook:stories\",\n storybookConfig: \"storybook:config\",\n testing: \"testing\",\n turbo: \"turbo\",\n typescript: \"tseslint\",\n typescriptTesting: \"tseslint-testing\",\n unicorn: \"unicorn\",\n} as const;\n\nexport type ConfigName = (typeof configNames)[keyof typeof configNames];\n","import type { EslintRuleConfig } from \"../types.js\";\n\ntype UnicornRules = Record<`unicorn/${string}`, EslintRuleConfig>;\n\nexport const rules: UnicornRules = {\n /**\n * Enforce better string content.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md\n */\n \"unicorn/better-regex\": \"warn\",\n /**\n * Enforce passing a message value when creating a built-in error.\n *\n * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md\n */\n \"unicorn/error-message\": \"warn\",\n /**\n * Require consistent filename case for all linted files.\n *\n * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md\n */\n \"unicorn/filename-case\": [\n \"warn\",\n {\n case: \"kebabCase\",\n },\n ],\n /**\n * Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md\n */\n \"unicorn/new-for-builtins\": \"warn\",\n \"unicorn/no-console-spaces\": \"warn\",\n /**\n * Enforce using for-loop instead of while-loop.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md\n */\n \"unicorn/no-for-loop\": \"warn\",\n /**\n * Enforce the use of addEventListener and removeEventListener over on-functions.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md\n */\n \"unicorn/prefer-add-event-listener\": \"warn\",\n /**\n * Require using the `node:` protocol when importing Node.js built-in modules.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md\n */\n \"unicorn/prefer-node-protocol\": \"warn\",\n /**\n * Prefer String#replaceAll() over String#replace() with a global regExp.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md\n */\n \"unicorn/prefer-string-replace-all\": \"warn\",\n /**\n * Enforce throwing TypeError in type checking conditions.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md\n */\n \"unicorn/prefer-type-error\": \"warn\",\n /**\n * Enforce consistent brace style for case clauses.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md\n */\n \"unicorn/switch-case-braces\": [\"warn\", \"always\"],\n /**\n * Enforce consistent case for text encoding identifiers.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md\n */\n \"unicorn/text-encoding-identifier-case\": \"warn\",\n};\n"],"mappings":";AAAA,OAAO,aAAa;;;ACKb,IAAM,cAAc;AAAA,EACzB,MAAM;AAAA,EACN,oBAAoB;AAAA,EACpB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,OAAO;AAAA,EACP,eAAe;AAAA,EACf,cAAc;AAAA,EACd,WAAW;AAAA,EACX,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,mBAAmB;AAAA,EACnB,SAAS;AACX;;;ACpBO,IAAM,QAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjC,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,yBAAyB;AAAA,IACvB;AAAA,IACA;AAAA,MACE,MAAM;AAAA,IACR;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7B,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvB,qCAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrC,gCAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhC,qCAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrC,6BAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7B,8BAA8B,CAAC,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM/C,yCAAyC;AAC3C;;;AFlEO,IAAM,gBAAoC;AAAA,EAC/C,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP;AAAA,EACF;AAAA,EACA;AACF;","names":[]}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
// src/eslint/unicorn/rules.ts
|
|
2
|
-
var rules = {
|
|
3
|
-
/**
|
|
4
|
-
* Enforce better string content.
|
|
5
|
-
*
|
|
6
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
|
|
7
|
-
*/
|
|
8
|
-
"unicorn/better-regex": "warn",
|
|
9
|
-
/**
|
|
10
|
-
* Enforce passing a message value when creating a built-in error.
|
|
11
|
-
*
|
|
12
|
-
* 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md
|
|
13
|
-
*/
|
|
14
|
-
"unicorn/error-message": "warn",
|
|
15
|
-
/**
|
|
16
|
-
* Require consistent filename case for all linted files.
|
|
17
|
-
*
|
|
18
|
-
* 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md
|
|
19
|
-
*/
|
|
20
|
-
"unicorn/filename-case": [
|
|
21
|
-
"warn",
|
|
22
|
-
{
|
|
23
|
-
case: "kebabCase"
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
/**
|
|
27
|
-
* Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.
|
|
28
|
-
*
|
|
29
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md
|
|
30
|
-
*/
|
|
31
|
-
"unicorn/new-for-builtins": "warn",
|
|
32
|
-
"unicorn/no-console-spaces": "warn",
|
|
33
|
-
/**
|
|
34
|
-
* Enforce using for-loop instead of while-loop.
|
|
35
|
-
*
|
|
36
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md
|
|
37
|
-
*/
|
|
38
|
-
"unicorn/no-for-loop": "warn",
|
|
39
|
-
/**
|
|
40
|
-
* Enforce the use of addEventListener and removeEventListener over on-functions.
|
|
41
|
-
*
|
|
42
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md
|
|
43
|
-
*/
|
|
44
|
-
"unicorn/prefer-add-event-listener": "warn",
|
|
45
|
-
/**
|
|
46
|
-
* Require using the `node:` protocol when importing Node.js built-in modules.
|
|
47
|
-
*
|
|
48
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md
|
|
49
|
-
*/
|
|
50
|
-
"unicorn/prefer-node-protocol": "warn",
|
|
51
|
-
/**
|
|
52
|
-
* Prefer String#replaceAll() over String#replace() with a global regExp.
|
|
53
|
-
*
|
|
54
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md
|
|
55
|
-
*/
|
|
56
|
-
"unicorn/prefer-string-replace-all": "warn",
|
|
57
|
-
/**
|
|
58
|
-
* Enforce throwing TypeError in type checking conditions.
|
|
59
|
-
*
|
|
60
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md
|
|
61
|
-
*/
|
|
62
|
-
"unicorn/prefer-type-error": "warn",
|
|
63
|
-
/**
|
|
64
|
-
* Enforce consistent brace style for case clauses.
|
|
65
|
-
*
|
|
66
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
|
|
67
|
-
*/
|
|
68
|
-
"unicorn/switch-case-braces": ["warn", "always"],
|
|
69
|
-
/**
|
|
70
|
-
* Enforce consistent case for text encoding identifiers.
|
|
71
|
-
*
|
|
72
|
-
* 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md
|
|
73
|
-
*/
|
|
74
|
-
"unicorn/text-encoding-identifier-case": "warn"
|
|
75
|
-
};
|
|
76
|
-
export {
|
|
77
|
-
rules
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=rules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/eslint/unicorn/rules.ts"],"sourcesContent":["import type { EslintRuleConfig } from \"../types.js\";\n\ntype UnicornRules = Record<`unicorn/${string}`, EslintRuleConfig>;\n\nexport const rules: UnicornRules = {\n /**\n * Enforce better string content.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md\n */\n \"unicorn/better-regex\": \"warn\",\n /**\n * Enforce passing a message value when creating a built-in error.\n *\n * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/error-message.md\n */\n \"unicorn/error-message\": \"warn\",\n /**\n * Require consistent filename case for all linted files.\n *\n * 🚫 Not fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/filename-case.md\n */\n \"unicorn/filename-case\": [\n \"warn\",\n {\n case: \"kebabCase\",\n },\n ],\n /**\n * Enforce the use of new for all builtins, except String, Number, Boolean, Symbol and BigInt.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/new-for-builtins.md\n */\n \"unicorn/new-for-builtins\": \"warn\",\n \"unicorn/no-console-spaces\": \"warn\",\n /**\n * Enforce using for-loop instead of while-loop.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-for-loop.md\n */\n \"unicorn/no-for-loop\": \"warn\",\n /**\n * Enforce the use of addEventListener and removeEventListener over on-functions.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-add-event-listener.md\n */\n \"unicorn/prefer-add-event-listener\": \"warn\",\n /**\n * Require using the `node:` protocol when importing Node.js built-in modules.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-node-protocol.md\n */\n \"unicorn/prefer-node-protocol\": \"warn\",\n /**\n * Prefer String#replaceAll() over String#replace() with a global regExp.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-string-replace-all.md\n */\n \"unicorn/prefer-string-replace-all\": \"warn\",\n /**\n * Enforce throwing TypeError in type checking conditions.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-type-error.md\n */\n \"unicorn/prefer-type-error\": \"warn\",\n /**\n * Enforce consistent brace style for case clauses.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md\n */\n \"unicorn/switch-case-braces\": [\"warn\", \"always\"],\n /**\n * Enforce consistent case for text encoding identifiers.\n *\n * 🔧 Fixable - https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/text-encoding-identifier-case.md\n */\n \"unicorn/text-encoding-identifier-case\": \"warn\",\n};\n"],"mappings":";AAIO,IAAM,QAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjC,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMxB,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMzB,yBAAyB;AAAA,IACvB;AAAA,IACA;AAAA,MACE,MAAM;AAAA,IACR;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,4BAA4B;AAAA,EAC5B,6BAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7B,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMvB,qCAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrC,gCAAgC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhC,qCAAqC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMrC,6BAA6B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM7B,8BAA8B,CAAC,QAAQ,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM/C,yCAAyC;AAC3C;","names":[]}
|
package/dist/modules.d.d.ts
DELETED
package/dist/modules.d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=modules.d.js.map
|
package/dist/modules.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/prettier/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Config } from 'prettier';
|
|
2
|
-
import { SortJsonOptions } from 'prettier-plugin-sort-json';
|
|
3
|
-
import { PluginOptions } from 'prettier-plugin-tailwindcss';
|
|
4
|
-
|
|
5
|
-
interface PrettierConfigOptions extends Config {
|
|
6
|
-
cssOrderPlugin?: boolean;
|
|
7
|
-
curlyPlugin?: boolean;
|
|
8
|
-
jsonSortPlugin?: boolean | SortJsonOptions;
|
|
9
|
-
packageJsonPlugin?: boolean;
|
|
10
|
-
tailwindPlugin?: boolean | string | PluginOptions;
|
|
11
|
-
}
|
|
12
|
-
interface PrettierConfigWithPlugins extends Config, SortJsonOptions, PluginOptions {
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Creates a Prettier configuration object with optional Tailwind support
|
|
16
|
-
*
|
|
17
|
-
* @param options - Configuration options for Prettier
|
|
18
|
-
* @param options.cssOrderPlugin CSS order sorting support
|
|
19
|
-
* @param options.curlyPlugin Enforce curly braces for all control statements
|
|
20
|
-
* @param options.jsonSortPlugin JSON sorting support
|
|
21
|
-
* @param options.packageJsonPlugin Package.json sorting support
|
|
22
|
-
* @param options.tailwindPlugin Tailwind CSS formatting support
|
|
23
|
-
* @returns Prettier configuration object with:
|
|
24
|
-
* - Default Prettier configuration
|
|
25
|
-
* - Experimental ternaries enabled
|
|
26
|
-
* - CSS order plugin
|
|
27
|
-
* - Curly braces plugin
|
|
28
|
-
* - JSON sorting plugin
|
|
29
|
-
* - Package.json sorting plugin
|
|
30
|
-
* - Optional Tailwind plugin and functions
|
|
31
|
-
*/
|
|
32
|
-
declare const prettierConfig: (options?: PrettierConfigOptions) => PrettierConfigWithPlugins;
|
|
33
|
-
|
|
34
|
-
export { type PrettierConfigOptions, type PrettierConfigWithPlugins, prettierConfig };
|
package/dist/prettier/index.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// src/utils/is-type.ts
|
|
2
|
-
var isString = (value) => {
|
|
3
|
-
return typeof value === "string";
|
|
4
|
-
};
|
|
5
|
-
var isObject = (value) => {
|
|
6
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
// src/prettier/patch-tailwind-plugin.ts
|
|
10
|
-
import * as fs from "node:fs";
|
|
11
|
-
import * as path from "node:path";
|
|
12
|
-
var DECLARE_BLOCK = `declare module 'prettier' {
|
|
13
|
-
interface RequiredOptions extends PluginOptions {
|
|
14
|
-
}
|
|
15
|
-
interface ParserOptions extends PluginOptions {
|
|
16
|
-
}
|
|
17
|
-
}`;
|
|
18
|
-
var patchTailwindPlugin = () => {
|
|
19
|
-
try {
|
|
20
|
-
console.info(
|
|
21
|
-
"js-style-kit: Patching prettier-plugin-tailwindcss declaration file..."
|
|
22
|
-
);
|
|
23
|
-
let pluginPath;
|
|
24
|
-
const rootPath = path.join(
|
|
25
|
-
"node_modules",
|
|
26
|
-
"prettier-plugin-tailwindcss",
|
|
27
|
-
"dist",
|
|
28
|
-
"index.d.ts"
|
|
29
|
-
);
|
|
30
|
-
const packagePath = path.join(
|
|
31
|
-
process.cwd(),
|
|
32
|
-
"node_modules",
|
|
33
|
-
"prettier-plugin-tailwindcss",
|
|
34
|
-
"dist",
|
|
35
|
-
"index.d.ts"
|
|
36
|
-
);
|
|
37
|
-
if (fs.existsSync(rootPath)) {
|
|
38
|
-
pluginPath = rootPath;
|
|
39
|
-
} else if (fs.existsSync(packagePath)) {
|
|
40
|
-
pluginPath = packagePath;
|
|
41
|
-
} else {
|
|
42
|
-
console.warn(
|
|
43
|
-
"js-style-kit: prettier-plugin-tailwindcss not found, skipping patch"
|
|
44
|
-
);
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
console.info(`js-style-kit: Found plugin at ${pluginPath}`);
|
|
48
|
-
const backupPath = `${pluginPath}.backup`;
|
|
49
|
-
if (!fs.existsSync(backupPath)) {
|
|
50
|
-
fs.writeFileSync(backupPath, fs.readFileSync(pluginPath, "utf8"));
|
|
51
|
-
console.info("js-style-kit: Created backup of original declaration file");
|
|
52
|
-
}
|
|
53
|
-
const content = fs.readFileSync(pluginPath, "utf8");
|
|
54
|
-
if (!content.includes(DECLARE_BLOCK)) {
|
|
55
|
-
console.info(
|
|
56
|
-
"js-style-kit: No patching needed, declaration block not found or already patched"
|
|
57
|
-
);
|
|
58
|
-
return true;
|
|
59
|
-
}
|
|
60
|
-
const patchedContent = content.replace(
|
|
61
|
-
DECLARE_BLOCK,
|
|
62
|
-
"// Removed unsafe declare module statement"
|
|
63
|
-
);
|
|
64
|
-
fs.writeFileSync(pluginPath, patchedContent);
|
|
65
|
-
console.info(
|
|
66
|
-
"js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file"
|
|
67
|
-
);
|
|
68
|
-
return true;
|
|
69
|
-
} catch (error) {
|
|
70
|
-
console.error(
|
|
71
|
-
"js-style-kit: Error patching prettier-plugin-tailwindcss:",
|
|
72
|
-
error
|
|
73
|
-
);
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
// src/prettier/index.ts
|
|
79
|
-
var prettierConfig = (options = {}) => {
|
|
80
|
-
const {
|
|
81
|
-
cssOrderPlugin = true,
|
|
82
|
-
curlyPlugin = true,
|
|
83
|
-
jsonSortPlugin = true,
|
|
84
|
-
packageJsonPlugin = true,
|
|
85
|
-
tailwindPlugin = false,
|
|
86
|
-
...rest
|
|
87
|
-
} = options;
|
|
88
|
-
const plugins = [];
|
|
89
|
-
const config = {
|
|
90
|
-
experimentalTernaries: true,
|
|
91
|
-
...rest
|
|
92
|
-
};
|
|
93
|
-
if (cssOrderPlugin) {
|
|
94
|
-
plugins.push("prettier-plugin-css-order");
|
|
95
|
-
}
|
|
96
|
-
if (curlyPlugin) {
|
|
97
|
-
plugins.push("prettier-plugin-curly");
|
|
98
|
-
}
|
|
99
|
-
if (jsonSortPlugin) {
|
|
100
|
-
plugins.push("prettier-plugin-sort-json");
|
|
101
|
-
if (isObject(jsonSortPlugin)) {
|
|
102
|
-
Object.assign(config, jsonSortPlugin);
|
|
103
|
-
} else {
|
|
104
|
-
config.jsonRecursiveSort = true;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
if (packageJsonPlugin) {
|
|
108
|
-
plugins.push("prettier-plugin-packagejson");
|
|
109
|
-
}
|
|
110
|
-
if (tailwindPlugin) {
|
|
111
|
-
plugins.push("prettier-plugin-tailwindcss");
|
|
112
|
-
const defaultTailwindFunctions = ["clsx", "cva", "cn"];
|
|
113
|
-
if (isString(tailwindPlugin)) {
|
|
114
|
-
config.tailwindStylesheet = tailwindPlugin;
|
|
115
|
-
config.tailwindFunctions = defaultTailwindFunctions;
|
|
116
|
-
} else if (isObject(tailwindPlugin)) {
|
|
117
|
-
Object.assign(config, tailwindPlugin);
|
|
118
|
-
if (!tailwindPlugin.tailwindFunctions) {
|
|
119
|
-
config.tailwindFunctions = defaultTailwindFunctions;
|
|
120
|
-
}
|
|
121
|
-
} else {
|
|
122
|
-
config.tailwindFunctions = defaultTailwindFunctions;
|
|
123
|
-
}
|
|
124
|
-
patchTailwindPlugin();
|
|
125
|
-
}
|
|
126
|
-
config.plugins = plugins;
|
|
127
|
-
return config;
|
|
128
|
-
};
|
|
129
|
-
export {
|
|
130
|
-
prettierConfig
|
|
131
|
-
};
|
|
132
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/utils/is-type.ts","../../src/prettier/patch-tailwind-plugin.ts","../../src/prettier/index.ts"],"sourcesContent":["/**\n * Type predicate for string values\n *\n * @param value - The value to check\n * @returns True if the value is a string, false otherwise\n */\nexport const isString = (value: unknown): value is string => {\n return typeof value === \"string\";\n};\n\n/**\n * Type predicate for number values\n *\n * @param value - The value to check\n * @returns True if the value is a number and not NaN, false otherwise\n */\nexport const isNumber = (value: unknown): value is number => {\n return typeof value === \"number\" && !Number.isNaN(value);\n};\n\n/**\n * Type predicate for boolean values\n *\n * @param value - The value to check\n * @returns True if the value is a boolean, false otherwise\n */\nexport const isBoolean = (value: unknown): value is boolean => {\n return typeof value === \"boolean\";\n};\n\n/**\n * Type predicate for array values\n *\n * @param value - The value to check\n * @returns True if the value is an array, false otherwise\n */\nexport const isArray = <T = unknown>(value: unknown): value is T[] => {\n return Array.isArray(value);\n};\n\n/**\n * Type predicate for object values (excluding null and arrays)\n *\n * @param value - The value to check\n * @returns True if the value is an object (not null and not an array), false otherwise\n */\nexport const isObject = (value: unknown): value is Record<string, unknown> => {\n return typeof value === \"object\" && value !== null && !Array.isArray(value);\n};\n\n/**\n * Type predicate for function values\n *\n * @param value - The value to check\n * @returns True if the value is a function, false otherwise\n */\n// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type\nexport const isFunction = (value: unknown): value is Function => {\n return typeof value === \"function\";\n};\n","import * as fs from \"node:fs\";\nimport * as path from \"node:path\";\n\n/**\n * The exact declare statement to remove from the prettier-plugin-tailwindcss declaration file\n * This statement causes conflicts with other Prettier plugins\n */\nconst DECLARE_BLOCK = `declare module 'prettier' {\n interface RequiredOptions extends PluginOptions {\n }\n interface ParserOptions extends PluginOptions {\n }\n}`;\n\n/**\n * Patches the declaration file of prettier-plugin-tailwindcss to remove the unsafe declare statement\n * that can cause conflicts with other Prettier plugins.\n *\n * @returns True if the patch was applied or already in place, false if plugin was not found or error occurred\n */\nexport const patchTailwindPlugin = (): boolean => {\n try {\n console.info(\n \"js-style-kit: Patching prettier-plugin-tailwindcss declaration file...\",\n );\n\n // Find the location of prettier-plugin-tailwindcss\n // This will work regardless of where js-style-kit is installed\n let pluginPath: string | undefined;\n\n // First try from the project root\n const rootPath = path.join(\n \"node_modules\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Then try from js-style-kit's directory\n const packagePath = path.join(\n process.cwd(),\n \"node_modules\",\n \"prettier-plugin-tailwindcss\",\n \"dist\",\n \"index.d.ts\",\n );\n\n // Choose the path that exists\n if (fs.existsSync(rootPath)) {\n pluginPath = rootPath;\n } else if (fs.existsSync(packagePath)) {\n pluginPath = packagePath;\n } else {\n console.warn(\n \"js-style-kit: prettier-plugin-tailwindcss not found, skipping patch\",\n );\n return false;\n }\n\n console.info(`js-style-kit: Found plugin at ${pluginPath}`);\n\n // Create backup of original file if it doesn't exist already\n const backupPath = `${pluginPath}.backup`;\n if (!fs.existsSync(backupPath)) {\n fs.writeFileSync(backupPath, fs.readFileSync(pluginPath, \"utf8\"));\n console.info(\"js-style-kit: Created backup of original declaration file\");\n }\n\n // Read the file\n const content = fs.readFileSync(pluginPath, \"utf8\");\n\n // Check if already patched\n if (!content.includes(DECLARE_BLOCK)) {\n console.info(\n \"js-style-kit: No patching needed, declaration block not found or already patched\",\n );\n return true;\n }\n\n // Replace the declare block with a comment\n const patchedContent = content.replace(\n DECLARE_BLOCK,\n \"// Removed unsafe declare module statement\",\n );\n\n // Write the patched file back\n fs.writeFileSync(pluginPath, patchedContent);\n console.info(\n \"js-style-kit: Successfully patched prettier-plugin-tailwindcss declaration file\",\n );\n\n return true;\n } catch (error) {\n console.error(\n \"js-style-kit: Error patching prettier-plugin-tailwindcss:\",\n error,\n );\n return false;\n }\n};\n","import type { Config as PrettierConfig } from \"prettier\";\nimport type { SortJsonOptions as SortJsonPluginOptions } from \"prettier-plugin-sort-json\";\nimport type { PluginOptions as TailwindPluginOptions } from \"prettier-plugin-tailwindcss\";\n\nimport { isObject, isString } from \"../utils/is-type.js\";\nimport { patchTailwindPlugin } from \"./patch-tailwind-plugin.js\";\n\nexport interface PrettierConfigOptions extends PrettierConfig {\n cssOrderPlugin?: boolean;\n curlyPlugin?: boolean;\n jsonSortPlugin?: boolean | SortJsonPluginOptions;\n packageJsonPlugin?: boolean;\n tailwindPlugin?: boolean | string | TailwindPluginOptions;\n}\n\nexport interface PrettierConfigWithPlugins\n extends PrettierConfig,\n SortJsonPluginOptions,\n TailwindPluginOptions {}\n\n/**\n * Creates a Prettier configuration object with optional Tailwind support\n *\n * @param options - Configuration options for Prettier\n * @param options.cssOrderPlugin CSS order sorting support\n * @param options.curlyPlugin Enforce curly braces for all control statements\n * @param options.jsonSortPlugin JSON sorting support\n * @param options.packageJsonPlugin Package.json sorting support\n * @param options.tailwindPlugin Tailwind CSS formatting support\n * @returns Prettier configuration object with:\n * - Default Prettier configuration\n * - Experimental ternaries enabled\n * - CSS order plugin\n * - Curly braces plugin\n * - JSON sorting plugin\n * - Package.json sorting plugin\n * - Optional Tailwind plugin and functions\n */\nexport const prettierConfig = (\n options: PrettierConfigOptions = {},\n): PrettierConfigWithPlugins => {\n const {\n cssOrderPlugin = true,\n curlyPlugin = true,\n jsonSortPlugin = true,\n packageJsonPlugin = true,\n tailwindPlugin = false,\n ...rest\n } = options;\n\n const plugins: string[] = [];\n const config: PrettierConfigWithPlugins = {\n experimentalTernaries: true,\n ...rest,\n };\n\n if (cssOrderPlugin) {\n plugins.push(\"prettier-plugin-css-order\");\n }\n\n if (curlyPlugin) {\n plugins.push(\"prettier-plugin-curly\");\n }\n\n if (jsonSortPlugin) {\n plugins.push(\"prettier-plugin-sort-json\");\n\n if (isObject(jsonSortPlugin)) {\n Object.assign(config, jsonSortPlugin);\n } else {\n config.jsonRecursiveSort = true;\n }\n }\n\n if (packageJsonPlugin) {\n plugins.push(\"prettier-plugin-packagejson\");\n }\n\n if (tailwindPlugin) {\n plugins.push(\"prettier-plugin-tailwindcss\");\n const defaultTailwindFunctions = [\"clsx\", \"cva\", \"cn\"];\n\n if (isString(tailwindPlugin)) {\n // then it's the path to the stylesheet\n config.tailwindStylesheet = tailwindPlugin;\n config.tailwindFunctions = defaultTailwindFunctions;\n } else if (isObject(tailwindPlugin)) {\n Object.assign(config, tailwindPlugin);\n\n // Ensure defaultTailwindFunctions is applied if tailwindFunctions wasn't specified\n if (!tailwindPlugin.tailwindFunctions) {\n config.tailwindFunctions = defaultTailwindFunctions;\n }\n } else {\n config.tailwindFunctions = defaultTailwindFunctions;\n }\n\n // Patch the Tailwind plugin declaration file to remove unsafe declare statement\n patchTailwindPlugin();\n }\n\n // Set plugins after all configurations are done\n config.plugins = plugins;\n\n return config;\n};\n"],"mappings":";AAMO,IAAM,WAAW,CAAC,UAAoC;AAC3D,SAAO,OAAO,UAAU;AAC1B;AAsCO,IAAM,WAAW,CAAC,UAAqD;AAC5E,SAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;;;AChDA,YAAY,QAAQ;AACpB,YAAY,UAAU;AAMtB,IAAM,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAaf,IAAM,sBAAsB,MAAe;AAChD,MAAI;AACF,YAAQ;AAAA,MACN;AAAA,IACF;AAIA,QAAI;AAGJ,UAAM,WAAgB;AAAA,MACpB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,UAAM,cAAmB;AAAA,MACvB,QAAQ,IAAI;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAGA,QAAO,cAAW,QAAQ,GAAG;AAC3B,mBAAa;AAAA,IACf,WAAc,cAAW,WAAW,GAAG;AACrC,mBAAa;AAAA,IACf,OAAO;AACL,cAAQ;AAAA,QACN;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAEA,YAAQ,KAAK,iCAAiC,UAAU,EAAE;AAG1D,UAAM,aAAa,GAAG,UAAU;AAChC,QAAI,CAAI,cAAW,UAAU,GAAG;AAC9B,MAAG,iBAAc,YAAe,gBAAa,YAAY,MAAM,CAAC;AAChE,cAAQ,KAAK,2DAA2D;AAAA,IAC1E;AAGA,UAAM,UAAa,gBAAa,YAAY,MAAM;AAGlD,QAAI,CAAC,QAAQ,SAAS,aAAa,GAAG;AACpC,cAAQ;AAAA,QACN;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAGA,UAAM,iBAAiB,QAAQ;AAAA,MAC7B;AAAA,MACA;AAAA,IACF;AAGA,IAAG,iBAAc,YAAY,cAAc;AAC3C,YAAQ;AAAA,MACN;AAAA,IACF;AAEA,WAAO;AAAA,EACT,SAAS,OAAO;AACd,YAAQ;AAAA,MACN;AAAA,MACA;AAAA,IACF;AACA,WAAO;AAAA,EACT;AACF;;;AC7DO,IAAM,iBAAiB,CAC5B,UAAiC,CAAC,MACJ;AAC9B,QAAM;AAAA,IACJ,iBAAiB;AAAA,IACjB,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,oBAAoB;AAAA,IACpB,iBAAiB;AAAA,IACjB,GAAG;AAAA,EACL,IAAI;AAEJ,QAAM,UAAoB,CAAC;AAC3B,QAAM,SAAoC;AAAA,IACxC,uBAAuB;AAAA,IACvB,GAAG;AAAA,EACL;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,2BAA2B;AAAA,EAC1C;AAEA,MAAI,aAAa;AACf,YAAQ,KAAK,uBAAuB;AAAA,EACtC;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,2BAA2B;AAExC,QAAI,SAAS,cAAc,GAAG;AAC5B,aAAO,OAAO,QAAQ,cAAc;AAAA,IACtC,OAAO;AACL,aAAO,oBAAoB;AAAA,IAC7B;AAAA,EACF;AAEA,MAAI,mBAAmB;AACrB,YAAQ,KAAK,6BAA6B;AAAA,EAC5C;AAEA,MAAI,gBAAgB;AAClB,YAAQ,KAAK,6BAA6B;AAC1C,UAAM,2BAA2B,CAAC,QAAQ,OAAO,IAAI;AAErD,QAAI,SAAS,cAAc,GAAG;AAE5B,aAAO,qBAAqB;AAC5B,aAAO,oBAAoB;AAAA,IAC7B,WAAW,SAAS,cAAc,GAAG;AACnC,aAAO,OAAO,QAAQ,cAAc;AAGpC,UAAI,CAAC,eAAe,mBAAmB;AACrC,eAAO,oBAAoB;AAAA,MAC7B;AAAA,IACF,OAAO;AACL,aAAO,oBAAoB;AAAA,IAC7B;AAGA,wBAAoB;AAAA,EACtB;AAGA,SAAO,UAAU;AAEjB,SAAO;AACT;","names":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Patches the declaration file of prettier-plugin-tailwindcss to remove the unsafe declare statement
|
|
3
|
-
* that can cause conflicts with other Prettier plugins.
|
|
4
|
-
*
|
|
5
|
-
* @returns True if the patch was applied or already in place, false if plugin was not found or error occurred
|
|
6
|
-
*/
|
|
7
|
-
declare const patchTailwindPlugin: () => boolean;
|
|
8
|
-
|
|
9
|
-
export { patchTailwindPlugin };
|