js-style-kit 0.2.8 → 0.2.10
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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/eslint/base/config.js +453 -5
- package/dist/eslint/base/config.js.map +1 -1
- package/dist/eslint/base/rules.js +421 -3
- package/dist/eslint/base/rules.js.map +1 -1
- package/dist/eslint/constants.d.ts +15 -14
- package/dist/eslint/constants.js +21 -3
- package/dist/eslint/constants.js.map +1 -1
- package/dist/eslint/ignores.js +38 -4
- package/dist/eslint/ignores.js.map +1 -1
- package/dist/eslint/index.d.ts +5 -0
- package/dist/eslint/index.js +1406 -27
- package/dist/eslint/index.js.map +1 -1
- package/dist/eslint/jsdoc/config.js +105 -5
- package/dist/eslint/jsdoc/config.js.map +1 -1
- package/dist/eslint/jsdoc/rules.js +69 -3
- package/dist/eslint/jsdoc/rules.js.map +1 -1
- package/dist/eslint/nextjs/config.d.ts +12 -0
- package/dist/eslint/nextjs/config.js +62 -0
- package/dist/eslint/nextjs/config.js.map +1 -0
- package/dist/eslint/nextjs/rules.d.ts +8 -0
- package/dist/eslint/nextjs/rules.js +28 -0
- package/dist/eslint/nextjs/rules.js.map +1 -0
- package/dist/eslint/nextjs/types.d.ts +29 -0
- package/dist/eslint/nextjs/types.js +1 -0
- package/dist/eslint/nextjs/types.js.map +1 -0
- package/dist/eslint/perfectionist/config.js +61 -5
- package/dist/eslint/perfectionist/config.js.map +1 -1
- package/dist/eslint/perfectionist/rules.js +27 -3
- package/dist/eslint/perfectionist/rules.js.map +1 -1
- package/dist/eslint/prefer-arrow-function/config.js +41 -4
- package/dist/eslint/prefer-arrow-function/config.js.map +1 -1
- package/dist/eslint/react/config.js +182 -5
- package/dist/eslint/react/config.js.map +1 -1
- package/dist/eslint/react/rules.js +128 -3
- package/dist/eslint/react/rules.js.map +1 -1
- package/dist/eslint/react-compiler/config.js +35 -4
- package/dist/eslint/react-compiler/config.js.map +1 -1
- package/dist/eslint/react-refresh/config.js +51 -5
- package/dist/eslint/react-refresh/config.js.map +1 -1
- package/dist/eslint/react-refresh/rules.js +15 -3
- package/dist/eslint/react-refresh/rules.js.map +1 -1
- package/dist/eslint/storybook/config.js +63 -4
- package/dist/eslint/storybook/config.js.map +1 -1
- package/dist/eslint/testing/config.js +165 -6
- package/dist/eslint/testing/config.js.map +1 -1
- package/dist/eslint/testing/jest-rules.js +40 -3
- package/dist/eslint/testing/jest-rules.js.map +1 -1
- package/dist/eslint/testing/vitest-rules.js +46 -3
- package/dist/eslint/testing/vitest-rules.js.map +1 -1
- package/dist/eslint/turbo/config.js +35 -4
- package/dist/eslint/turbo/config.js.map +1 -1
- package/dist/eslint/types.d.ts +1 -1
- package/dist/eslint/typescript/config.js +182 -5
- package/dist/eslint/typescript/config.js.map +1 -1
- package/dist/eslint/typescript/rules.js +131 -3
- package/dist/eslint/typescript/rules.js.map +1 -1
- package/dist/eslint/unicorn/config.js +109 -5
- package/dist/eslint/unicorn/config.js.map +1 -1
- package/dist/eslint/unicorn/rules.js +75 -3
- package/dist/eslint/unicorn/rules.js.map +1 -1
- package/dist/index.js +1527 -31
- package/dist/index.js.map +1 -1
- package/dist/prettier/index.js +128 -5
- package/dist/prettier/index.js.map +1 -1
- package/dist/prettier/patch-tailwind-plugin.js +68 -3
- package/dist/prettier/patch-tailwind-plugin.js.map +1 -1
- package/dist/utils/is-type.js +19 -8
- package/dist/utils/is-type.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-26SVGV32.js +0 -133
- package/dist/chunk-26SVGV32.js.map +0 -1
- package/dist/chunk-2PDDRRZG.js +0 -21
- package/dist/chunk-2PDDRRZG.js.map +0 -1
- package/dist/chunk-3SHRYTUT.js +0 -32
- package/dist/chunk-3SHRYTUT.js.map +0 -1
- package/dist/chunk-6L7EDNAG.js +0 -20
- package/dist/chunk-6L7EDNAG.js.map +0 -1
- package/dist/chunk-76XASR6Z.js +0 -25
- package/dist/chunk-76XASR6Z.js.map +0 -1
- package/dist/chunk-7FTTMVPP.js +0 -20
- package/dist/chunk-7FTTMVPP.js.map +0 -1
- package/dist/chunk-7OLD3L3V.js +0 -64
- package/dist/chunk-7OLD3L3V.js.map +0 -1
- package/dist/chunk-A6AJGHPQ.js +0 -20
- package/dist/chunk-A6AJGHPQ.js.map +0 -1
- package/dist/chunk-AV6CI5A5.js +0 -141
- package/dist/chunk-AV6CI5A5.js.map +0 -1
- package/dist/chunk-CNYUGKH5.js +0 -38
- package/dist/chunk-CNYUGKH5.js.map +0 -1
- package/dist/chunk-HLIJN23S.js +0 -23
- package/dist/chunk-HLIJN23S.js.map +0 -1
- package/dist/chunk-HMC2O35U.js +0 -25
- package/dist/chunk-HMC2O35U.js.map +0 -1
- package/dist/chunk-HOZDQJWG.js +0 -51
- package/dist/chunk-HOZDQJWG.js.map +0 -1
- package/dist/chunk-LITSWCYQ.js +0 -135
- package/dist/chunk-LITSWCYQ.js.map +0 -1
- package/dist/chunk-N7AG2EKX.js +0 -48
- package/dist/chunk-N7AG2EKX.js.map +0 -1
- package/dist/chunk-PSSB4TGO.js +0 -29
- package/dist/chunk-PSSB4TGO.js.map +0 -1
- package/dist/chunk-SWT2QOL3.js +0 -21
- package/dist/chunk-SWT2QOL3.js.map +0 -1
- package/dist/chunk-U7AFEGMK.js +0 -23
- package/dist/chunk-U7AFEGMK.js.map +0 -1
- package/dist/chunk-UHCQX54J.js +0 -68
- package/dist/chunk-UHCQX54J.js.map +0 -1
- package/dist/chunk-UV6CA4PE.js +0 -45
- package/dist/chunk-UV6CA4PE.js.map +0 -1
- package/dist/chunk-X7JRY6MS.js +0 -41
- package/dist/chunk-X7JRY6MS.js.map +0 -1
- package/dist/chunk-XBITZIAZ.js +0 -21
- package/dist/chunk-XBITZIAZ.js.map +0 -1
- package/dist/chunk-XCPOAYGQ.js +0 -80
- package/dist/chunk-XCPOAYGQ.js.map +0 -1
- package/dist/chunk-XICOWKSV.js +0 -426
- package/dist/chunk-XICOWKSV.js.map +0 -1
- package/dist/chunk-YFJ363HR.js +0 -26
- package/dist/chunk-YFJ363HR.js.map +0 -1
- package/dist/chunk-YZG34ZNI.js +0 -80
- package/dist/chunk-YZG34ZNI.js.map +0 -1
- package/dist/chunk-ZED5DLW7.js +0 -73
- package/dist/chunk-ZED5DLW7.js.map +0 -1
package/dist/chunk-XCPOAYGQ.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
// src/eslint/jsdoc/rules.ts
|
|
2
|
-
var jsdocRules = (requireJsdoc = false, typescript = true) => ({
|
|
3
|
-
"jsdoc/check-access": "warn",
|
|
4
|
-
"jsdoc/check-alignment": "warn",
|
|
5
|
-
"jsdoc/check-param-names": [
|
|
6
|
-
"warn",
|
|
7
|
-
{
|
|
8
|
-
checkDestructured: true,
|
|
9
|
-
enableFixer: true
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"jsdoc/check-property-names": "warn",
|
|
13
|
-
"jsdoc/check-tag-names": [
|
|
14
|
-
"warn",
|
|
15
|
-
{
|
|
16
|
-
typed: true
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"jsdoc/check-types": "warn",
|
|
20
|
-
"jsdoc/check-values": "warn",
|
|
21
|
-
"jsdoc/empty-tags": "warn",
|
|
22
|
-
"jsdoc/implements-on-classes": "warn",
|
|
23
|
-
"jsdoc/multiline-blocks": "warn",
|
|
24
|
-
"jsdoc/no-blank-block-descriptions": "off",
|
|
25
|
-
"jsdoc/no-defaults": "warn",
|
|
26
|
-
"jsdoc/no-multi-asterisks": "warn",
|
|
27
|
-
"jsdoc/no-types": typescript ? "warn" : "off",
|
|
28
|
-
"jsdoc/no-undefined-types": typescript ? "off" : "warn",
|
|
29
|
-
"jsdoc/require-asterisk-prefix": "warn",
|
|
30
|
-
"jsdoc/require-description": requireJsdoc ? "warn" : "off",
|
|
31
|
-
"jsdoc/require-description-complete-sentence": "off",
|
|
32
|
-
"jsdoc/require-file-overview": "off",
|
|
33
|
-
"jsdoc/require-hyphen-before-param-description": "off",
|
|
34
|
-
"jsdoc/require-jsdoc": requireJsdoc ? [
|
|
35
|
-
"warn",
|
|
36
|
-
{
|
|
37
|
-
require: {
|
|
38
|
-
ArrowFunctionExpression: true,
|
|
39
|
-
ClassDeclaration: true,
|
|
40
|
-
ClassExpression: true,
|
|
41
|
-
FunctionDeclaration: true,
|
|
42
|
-
FunctionExpression: true,
|
|
43
|
-
MethodDefinition: true
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
] : "off",
|
|
47
|
-
"jsdoc/require-param": "warn",
|
|
48
|
-
"jsdoc/require-param-description": "warn",
|
|
49
|
-
"jsdoc/require-param-name": "warn",
|
|
50
|
-
"jsdoc/require-property": "warn",
|
|
51
|
-
"jsdoc/require-property-description": "warn",
|
|
52
|
-
"jsdoc/require-property-name": "warn",
|
|
53
|
-
"jsdoc/require-returns": "warn",
|
|
54
|
-
"jsdoc/require-returns-check": "warn",
|
|
55
|
-
"jsdoc/require-returns-description": "warn",
|
|
56
|
-
"jsdoc/require-template": "off",
|
|
57
|
-
"jsdoc/require-throws": "off",
|
|
58
|
-
"jsdoc/require-yields": "warn",
|
|
59
|
-
"jsdoc/require-yields-check": "warn",
|
|
60
|
-
"jsdoc/sort-tags": "off",
|
|
61
|
-
"jsdoc/tag-lines": [
|
|
62
|
-
"warn",
|
|
63
|
-
"never",
|
|
64
|
-
{
|
|
65
|
-
startLines: 1,
|
|
66
|
-
// Allow 1 line between description and first tag
|
|
67
|
-
tags: {
|
|
68
|
-
param: { lines: "never" }
|
|
69
|
-
// Enforce no lines between param tags
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"jsdoc/text-escaping": "off",
|
|
74
|
-
"jsdoc/valid-types": "warn"
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
export {
|
|
78
|
-
jsdocRules
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=chunk-XCPOAYGQ.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eslint/jsdoc/rules.ts"],"sourcesContent":["import type { JsdocRules } from \"./types.js\";\n\n/**\n * Generates ESLint rules configuration for JSDoc comments.\n *\n * @param requireJsdoc - Whether to enforce JSDoc comments on functions and classes. Defaults to false.\n * @param typescript - Whether TypeScript is being used in the project. When true, some rules are adjusted to be more TypeScript-friendly. Defaults to true.\n * @returns An object containing ESLint rules configuration for JSDoc validation and formatting.\n */\nexport const jsdocRules = (\n requireJsdoc = false,\n typescript = true,\n): JsdocRules => ({\n \"jsdoc/check-access\": \"warn\",\n \"jsdoc/check-alignment\": \"warn\",\n \"jsdoc/check-param-names\": [\n \"warn\",\n {\n checkDestructured: true,\n enableFixer: true,\n },\n ],\n \"jsdoc/check-property-names\": \"warn\",\n \"jsdoc/check-tag-names\": [\n \"warn\",\n {\n typed: true,\n },\n ],\n \"jsdoc/check-types\": \"warn\",\n \"jsdoc/check-values\": \"warn\",\n \"jsdoc/empty-tags\": \"warn\",\n \"jsdoc/implements-on-classes\": \"warn\",\n \"jsdoc/multiline-blocks\": \"warn\",\n \"jsdoc/no-blank-block-descriptions\": \"off\",\n \"jsdoc/no-defaults\": \"warn\",\n \"jsdoc/no-multi-asterisks\": \"warn\",\n \"jsdoc/no-types\": typescript ? \"warn\" : \"off\",\n \"jsdoc/no-undefined-types\": typescript ? \"off\" : \"warn\",\n \"jsdoc/require-asterisk-prefix\": \"warn\",\n \"jsdoc/require-description\": requireJsdoc ? \"warn\" : \"off\",\n \"jsdoc/require-description-complete-sentence\": \"off\",\n \"jsdoc/require-file-overview\": \"off\",\n \"jsdoc/require-hyphen-before-param-description\": \"off\",\n \"jsdoc/require-jsdoc\":\n requireJsdoc ?\n [\n \"warn\",\n {\n require: {\n ArrowFunctionExpression: true,\n ClassDeclaration: true,\n ClassExpression: true,\n FunctionDeclaration: true,\n FunctionExpression: true,\n MethodDefinition: true,\n },\n },\n ]\n : \"off\",\n \"jsdoc/require-param\": \"warn\",\n \"jsdoc/require-param-description\": \"warn\",\n \"jsdoc/require-param-name\": \"warn\",\n \"jsdoc/require-property\": \"warn\",\n \"jsdoc/require-property-description\": \"warn\",\n \"jsdoc/require-property-name\": \"warn\",\n \"jsdoc/require-returns\": \"warn\",\n \"jsdoc/require-returns-check\": \"warn\",\n \"jsdoc/require-returns-description\": \"warn\",\n \"jsdoc/require-template\": \"off\",\n \"jsdoc/require-throws\": \"off\",\n \"jsdoc/require-yields\": \"warn\",\n \"jsdoc/require-yields-check\": \"warn\",\n \"jsdoc/sort-tags\": \"off\",\n \"jsdoc/tag-lines\": [\n \"warn\",\n \"never\",\n {\n startLines: 1, // Allow 1 line between description and first tag\n tags: {\n param: { lines: \"never\" }, // Enforce no lines between param tags\n },\n },\n ],\n \"jsdoc/text-escaping\": \"off\",\n \"jsdoc/valid-types\": \"warn\",\n});\n"],"mappings":";AASO,IAAM,aAAa,CACxB,eAAe,OACf,aAAa,UACG;AAAA,EAChB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA,EACzB,2BAA2B;AAAA,IACzB;AAAA,IACA;AAAA,MACE,mBAAmB;AAAA,MACnB,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,8BAA8B;AAAA,EAC9B,yBAAyB;AAAA,IACvB;AAAA,IACA;AAAA,MACE,OAAO;AAAA,IACT;AAAA,EACF;AAAA,EACA,qBAAqB;AAAA,EACrB,sBAAsB;AAAA,EACtB,oBAAoB;AAAA,EACpB,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,qCAAqC;AAAA,EACrC,qBAAqB;AAAA,EACrB,4BAA4B;AAAA,EAC5B,kBAAkB,aAAa,SAAS;AAAA,EACxC,4BAA4B,aAAa,QAAQ;AAAA,EACjD,iCAAiC;AAAA,EACjC,6BAA6B,eAAe,SAAS;AAAA,EACrD,+CAA+C;AAAA,EAC/C,+BAA+B;AAAA,EAC/B,iDAAiD;AAAA,EACjD,uBACE,eACE;AAAA,IACE;AAAA,IACA;AAAA,MACE,SAAS;AAAA,QACP,yBAAyB;AAAA,QACzB,kBAAkB;AAAA,QAClB,iBAAiB;AAAA,QACjB,qBAAqB;AAAA,QACrB,oBAAoB;AAAA,QACpB,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,EACF,IACA;AAAA,EACJ,uBAAuB;AAAA,EACvB,mCAAmC;AAAA,EACnC,4BAA4B;AAAA,EAC5B,0BAA0B;AAAA,EAC1B,sCAAsC;AAAA,EACtC,+BAA+B;AAAA,EAC/B,yBAAyB;AAAA,EACzB,+BAA+B;AAAA,EAC/B,qCAAqC;AAAA,EACrC,0BAA0B;AAAA,EAC1B,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,8BAA8B;AAAA,EAC9B,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,IACjB;AAAA,IACA;AAAA,IACA;AAAA,MACE,YAAY;AAAA;AAAA,MACZ,MAAM;AAAA,QACJ,OAAO,EAAE,OAAO,QAAQ;AAAA;AAAA,MAC1B;AAAA,IACF;AAAA,EACF;AAAA,EACA,uBAAuB;AAAA,EACvB,qBAAqB;AACvB;","names":[]}
|
package/dist/chunk-XICOWKSV.js
DELETED
|
@@ -1,426 +0,0 @@
|
|
|
1
|
-
// src/eslint/base/rules.ts
|
|
2
|
-
var baseEslintRules = (functionStyle) => ({
|
|
3
|
-
/**
|
|
4
|
-
* Require return statements in array methods callbacks.
|
|
5
|
-
*
|
|
6
|
-
* 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return
|
|
7
|
-
*/
|
|
8
|
-
"array-callback-return": [
|
|
9
|
-
"warn",
|
|
10
|
-
{ allowImplicit: true, checkForEach: true }
|
|
11
|
-
],
|
|
12
|
-
/**
|
|
13
|
-
* Treat `var` statements as if they were block scoped.
|
|
14
|
-
*
|
|
15
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var
|
|
16
|
-
*/
|
|
17
|
-
"block-scoped-var": "warn",
|
|
18
|
-
/**
|
|
19
|
-
* Require camel case names.
|
|
20
|
-
*
|
|
21
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/camelcase
|
|
22
|
-
*/
|
|
23
|
-
camelcase: [
|
|
24
|
-
"warn",
|
|
25
|
-
{
|
|
26
|
-
allow: ["^UNSAFE_"],
|
|
27
|
-
ignoreDestructuring: false,
|
|
28
|
-
ignoreImports: true,
|
|
29
|
-
properties: "never"
|
|
30
|
-
}
|
|
31
|
-
],
|
|
32
|
-
/**
|
|
33
|
-
* Require curly braces for multiline blocks.
|
|
34
|
-
*
|
|
35
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/curly
|
|
36
|
-
*/
|
|
37
|
-
curly: ["warn", "multi-line"],
|
|
38
|
-
/**
|
|
39
|
-
* Require default clauses in switch statements to be last (if used).
|
|
40
|
-
*
|
|
41
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last
|
|
42
|
-
*/
|
|
43
|
-
"default-case-last": "warn",
|
|
44
|
-
/**
|
|
45
|
-
* Require triple equals (`===` and `!==`).
|
|
46
|
-
*å
|
|
47
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq
|
|
48
|
-
*/
|
|
49
|
-
eqeqeq: "warn",
|
|
50
|
-
"for-direction": "warn",
|
|
51
|
-
/**
|
|
52
|
-
* Require function expressions to have a name.
|
|
53
|
-
*
|
|
54
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/func-names
|
|
55
|
-
*/
|
|
56
|
-
"func-names": ["warn", "as-needed"],
|
|
57
|
-
"func-style": (
|
|
58
|
-
// if arrow function, we use the prefer-arrow-functions plugin
|
|
59
|
-
functionStyle === "off" || functionStyle === "arrow" ? "off" : ["warn", functionStyle, { allowArrowFunctions: true }]
|
|
60
|
-
),
|
|
61
|
-
/**
|
|
62
|
-
* Require grouped accessor pairs in object literals and classes.
|
|
63
|
-
*
|
|
64
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs
|
|
65
|
-
*/
|
|
66
|
-
"grouped-accessor-pairs": "warn",
|
|
67
|
-
/**
|
|
68
|
-
* Require a capital letter for constructors.
|
|
69
|
-
*
|
|
70
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/new-cap
|
|
71
|
-
*/
|
|
72
|
-
"new-cap": ["warn", { capIsNew: false }],
|
|
73
|
-
/**
|
|
74
|
-
* Disallow use of `alert()`.
|
|
75
|
-
*
|
|
76
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-alert
|
|
77
|
-
*/
|
|
78
|
-
"no-alert": "warn",
|
|
79
|
-
"no-async-promise-executor": "warn",
|
|
80
|
-
/**
|
|
81
|
-
* Disallow use of bitwise operators.
|
|
82
|
-
*
|
|
83
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise
|
|
84
|
-
*/
|
|
85
|
-
"no-bitwise": "warn",
|
|
86
|
-
/**
|
|
87
|
-
* Disallow use of `caller`/`callee`.
|
|
88
|
-
*
|
|
89
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-caller
|
|
90
|
-
*/
|
|
91
|
-
"no-caller": "warn",
|
|
92
|
-
"no-case-declarations": "warn",
|
|
93
|
-
"no-compare-neg-zero": "warn",
|
|
94
|
-
"no-cond-assign": "warn",
|
|
95
|
-
/**
|
|
96
|
-
* Disallow the use of console.
|
|
97
|
-
*
|
|
98
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-console
|
|
99
|
-
*/
|
|
100
|
-
"no-console": ["warn", { allow: ["info", "warn", "error"] }],
|
|
101
|
-
/**
|
|
102
|
-
* Disallow expressions where the operation doesn't affect the value.
|
|
103
|
-
*
|
|
104
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-console
|
|
105
|
-
*/
|
|
106
|
-
"no-constant-binary-expression": "warn",
|
|
107
|
-
"no-constant-condition": "warn",
|
|
108
|
-
/**
|
|
109
|
-
* Disallow returning value in constructor.
|
|
110
|
-
*
|
|
111
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return
|
|
112
|
-
*/
|
|
113
|
-
"no-constructor-return": "warn",
|
|
114
|
-
"no-control-regex": "warn",
|
|
115
|
-
"no-debugger": "warn",
|
|
116
|
-
"no-delete-var": "warn",
|
|
117
|
-
"no-dupe-else-if": "warn",
|
|
118
|
-
"no-duplicate-case": "warn",
|
|
119
|
-
/**
|
|
120
|
-
* Disallow using an `else` if the `if` block contains a return.
|
|
121
|
-
*
|
|
122
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/no-else-return
|
|
123
|
-
*/
|
|
124
|
-
"no-else-return": "warn",
|
|
125
|
-
"no-empty": "warn",
|
|
126
|
-
"no-empty-character-class": "warn",
|
|
127
|
-
"no-empty-pattern": "warn",
|
|
128
|
-
"no-empty-static-block": "warn",
|
|
129
|
-
/**
|
|
130
|
-
* Disallow `eval()`.
|
|
131
|
-
*
|
|
132
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-eval
|
|
133
|
-
*/
|
|
134
|
-
"no-eval": "warn",
|
|
135
|
-
"no-ex-assign": "warn",
|
|
136
|
-
/**
|
|
137
|
-
* Disallow extending native objects.
|
|
138
|
-
*
|
|
139
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native
|
|
140
|
-
*/
|
|
141
|
-
"no-extend-native": "warn",
|
|
142
|
-
/**
|
|
143
|
-
* Disallow unnecessary function binding.
|
|
144
|
-
*
|
|
145
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind
|
|
146
|
-
*/
|
|
147
|
-
"no-extra-bind": "warn",
|
|
148
|
-
"no-extra-boolean-cast": "warn",
|
|
149
|
-
/**
|
|
150
|
-
* Disallow unnecessary labels.
|
|
151
|
-
*
|
|
152
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label
|
|
153
|
-
*/
|
|
154
|
-
"no-extra-label": "warn",
|
|
155
|
-
"no-fallthrough": "warn",
|
|
156
|
-
"no-global-assign": "warn",
|
|
157
|
-
/**
|
|
158
|
-
* Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.
|
|
159
|
-
*
|
|
160
|
-
* 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion
|
|
161
|
-
*/
|
|
162
|
-
"no-implicit-coercion": "warn",
|
|
163
|
-
"no-invalid-regexp": "warn",
|
|
164
|
-
"no-irregular-whitespace": "warn",
|
|
165
|
-
/**
|
|
166
|
-
* Disallow usage of `__iterator__` property.
|
|
167
|
-
*
|
|
168
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator
|
|
169
|
-
*/
|
|
170
|
-
"no-iterator": "warn",
|
|
171
|
-
/**
|
|
172
|
-
* Disallow labels that share a name with a variable.
|
|
173
|
-
*
|
|
174
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var
|
|
175
|
-
*/
|
|
176
|
-
"no-label-var": "warn",
|
|
177
|
-
/**
|
|
178
|
-
* Disallow use of labels for anything other than loops and switches.
|
|
179
|
-
*
|
|
180
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-labels
|
|
181
|
-
*/
|
|
182
|
-
"no-labels": ["warn"],
|
|
183
|
-
/**
|
|
184
|
-
* Disallow unnecessary nested blocks.
|
|
185
|
-
*
|
|
186
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks
|
|
187
|
-
*/
|
|
188
|
-
"no-lone-blocks": "warn",
|
|
189
|
-
/**
|
|
190
|
-
* Disallow if as the only statement in an else block.
|
|
191
|
-
*
|
|
192
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if
|
|
193
|
-
*/
|
|
194
|
-
"no-lonely-if": "warn",
|
|
195
|
-
"no-loss-of-precision": "warn",
|
|
196
|
-
"no-misleading-character-class": "warn",
|
|
197
|
-
/**
|
|
198
|
-
* Disallow use of chained assignment expressions.
|
|
199
|
-
*
|
|
200
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign
|
|
201
|
-
*/
|
|
202
|
-
"no-multi-assign": ["warn"],
|
|
203
|
-
/**
|
|
204
|
-
* Disallow `new` for side effects.
|
|
205
|
-
*
|
|
206
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-new
|
|
207
|
-
*/
|
|
208
|
-
"no-new": "warn",
|
|
209
|
-
/**
|
|
210
|
-
* Disallow function constructors.
|
|
211
|
-
*
|
|
212
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func
|
|
213
|
-
*/
|
|
214
|
-
"no-new-func": "warn",
|
|
215
|
-
/**
|
|
216
|
-
* Disallow primitive wrapper instances, such as `new String('foo')`.
|
|
217
|
-
*
|
|
218
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers
|
|
219
|
-
*/
|
|
220
|
-
"no-new-wrappers": "warn",
|
|
221
|
-
"no-nonoctal-decimal-escape": "warn",
|
|
222
|
-
"no-octal": "warn",
|
|
223
|
-
/**
|
|
224
|
-
* Disallow use of octal escape sequences in string literals.
|
|
225
|
-
*
|
|
226
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape
|
|
227
|
-
*/
|
|
228
|
-
"no-octal-escape": "warn",
|
|
229
|
-
/**
|
|
230
|
-
* Disallow reassignment of function parameters.
|
|
231
|
-
*
|
|
232
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign
|
|
233
|
-
*/
|
|
234
|
-
"no-param-reassign": "warn",
|
|
235
|
-
/**
|
|
236
|
-
* Disallow returning values from Promise executor functions.
|
|
237
|
-
*
|
|
238
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return
|
|
239
|
-
*/
|
|
240
|
-
"no-promise-executor-return": "warn",
|
|
241
|
-
/**
|
|
242
|
-
* Disallow usage of the deprecated `__proto__` property.
|
|
243
|
-
*
|
|
244
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-proto
|
|
245
|
-
*/
|
|
246
|
-
"no-proto": "warn",
|
|
247
|
-
"no-prototype-builtins": "warn",
|
|
248
|
-
"no-regex-spaces": "warn",
|
|
249
|
-
/**
|
|
250
|
-
* Disallow assignment in `return` statement.
|
|
251
|
-
*
|
|
252
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign
|
|
253
|
-
*/
|
|
254
|
-
"no-return-assign": "warn",
|
|
255
|
-
/**
|
|
256
|
-
* Disallow use of `javascript:` urls.
|
|
257
|
-
*
|
|
258
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url
|
|
259
|
-
*/
|
|
260
|
-
"no-script-url": "warn",
|
|
261
|
-
"no-self-assign": "warn",
|
|
262
|
-
/**
|
|
263
|
-
* Disallow comparisons where both sides are exactly the same.
|
|
264
|
-
*
|
|
265
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare
|
|
266
|
-
*/
|
|
267
|
-
"no-self-compare": "warn",
|
|
268
|
-
/**
|
|
269
|
-
* Disallow use of comma operator.
|
|
270
|
-
*
|
|
271
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences
|
|
272
|
-
*/
|
|
273
|
-
"no-sequences": "warn",
|
|
274
|
-
"no-shadow-restricted-names": "warn",
|
|
275
|
-
"no-sparse-arrays": "warn",
|
|
276
|
-
/**
|
|
277
|
-
* Disallow template literal placeholder syntax in regular strings, as
|
|
278
|
-
* these are likely errors.
|
|
279
|
-
*
|
|
280
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string
|
|
281
|
-
*/
|
|
282
|
-
"no-template-curly-in-string": "warn",
|
|
283
|
-
/**
|
|
284
|
-
* Disallow initializing variables to `undefined`.
|
|
285
|
-
*
|
|
286
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init
|
|
287
|
-
*/
|
|
288
|
-
"no-undef-init": "warn",
|
|
289
|
-
"no-unexpected-multiline": "warn",
|
|
290
|
-
/**
|
|
291
|
-
* Disallow ternary operators when simpler alternatives exist.
|
|
292
|
-
*
|
|
293
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary
|
|
294
|
-
*/
|
|
295
|
-
"no-unneeded-ternary": "warn",
|
|
296
|
-
/**
|
|
297
|
-
* Disallow loops with a body that allows only one iteration.
|
|
298
|
-
*
|
|
299
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop
|
|
300
|
-
*/
|
|
301
|
-
"no-unreachable-loop": "warn",
|
|
302
|
-
"no-unsafe-finally": "warn",
|
|
303
|
-
"no-unsafe-optional-chaining": "warn",
|
|
304
|
-
"no-unused-labels": "warn",
|
|
305
|
-
"no-unused-private-class-members": "warn",
|
|
306
|
-
"no-useless-backreference": "warn",
|
|
307
|
-
/**
|
|
308
|
-
* Disallow unnecessary `.call()` and `.apply()`.
|
|
309
|
-
*
|
|
310
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call
|
|
311
|
-
*/
|
|
312
|
-
"no-useless-call": "warn",
|
|
313
|
-
"no-useless-catch": "warn",
|
|
314
|
-
/**
|
|
315
|
-
* Disallow useless computed property keys.
|
|
316
|
-
*
|
|
317
|
-
* � Fixable - https://eslint.org/docs/rules/no-useless-computed-key
|
|
318
|
-
*/
|
|
319
|
-
"no-useless-computed-key": "warn",
|
|
320
|
-
/**
|
|
321
|
-
* Disallow unnecessary concatenation of strings.
|
|
322
|
-
*
|
|
323
|
-
* � Not fixable - https://eslint.org/docs/rules/no-useless-concat
|
|
324
|
-
*/
|
|
325
|
-
"no-useless-concat": "warn",
|
|
326
|
-
"no-useless-escape": "warn",
|
|
327
|
-
/**
|
|
328
|
-
* Disallow renaming import, export, and destructured assignments to the
|
|
329
|
-
* same name.
|
|
330
|
-
*
|
|
331
|
-
* � Fixable - https://eslint.org/docs/rules/no-useless-rename
|
|
332
|
-
*/
|
|
333
|
-
"no-useless-rename": "warn",
|
|
334
|
-
/**
|
|
335
|
-
* Disallow redundant return statements.
|
|
336
|
-
*
|
|
337
|
-
* � Fixable - https://eslint.org/docs/rules/no-useless-return
|
|
338
|
-
*/
|
|
339
|
-
"no-useless-return": "warn",
|
|
340
|
-
/**
|
|
341
|
-
* Require `let` or `const` instead of `var`.
|
|
342
|
-
* ts transpiles let/const to var, so no need for vars any more
|
|
343
|
-
*
|
|
344
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/no-var
|
|
345
|
-
*/
|
|
346
|
-
"no-var": "warn",
|
|
347
|
-
"no-with": "warn",
|
|
348
|
-
/**
|
|
349
|
-
* Require object literal shorthand syntax.
|
|
350
|
-
*
|
|
351
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand
|
|
352
|
-
*/
|
|
353
|
-
"object-shorthand": "warn",
|
|
354
|
-
/**
|
|
355
|
-
* Require default to `const` instead of `let`.
|
|
356
|
-
* ts provides better types with const
|
|
357
|
-
*
|
|
358
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/prefer-const
|
|
359
|
-
*/
|
|
360
|
-
"prefer-const": "warn",
|
|
361
|
-
/**
|
|
362
|
-
* Require using named capture groups in regular expressions.
|
|
363
|
-
*
|
|
364
|
-
* � Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group
|
|
365
|
-
*/
|
|
366
|
-
"prefer-named-capture-group": "warn",
|
|
367
|
-
/**
|
|
368
|
-
* Disallow parseInt() in favor of binary, octal, and hexadecimal literals.
|
|
369
|
-
*
|
|
370
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals
|
|
371
|
-
*/
|
|
372
|
-
"prefer-numeric-literals": "warn",
|
|
373
|
-
/**
|
|
374
|
-
* Require use of an object spread over Object.assign.
|
|
375
|
-
*
|
|
376
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread
|
|
377
|
-
*/
|
|
378
|
-
"prefer-object-spread": "warn",
|
|
379
|
-
/**
|
|
380
|
-
* Disallow use of the RegExp constructor in favor of regular expression
|
|
381
|
-
* literals.
|
|
382
|
-
*
|
|
383
|
-
* � Not fixable - https://eslint.org/docs/rules/prefer-regex-literals
|
|
384
|
-
*/
|
|
385
|
-
"prefer-regex-literals": "warn",
|
|
386
|
-
/**
|
|
387
|
-
* Require using rest parameters instead of `arguments`.
|
|
388
|
-
* ts provides better types with rest args over arguments
|
|
389
|
-
*
|
|
390
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params
|
|
391
|
-
*/
|
|
392
|
-
"prefer-rest-params": "warn",
|
|
393
|
-
/**
|
|
394
|
-
* Require using spread syntax instead of `.apply()`.
|
|
395
|
-
* ts transpiles spread to apply, so no need for manual apply
|
|
396
|
-
*
|
|
397
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread
|
|
398
|
-
*/
|
|
399
|
-
"prefer-spread": "warn",
|
|
400
|
-
/**
|
|
401
|
-
* Require using template literals instead of string concatenation.
|
|
402
|
-
*
|
|
403
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/prefer-template
|
|
404
|
-
*/
|
|
405
|
-
"prefer-template": "warn",
|
|
406
|
-
"require-yield": "warn",
|
|
407
|
-
/**
|
|
408
|
-
* Require a `Symbol` description.
|
|
409
|
-
*
|
|
410
|
-
* 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description
|
|
411
|
-
*/
|
|
412
|
-
"symbol-description": "warn",
|
|
413
|
-
"use-isnan": "warn",
|
|
414
|
-
"valid-typeof": "warn",
|
|
415
|
-
/**
|
|
416
|
-
* Disallow "Yoda conditions", ensuring the comparison.
|
|
417
|
-
*
|
|
418
|
-
* 🔧 Fixable - https://eslint.org/docs/rules/yoda
|
|
419
|
-
*/
|
|
420
|
-
yoda: "warn"
|
|
421
|
-
});
|
|
422
|
-
|
|
423
|
-
export {
|
|
424
|
-
baseEslintRules
|
|
425
|
-
};
|
|
426
|
-
//# sourceMappingURL=chunk-XICOWKSV.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eslint/base/rules.ts"],"sourcesContent":["import type { FunctionStyle } from \"../types.js\";\nimport type { BaseRules } from \"./types.js\";\n\n/**\n * Generates the base set of ESLint rules with configurable function style enforcement.\n *\n * @param functionStyle - Controls how functions should be written. Can be:\n * - \"off\": Disables function style enforcement\n * - \"arrow\": Enforces arrow function expressions\n * - \"declaration\": Enforces function declarations\n * - \"expression\": Enforces function expressions\n * @returns An object containing ESLint rule configurations\n */\nexport const baseEslintRules = (\n functionStyle: \"off\" | FunctionStyle,\n): BaseRules => ({\n /**\n * Require return statements in array methods callbacks.\n *\n * 🚫 Not fixable -https://eslint.org/docs/rules/array-callback-return\n */\n \"array-callback-return\": [\n \"warn\",\n { allowImplicit: true, checkForEach: true },\n ],\n /**\n * Treat `var` statements as if they were block scoped.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/block-scoped-var\n */\n \"block-scoped-var\": \"warn\",\n /**\n * Require camel case names.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/camelcase\n */\n camelcase: [\n \"warn\",\n {\n allow: [\"^UNSAFE_\"],\n ignoreDestructuring: false,\n ignoreImports: true,\n properties: \"never\",\n },\n ],\n /**\n * Require curly braces for multiline blocks.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/curly\n */\n curly: [\"warn\", \"multi-line\"],\n /**\n * Require default clauses in switch statements to be last (if used).\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/default-case-last\n */\n \"default-case-last\": \"warn\",\n /**\n * Require triple equals (`===` and `!==`).\n *å\n * 🔧 Fixable - https://eslint.org/docs/rules/eqeqeq\n */\n eqeqeq: \"warn\",\n \"for-direction\": \"warn\",\n /**\n * Require function expressions to have a name.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/func-names\n */\n \"func-names\": [\"warn\", \"as-needed\"],\n \"func-style\":\n // if arrow function, we use the prefer-arrow-functions plugin\n functionStyle === \"off\" || functionStyle === \"arrow\" ?\n \"off\"\n : [\"warn\", functionStyle, { allowArrowFunctions: true }],\n /**\n * Require grouped accessor pairs in object literals and classes.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/grouped-accessor-pairs\n */\n \"grouped-accessor-pairs\": \"warn\",\n /**\n * Require a capital letter for constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/new-cap\n */\n \"new-cap\": [\"warn\", { capIsNew: false }],\n /**\n * Disallow use of `alert()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-alert\n */\n \"no-alert\": \"warn\",\n \"no-async-promise-executor\": \"warn\",\n /**\n * Disallow use of bitwise operators.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-bitwise\n */\n \"no-bitwise\": \"warn\",\n /**\n * Disallow use of `caller`/`callee`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-caller\n */\n \"no-caller\": \"warn\",\n \"no-case-declarations\": \"warn\",\n \"no-compare-neg-zero\": \"warn\",\n \"no-cond-assign\": \"warn\",\n /**\n * Disallow the use of console.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-console\": [\"warn\", { allow: [\"info\", \"warn\", \"error\"] }],\n /**\n * Disallow expressions where the operation doesn't affect the value.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-console\n */\n \"no-constant-binary-expression\": \"warn\",\n \"no-constant-condition\": \"warn\",\n /**\n * Disallow returning value in constructor.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-constructor-return\n */\n \"no-constructor-return\": \"warn\",\n \"no-control-regex\": \"warn\",\n \"no-debugger\": \"warn\",\n \"no-delete-var\": \"warn\",\n \"no-dupe-else-if\": \"warn\",\n \"no-duplicate-case\": \"warn\",\n /**\n * Disallow using an `else` if the `if` block contains a return.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-else-return\n */\n \"no-else-return\": \"warn\",\n \"no-empty\": \"warn\",\n \"no-empty-character-class\": \"warn\",\n \"no-empty-pattern\": \"warn\",\n \"no-empty-static-block\": \"warn\",\n /**\n * Disallow `eval()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-eval\n */\n \"no-eval\": \"warn\",\n \"no-ex-assign\": \"warn\",\n /**\n * Disallow extending native objects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-extend-native\n */\n \"no-extend-native\": \"warn\",\n /**\n * Disallow unnecessary function binding.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-bind\n */\n \"no-extra-bind\": \"warn\",\n \"no-extra-boolean-cast\": \"warn\",\n /**\n * Disallow unnecessary labels.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-extra-label\n */\n \"no-extra-label\": \"warn\",\n \"no-fallthrough\": \"warn\",\n \"no-global-assign\": \"warn\",\n /**\n * Make people convert types explicitly e.g. `Boolean(foo)` instead of `!!foo`.\n *\n * 🔧 Partially Fixable - https://eslint.org/docs/rules/no-implicit-coercion\n */\n \"no-implicit-coercion\": \"warn\",\n \"no-invalid-regexp\": \"warn\",\n \"no-irregular-whitespace\": \"warn\",\n /**\n * Disallow usage of `__iterator__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-iterator\n */\n \"no-iterator\": \"warn\",\n /**\n * Disallow labels that share a name with a variable.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-label-var\n */\n \"no-label-var\": \"warn\",\n /**\n * Disallow use of labels for anything other than loops and switches.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-labels\n */\n \"no-labels\": [\"warn\"],\n /**\n * Disallow unnecessary nested blocks.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-lone-blocks\n */\n \"no-lone-blocks\": \"warn\",\n /**\n * Disallow if as the only statement in an else block.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-lonely-if\n */\n \"no-lonely-if\": \"warn\",\n \"no-loss-of-precision\": \"warn\",\n \"no-misleading-character-class\": \"warn\",\n /**\n * Disallow use of chained assignment expressions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-multi-assign\n */\n \"no-multi-assign\": [\"warn\"],\n /**\n * Disallow `new` for side effects.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new\n */\n \"no-new\": \"warn\",\n /**\n * Disallow function constructors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-func\n */\n \"no-new-func\": \"warn\",\n /**\n * Disallow primitive wrapper instances, such as `new String('foo')`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-new-wrappers\n */\n \"no-new-wrappers\": \"warn\",\n \"no-nonoctal-decimal-escape\": \"warn\",\n \"no-octal\": \"warn\",\n /**\n * Disallow use of octal escape sequences in string literals.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-octal-escape\n */\n \"no-octal-escape\": \"warn\",\n /**\n * Disallow reassignment of function parameters.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-param-reassign\n */\n \"no-param-reassign\": \"warn\",\n /**\n * Disallow returning values from Promise executor functions.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-promise-executor-return\n */\n \"no-promise-executor-return\": \"warn\",\n /**\n * Disallow usage of the deprecated `__proto__` property.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-proto\n */\n \"no-proto\": \"warn\",\n \"no-prototype-builtins\": \"warn\",\n \"no-regex-spaces\": \"warn\",\n /**\n * Disallow assignment in `return` statement.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-return-assign\n */\n \"no-return-assign\": \"warn\",\n /**\n * Disallow use of `javascript:` urls.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-script-url\n */\n \"no-script-url\": \"warn\",\n \"no-self-assign\": \"warn\",\n /**\n * Disallow comparisons where both sides are exactly the same.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-self-compare\n */\n \"no-self-compare\": \"warn\",\n /**\n * Disallow use of comma operator.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-sequences\n */\n \"no-sequences\": \"warn\",\n \"no-shadow-restricted-names\": \"warn\",\n \"no-sparse-arrays\": \"warn\",\n /**\n * Disallow template literal placeholder syntax in regular strings, as\n * these are likely errors.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-template-curly-in-string\n */\n \"no-template-curly-in-string\": \"warn\",\n /**\n * Disallow initializing variables to `undefined`.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-undef-init\n */\n \"no-undef-init\": \"warn\",\n \"no-unexpected-multiline\": \"warn\",\n /**\n * Disallow ternary operators when simpler alternatives exist.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unneeded-ternary\n */\n \"no-unneeded-ternary\": \"warn\",\n /**\n * Disallow loops with a body that allows only one iteration.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-unreachable-loop\n */\n \"no-unreachable-loop\": \"warn\",\n \"no-unsafe-finally\": \"warn\",\n \"no-unsafe-optional-chaining\": \"warn\",\n \"no-unused-labels\": \"warn\",\n \"no-unused-private-class-members\": \"warn\",\n \"no-useless-backreference\": \"warn\",\n /**\n * Disallow unnecessary `.call()` and `.apply()`.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/no-useless-call\n */\n \"no-useless-call\": \"warn\",\n \"no-useless-catch\": \"warn\",\n /**\n * Disallow useless computed property keys.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-computed-key\n */\n \"no-useless-computed-key\": \"warn\",\n /**\n * Disallow unnecessary concatenation of strings.\n *\n * � Not fixable - https://eslint.org/docs/rules/no-useless-concat\n */\n \"no-useless-concat\": \"warn\",\n \"no-useless-escape\": \"warn\",\n /**\n * Disallow renaming import, export, and destructured assignments to the\n * same name.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-rename\n */\n \"no-useless-rename\": \"warn\",\n /**\n * Disallow redundant return statements.\n *\n * � Fixable - https://eslint.org/docs/rules/no-useless-return\n */\n \"no-useless-return\": \"warn\",\n /**\n * Require `let` or `const` instead of `var`.\n * ts transpiles let/const to var, so no need for vars any more\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/no-var\n */\n \"no-var\": \"warn\",\n \"no-with\": \"warn\",\n /**\n * Require object literal shorthand syntax.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/object-shorthand\n */\n \"object-shorthand\": \"warn\",\n /**\n * Require default to `const` instead of `let`.\n * ts provides better types with const\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-const\n */\n \"prefer-const\": \"warn\",\n /**\n * Require using named capture groups in regular expressions.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-named-capture-group\n */\n \"prefer-named-capture-group\": \"warn\",\n /**\n * Disallow parseInt() in favor of binary, octal, and hexadecimal literals.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-numeric-literals\n */\n \"prefer-numeric-literals\": \"warn\",\n /**\n * Require use of an object spread over Object.assign.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-object-spread\n */\n \"prefer-object-spread\": \"warn\",\n /**\n * Disallow use of the RegExp constructor in favor of regular expression\n * literals.\n *\n * � Not fixable - https://eslint.org/docs/rules/prefer-regex-literals\n */\n \"prefer-regex-literals\": \"warn\",\n /**\n * Require using rest parameters instead of `arguments`.\n * ts provides better types with rest args over arguments\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-rest-params\n */\n \"prefer-rest-params\": \"warn\",\n /**\n * Require using spread syntax instead of `.apply()`.\n * ts transpiles spread to apply, so no need for manual apply\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/prefer-spread\n */\n \"prefer-spread\": \"warn\",\n /**\n * Require using template literals instead of string concatenation.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/prefer-template\n */\n \"prefer-template\": \"warn\",\n \"require-yield\": \"warn\",\n /**\n * Require a `Symbol` description.\n *\n * 🚫 Not fixable - https://eslint.org/docs/rules/symbol-description\n */\n \"symbol-description\": \"warn\",\n \"use-isnan\": \"warn\",\n \"valid-typeof\": \"warn\",\n /**\n * Disallow \"Yoda conditions\", ensuring the comparison.\n *\n * 🔧 Fixable - https://eslint.org/docs/rules/yoda\n */\n yoda: \"warn\",\n});\n"],"mappings":";AAaO,IAAM,kBAAkB,CAC7B,mBACe;A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U;AAAA,EACV,WAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMX,oBAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOpB,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,8BAA8B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM9B,2BAA2B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAM3B,wBAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOxB,yBAAyB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOzB,sBAAsB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOtB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,mBAAmB;AAAA,EACnB,iBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMjB,sBAAsB;AAAA,EACtB,aAAa;AAAA,EACb,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMhB,MAAM;AACR;","names":[]}
|
package/dist/chunk-YFJ363HR.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
configNames
|
|
3
|
-
} from "./chunk-76XASR6Z.js";
|
|
4
|
-
|
|
5
|
-
// src/eslint/prefer-arrow-function/config.ts
|
|
6
|
-
import preferArrowFunctions from "eslint-plugin-prefer-arrow-functions";
|
|
7
|
-
var preferArrowFunctionConfig = () => ({
|
|
8
|
-
name: configNames.preferArrowFunction,
|
|
9
|
-
plugins: {
|
|
10
|
-
"prefer-arrow-functions": preferArrowFunctions
|
|
11
|
-
},
|
|
12
|
-
rules: {
|
|
13
|
-
"prefer-arrow-functions/prefer-arrow-functions": [
|
|
14
|
-
"warn",
|
|
15
|
-
{
|
|
16
|
-
returnStyle: "unchanged",
|
|
17
|
-
singleReturnOnly: false
|
|
18
|
-
}
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
preferArrowFunctionConfig
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=chunk-YFJ363HR.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/eslint/prefer-arrow-function/config.ts"],"sourcesContent":["import type { ESLint } from \"eslint\";\n\nimport preferArrowFunctions from \"eslint-plugin-prefer-arrow-functions\";\n\nimport type { EslintConfigObject } from \"../types.js\";\nimport type { PreferArrowFunctionsRules } from \"./types.js\";\n\nimport { configNames } from \"../constants.js\";\n\n/**\n * Creates an ESLint configuration for Prefer Arrow Functions.\n *\n * @returns ESLint configuration object for Prefer Arrow Functions\n */\nexport const preferArrowFunctionConfig = (): EslintConfigObject => ({\n name: configNames.preferArrowFunction,\n plugins: {\n \"prefer-arrow-functions\": preferArrowFunctions as ESLint.Plugin,\n },\n rules: {\n \"prefer-arrow-functions/prefer-arrow-functions\": [\n \"warn\",\n {\n returnStyle: \"unchanged\",\n singleReturnOnly: false,\n },\n ],\n } satisfies PreferArrowFunctionsRules,\n});\n"],"mappings":";;;;;AAEA,OAAO,0BAA0B;AAY1B,IAAM,4BAA4B,OAA2B;AAAA,EAClE,MAAM,YAAY;AAAA,EAClB,SAAS;AAAA,IACP,0BAA0B;AAAA,EAC5B;AAAA,EACA,OAAO;AAAA,IACL,iDAAiD;AAAA,MAC/C;AAAA,MACA;AAAA,QACE,aAAa;AAAA,QACb,kBAAkB;AAAA,MACpB;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
package/dist/chunk-YZG34ZNI.js
DELETED
|
@@ -1,80 +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
|
-
|
|
77
|
-
export {
|
|
78
|
-
rules
|
|
79
|
-
};
|
|
80
|
-
//# sourceMappingURL=chunk-YZG34ZNI.js.map
|