@isentinel/eslint-config 0.5.7 → 0.5.8
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/dist/index.cjs +108 -153
- package/dist/index.d.cts +1651 -271
- package/dist/index.d.ts +1651 -271
- package/dist/index.js +115 -162
- package/package.json +26 -24
package/dist/index.cjs
CHANGED
|
@@ -33,16 +33,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// node_modules/.pnpm/tsup@8.
|
|
36
|
+
// node_modules/.pnpm/tsup@8.1.0_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"node_modules/.pnpm/tsup@8.
|
|
38
|
+
"node_modules/.pnpm/tsup@8.1.0_postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
43
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/shared.js
|
|
44
44
|
var require_shared = __commonJS({
|
|
45
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
45
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/shared.js"(exports2, module2) {
|
|
46
46
|
"use strict";
|
|
47
47
|
init_cjs_shims();
|
|
48
48
|
function extractChunks(parentNode, isPartOfChunk) {
|
|
@@ -581,9 +581,9 @@ var require_shared = __commonJS({
|
|
|
581
581
|
}
|
|
582
582
|
});
|
|
583
583
|
|
|
584
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
584
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/imports.js
|
|
585
585
|
var require_imports = __commonJS({
|
|
586
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
586
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/imports.js"(exports2, module2) {
|
|
587
587
|
"use strict";
|
|
588
588
|
init_cjs_shims();
|
|
589
589
|
var shared = require_shared();
|
|
@@ -708,9 +708,9 @@ var require_imports = __commonJS({
|
|
|
708
708
|
}
|
|
709
709
|
});
|
|
710
710
|
|
|
711
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
711
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/exports.js
|
|
712
712
|
var require_exports = __commonJS({
|
|
713
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
713
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/exports.js"(exports2, module2) {
|
|
714
714
|
"use strict";
|
|
715
715
|
init_cjs_shims();
|
|
716
716
|
var shared = require_shared();
|
|
@@ -799,9 +799,9 @@ var require_exports = __commonJS({
|
|
|
799
799
|
}
|
|
800
800
|
});
|
|
801
801
|
|
|
802
|
-
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
802
|
+
// node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/index.js
|
|
803
803
|
var require_eslint_plugin_simple_import_sort = __commonJS({
|
|
804
|
-
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.
|
|
804
|
+
"node_modules/.pnpm/eslint-plugin-simple-import-sort@12.1.0_eslint@9.4.0/node_modules/eslint-plugin-simple-import-sort/index.js"(exports2, module2) {
|
|
805
805
|
"use strict";
|
|
806
806
|
init_cjs_shims();
|
|
807
807
|
var importsRule = require_imports();
|
|
@@ -858,10 +858,12 @@ __export(src_exports, {
|
|
|
858
858
|
jsdoc: () => jsdoc,
|
|
859
859
|
jsonc: () => jsonc,
|
|
860
860
|
markdown: () => markdown,
|
|
861
|
+
parserPlain: () => parserPlain,
|
|
861
862
|
perfectionist: () => perfectionist,
|
|
862
863
|
prettier: () => prettier,
|
|
863
864
|
promise: () => promise,
|
|
864
865
|
react: () => react,
|
|
866
|
+
renamePluginInConfigs: () => renamePluginInConfigs,
|
|
865
867
|
renameRules: () => renameRules,
|
|
866
868
|
resolveSubOptions: () => resolveSubOptions,
|
|
867
869
|
roblox: () => roblox,
|
|
@@ -885,14 +887,15 @@ init_cjs_shims();
|
|
|
885
887
|
|
|
886
888
|
// src/configs/comments.ts
|
|
887
889
|
init_cjs_shims();
|
|
890
|
+
var import_compat = require("@eslint/compat");
|
|
888
891
|
|
|
889
892
|
// src/plugins.ts
|
|
890
893
|
init_cjs_shims();
|
|
894
|
+
var import_eslint_plugin_comment_length = __toESM(require("@isentinel/eslint-plugin-comment-length"), 1);
|
|
891
895
|
var import_eslint_plugin = __toESM(require("@shopify/eslint-plugin"), 1);
|
|
892
896
|
var import_eslint_config_prettier = __toESM(require("eslint-config-prettier"), 1);
|
|
893
897
|
var import_eslint_plugin_antfu = __toESM(require("eslint-plugin-antfu"), 1);
|
|
894
898
|
var import_eslint_plugin_arrow_return_style = __toESM(require("eslint-plugin-arrow-return-style"), 1);
|
|
895
|
-
var import_eslint_plugin_comment_length = __toESM(require("eslint-plugin-comment-length"), 1);
|
|
896
899
|
var import_eslint_plugin_eslint_comments = __toESM(require("eslint-plugin-eslint-comments"), 1);
|
|
897
900
|
var import_eslint_plugin_format = __toESM(require("eslint-plugin-format"), 1);
|
|
898
901
|
var pluginImport = __toESM(require("eslint-plugin-import-x"), 1);
|
|
@@ -911,7 +914,7 @@ async function comments() {
|
|
|
911
914
|
{
|
|
912
915
|
name: "style:eslint-comments",
|
|
913
916
|
plugins: {
|
|
914
|
-
"comment-length": import_eslint_plugin_comment_length.default,
|
|
917
|
+
"comment-length": (0, import_compat.fixupPluginRules)(import_eslint_plugin_comment_length.default),
|
|
915
918
|
"eslint-comments": import_eslint_plugin_eslint_comments.default
|
|
916
919
|
},
|
|
917
920
|
rules: {
|
|
@@ -935,8 +938,8 @@ async function comments() {
|
|
|
935
938
|
"eslint-comments/no-unlimited-disable": "error",
|
|
936
939
|
"eslint-comments/no-unused-enable": "error",
|
|
937
940
|
"eslint-comments/require-description": "error",
|
|
938
|
-
"
|
|
939
|
-
"
|
|
941
|
+
"no-inline-comments": "error",
|
|
942
|
+
"style/multiline-comment-style": ["error", "separate-lines"]
|
|
940
943
|
}
|
|
941
944
|
}
|
|
942
945
|
];
|
|
@@ -1007,6 +1010,28 @@ init_cjs_shims();
|
|
|
1007
1010
|
init_cjs_shims();
|
|
1008
1011
|
var import_local_pkg = require("local-pkg");
|
|
1009
1012
|
var import_node_process = __toESM(require("process"), 1);
|
|
1013
|
+
var parserPlain = {
|
|
1014
|
+
meta: {
|
|
1015
|
+
name: "parser-plain"
|
|
1016
|
+
},
|
|
1017
|
+
parseForESLint: (code) => {
|
|
1018
|
+
return {
|
|
1019
|
+
ast: {
|
|
1020
|
+
body: [],
|
|
1021
|
+
comments: [],
|
|
1022
|
+
loc: { end: code.length, start: 0 },
|
|
1023
|
+
range: [0, code.length],
|
|
1024
|
+
tokens: [],
|
|
1025
|
+
type: "Program"
|
|
1026
|
+
},
|
|
1027
|
+
scopeManager: null,
|
|
1028
|
+
services: { isPlain: true },
|
|
1029
|
+
visitorKeys: {
|
|
1030
|
+
Program: []
|
|
1031
|
+
}
|
|
1032
|
+
};
|
|
1033
|
+
}
|
|
1034
|
+
};
|
|
1010
1035
|
async function combine(...configs) {
|
|
1011
1036
|
const resolved = await Promise.all(configs);
|
|
1012
1037
|
return resolved.flat();
|
|
@@ -1023,6 +1048,25 @@ function renameRules(rules, map) {
|
|
|
1023
1048
|
})
|
|
1024
1049
|
);
|
|
1025
1050
|
}
|
|
1051
|
+
function renamePluginInConfigs(configs, map) {
|
|
1052
|
+
return configs.map((index) => {
|
|
1053
|
+
const clone = { ...index };
|
|
1054
|
+
if (clone.rules) {
|
|
1055
|
+
clone.rules = renameRules(clone.rules, map);
|
|
1056
|
+
}
|
|
1057
|
+
if (clone.plugins) {
|
|
1058
|
+
clone.plugins = Object.fromEntries(
|
|
1059
|
+
Object.entries(clone.plugins).map(([key, value]) => {
|
|
1060
|
+
if (key in map) {
|
|
1061
|
+
return [map[key], value];
|
|
1062
|
+
}
|
|
1063
|
+
return [key, value];
|
|
1064
|
+
})
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
return clone;
|
|
1068
|
+
});
|
|
1069
|
+
}
|
|
1026
1070
|
function toArray(value) {
|
|
1027
1071
|
return Array.isArray(value) ? value : [value];
|
|
1028
1072
|
}
|
|
@@ -1031,26 +1075,22 @@ async function interopDefault(dynamicImport) {
|
|
|
1031
1075
|
return resolved.default || resolved;
|
|
1032
1076
|
}
|
|
1033
1077
|
async function ensurePackages(packages) {
|
|
1034
|
-
if (import_node_process.default.env.CI
|
|
1078
|
+
if (import_node_process.default.env.CI || import_node_process.default.stdout.isTTY === false) {
|
|
1035
1079
|
return;
|
|
1036
1080
|
}
|
|
1037
|
-
const nonExistingPackages = packages.filter(
|
|
1081
|
+
const nonExistingPackages = packages.filter(
|
|
1082
|
+
(index) => index && !(0, import_local_pkg.isPackageExists)(index)
|
|
1083
|
+
);
|
|
1038
1084
|
if (nonExistingPackages.length === 0) {
|
|
1039
1085
|
return;
|
|
1040
1086
|
}
|
|
1041
|
-
const
|
|
1042
|
-
const
|
|
1043
|
-
{
|
|
1044
|
-
|
|
1045
|
-
", "
|
|
1046
|
-
)}. Do you want to install them?`,
|
|
1047
|
-
name: "result",
|
|
1048
|
-
type: "confirm"
|
|
1049
|
-
}
|
|
1050
|
-
]);
|
|
1087
|
+
const prompts = await import("@clack/prompts");
|
|
1088
|
+
const result = await prompts.confirm({
|
|
1089
|
+
message: `${nonExistingPackages.length === 1 ? "Package is" : "Packages are"} required for this config: ${nonExistingPackages.join(", ")}. Do you want to install them?`
|
|
1090
|
+
});
|
|
1051
1091
|
if (result) {
|
|
1052
1092
|
await import("@antfu/install-pkg").then(
|
|
1053
|
-
(
|
|
1093
|
+
(index) => index.installPackage(nonExistingPackages, { dev: true })
|
|
1054
1094
|
);
|
|
1055
1095
|
}
|
|
1056
1096
|
}
|
|
@@ -1502,53 +1542,36 @@ async function jsonc(options = {}) {
|
|
|
1502
1542
|
|
|
1503
1543
|
// src/configs/markdown.ts
|
|
1504
1544
|
init_cjs_shims();
|
|
1505
|
-
|
|
1545
|
+
var import_eslint_merge_processors = require("eslint-merge-processors");
|
|
1546
|
+
async function markdown(options = {}) {
|
|
1506
1547
|
const {
|
|
1507
1548
|
componentExts: componentExtensions = [],
|
|
1508
1549
|
files = [GLOB_MARKDOWN],
|
|
1509
1550
|
overrides = {}
|
|
1510
1551
|
} = options;
|
|
1511
1552
|
const markdownPlugin = await interopDefault(import("eslint-plugin-markdown"));
|
|
1512
|
-
const baseProcessor = markdownPlugin.processors.markdown;
|
|
1513
|
-
const processor = !formatMarkdown ? {
|
|
1514
|
-
meta: {
|
|
1515
|
-
name: "markdown-processor"
|
|
1516
|
-
},
|
|
1517
|
-
supportsAutofix: true,
|
|
1518
|
-
...baseProcessor
|
|
1519
|
-
} : {
|
|
1520
|
-
meta: {
|
|
1521
|
-
name: "markdown-processor-with-content"
|
|
1522
|
-
},
|
|
1523
|
-
postprocess(messages, filename) {
|
|
1524
|
-
const markdownContent = messages.pop();
|
|
1525
|
-
const codeSnippets = baseProcessor.postprocess(messages, filename);
|
|
1526
|
-
return [...markdownContent ?? [], ...codeSnippets ?? []];
|
|
1527
|
-
},
|
|
1528
|
-
preprocess(text, filename) {
|
|
1529
|
-
const result = baseProcessor.preprocess(text, filename);
|
|
1530
|
-
return [
|
|
1531
|
-
...result,
|
|
1532
|
-
{
|
|
1533
|
-
filename: ".__markdown_content__",
|
|
1534
|
-
text
|
|
1535
|
-
}
|
|
1536
|
-
];
|
|
1537
|
-
},
|
|
1538
|
-
supportsAutofix: true
|
|
1539
|
-
};
|
|
1540
1553
|
return [
|
|
1541
1554
|
{
|
|
1542
|
-
name: "
|
|
1555
|
+
name: "antfu/markdown/setup",
|
|
1543
1556
|
plugins: {
|
|
1544
|
-
|
|
1557
|
+
markdownPlugin
|
|
1545
1558
|
}
|
|
1546
1559
|
},
|
|
1547
1560
|
{
|
|
1548
1561
|
files,
|
|
1549
1562
|
ignores: [GLOB_MARKDOWN_IN_MARKDOWN],
|
|
1550
|
-
name: "
|
|
1551
|
-
|
|
1563
|
+
name: "antfu/markdown/processor",
|
|
1564
|
+
// `eslint-plugin-markdown` only creates virtual files for code blocks,
|
|
1565
|
+
// but not the markdown file itself. We use `eslint-merge-processors` to
|
|
1566
|
+
// add a pass-through processor for the markdown file itself.
|
|
1567
|
+
processor: (0, import_eslint_merge_processors.mergeProcessors)([markdownPlugin.processors.markdown, import_eslint_merge_processors.processorPassThrough])
|
|
1568
|
+
},
|
|
1569
|
+
{
|
|
1570
|
+
files,
|
|
1571
|
+
languageOptions: {
|
|
1572
|
+
parser: parserPlain
|
|
1573
|
+
},
|
|
1574
|
+
name: "antfu/markdown/parser"
|
|
1552
1575
|
},
|
|
1553
1576
|
{
|
|
1554
1577
|
files: [
|
|
@@ -1562,12 +1585,11 @@ async function markdown(options = {}, formatMarkdown = false) {
|
|
|
1562
1585
|
}
|
|
1563
1586
|
}
|
|
1564
1587
|
},
|
|
1565
|
-
name: "
|
|
1588
|
+
name: "antfu/markdown/disables",
|
|
1566
1589
|
rules: {
|
|
1567
1590
|
"import/newline-after-import": "off",
|
|
1568
1591
|
"no-alert": "off",
|
|
1569
1592
|
"no-console": "off",
|
|
1570
|
-
"no-inline-comments": "off",
|
|
1571
1593
|
"no-labels": "off",
|
|
1572
1594
|
"no-lone-blocks": "off",
|
|
1573
1595
|
"no-restricted-syntax": "off",
|
|
@@ -1575,32 +1597,16 @@ async function markdown(options = {}, formatMarkdown = false) {
|
|
|
1575
1597
|
"no-unused-expressions": "off",
|
|
1576
1598
|
"no-unused-labels": "off",
|
|
1577
1599
|
"no-unused-vars": "off",
|
|
1600
|
+
"node/prefer-global/process": "off",
|
|
1578
1601
|
"style/comma-dangle": "off",
|
|
1579
1602
|
"style/eol-last": "off",
|
|
1580
|
-
"ts/await-thenable": "off",
|
|
1581
1603
|
"ts/consistent-type-imports": "off",
|
|
1582
|
-
"ts/dot-notation": "off",
|
|
1583
|
-
"ts/no-floating-promises": "off",
|
|
1584
|
-
"ts/no-for-in-array": "off",
|
|
1585
|
-
"ts/no-implied-eval": "off",
|
|
1586
|
-
"ts/no-misused-promises": "off",
|
|
1587
1604
|
"ts/no-namespace": "off",
|
|
1588
1605
|
"ts/no-redeclare": "off",
|
|
1589
1606
|
"ts/no-require-imports": "off",
|
|
1590
|
-
// Type aware rules
|
|
1591
|
-
"ts/no-throw-literal": "off",
|
|
1592
|
-
"ts/no-unnecessary-type-assertion": "off",
|
|
1593
|
-
"ts/no-unsafe-argument": "off",
|
|
1594
|
-
"ts/no-unsafe-assignment": "off",
|
|
1595
|
-
"ts/no-unsafe-call": "off",
|
|
1596
|
-
"ts/no-unsafe-member-access": "off",
|
|
1597
|
-
"ts/no-unsafe-return": "off",
|
|
1598
1607
|
"ts/no-unused-vars": "off",
|
|
1599
1608
|
"ts/no-use-before-define": "off",
|
|
1600
1609
|
"ts/no-var-requires": "off",
|
|
1601
|
-
"ts/restrict-plus-operands": "off",
|
|
1602
|
-
"ts/restrict-template-expressions": "off",
|
|
1603
|
-
"ts/unbound-method": "off",
|
|
1604
1610
|
"unicode-bom": "off",
|
|
1605
1611
|
"unused-imports/no-unused-imports": "off",
|
|
1606
1612
|
"unused-imports/no-unused-vars": "off",
|
|
@@ -1770,13 +1776,13 @@ async function prettier(options) {
|
|
|
1770
1776
|
|
|
1771
1777
|
// src/configs/promise.ts
|
|
1772
1778
|
init_cjs_shims();
|
|
1773
|
-
var
|
|
1779
|
+
var import_compat2 = require("@eslint/compat");
|
|
1774
1780
|
async function promise() {
|
|
1775
1781
|
return [
|
|
1776
1782
|
{
|
|
1777
1783
|
name: "style:promise",
|
|
1778
1784
|
plugins: {
|
|
1779
|
-
promise: (0,
|
|
1785
|
+
promise: (0, import_compat2.fixupPluginRules)(import_eslint_plugin_promise.default)
|
|
1780
1786
|
},
|
|
1781
1787
|
rules: {
|
|
1782
1788
|
"promise/always-return": [
|
|
@@ -1811,15 +1817,16 @@ async function promise() {
|
|
|
1811
1817
|
|
|
1812
1818
|
// src/configs/react.ts
|
|
1813
1819
|
init_cjs_shims();
|
|
1814
|
-
var
|
|
1820
|
+
var import_compat3 = require("@eslint/compat");
|
|
1815
1821
|
async function react(options = {}) {
|
|
1816
1822
|
const { files = [GLOB_TS, GLOB_TSX], importSource, jsxPragma, overrides = {} } = options;
|
|
1817
1823
|
await ensurePackages(["@eslint-react/eslint-plugin", "eslint-plugin-react-hooks"]);
|
|
1818
|
-
const [pluginReact, pluginReactHooks, pluginStylistic, parserTs] = await Promise.all([
|
|
1824
|
+
const [pluginReact, pluginReactHooks, pluginStylistic, parserTs, pluginTs] = await Promise.all([
|
|
1819
1825
|
interopDefault(import("@eslint-react/eslint-plugin")),
|
|
1820
1826
|
interopDefault(import("eslint-plugin-react-hooks")),
|
|
1821
1827
|
interopDefault(import("@stylistic/eslint-plugin")),
|
|
1822
|
-
interopDefault(import("@typescript-eslint/parser"))
|
|
1828
|
+
interopDefault(import("@typescript-eslint/parser")),
|
|
1829
|
+
interopDefault(import("@typescript-eslint/eslint-plugin"))
|
|
1823
1830
|
]);
|
|
1824
1831
|
const plugins = pluginReact.configs.all.plugins;
|
|
1825
1832
|
const tsconfigPath = options?.tsconfigPath ? toArray(options.tsconfigPath) : void 0;
|
|
@@ -1828,10 +1835,11 @@ async function react(options = {}) {
|
|
|
1828
1835
|
name: "style:react:setup",
|
|
1829
1836
|
plugins: {
|
|
1830
1837
|
react: plugins["@eslint-react"],
|
|
1831
|
-
"react-hooks": (0,
|
|
1838
|
+
"react-hooks": (0, import_compat3.fixupPluginRules)(pluginReactHooks),
|
|
1832
1839
|
"react-hooks-extra": plugins["@eslint-react/hooks-extra"],
|
|
1833
1840
|
"react-naming-convention": plugins["@eslint-react/naming-convention"],
|
|
1834
|
-
style: pluginStylistic
|
|
1841
|
+
style: pluginStylistic,
|
|
1842
|
+
ts: pluginTs
|
|
1835
1843
|
}
|
|
1836
1844
|
},
|
|
1837
1845
|
{
|
|
@@ -1881,7 +1889,8 @@ async function react(options = {}) {
|
|
|
1881
1889
|
"react/no-unsafe-component-will-receive-props": "off",
|
|
1882
1890
|
"react/no-unsafe-component-will-update": "off",
|
|
1883
1891
|
"react/no-unstable-context-value": "error",
|
|
1884
|
-
|
|
1892
|
+
// TODO: False positives on roblox primitives.
|
|
1893
|
+
"react/no-unstable-default-props": "off",
|
|
1885
1894
|
"react/no-unused-class-component-members": "warn",
|
|
1886
1895
|
"react/no-unused-state": "warn",
|
|
1887
1896
|
"react/no-useless-fragment": "warn",
|
|
@@ -1898,62 +1907,6 @@ async function react(options = {}) {
|
|
|
1898
1907
|
"react-hooks-extra/prefer-use-state-lazy-initialization": "error",
|
|
1899
1908
|
// recommended rules from @eslint-react/naming-convention
|
|
1900
1909
|
"react-naming-convention/use-state": "error",
|
|
1901
|
-
// "react/destructuring-assignment": [
|
|
1902
|
-
// "error",
|
|
1903
|
-
// "always",
|
|
1904
|
-
// {
|
|
1905
|
-
// destructureInSignature: "always",
|
|
1906
|
-
// },
|
|
1907
|
-
// ],
|
|
1908
|
-
// "react/display-name": "off",
|
|
1909
|
-
// "react/function-component-definition": "error",
|
|
1910
|
-
// "react/hook-use-state": "error",
|
|
1911
|
-
// "react/jsx-boolean-value": ["error", "always"],
|
|
1912
|
-
// "react/jsx-fragments": "error",
|
|
1913
|
-
// "react/jsx-handler-names": "error",
|
|
1914
|
-
// "react/jsx-key": "error",
|
|
1915
|
-
// "react/jsx-max-depth": [
|
|
1916
|
-
// "error",
|
|
1917
|
-
// {
|
|
1918
|
-
// max: 5,
|
|
1919
|
-
// },
|
|
1920
|
-
// ],
|
|
1921
|
-
// "react/jsx-no-bind": "error",
|
|
1922
|
-
// "react/jsx-no-comment-textnodes": "error",
|
|
1923
|
-
// "react/jsx-no-duplicate-props": "error",
|
|
1924
|
-
// "react/jsx-no-leaked-render": "error",
|
|
1925
|
-
// "react/jsx-no-target-blank": "error",
|
|
1926
|
-
// "react/jsx-no-undef": "off",
|
|
1927
|
-
// "react/jsx-uses-react": "error",
|
|
1928
|
-
// "react/jsx-uses-vars": "error",
|
|
1929
|
-
// "react/no-children-prop": "error",
|
|
1930
|
-
// "react/no-danger-with-children": "off",
|
|
1931
|
-
// "react/no-deprecated": "error",
|
|
1932
|
-
// "react/no-direct-mutation-state": "error",
|
|
1933
|
-
// "react/no-find-dom-node": "off",
|
|
1934
|
-
// "react/no-is-mounted": "error",
|
|
1935
|
-
// "react/no-render-return-value": "error",
|
|
1936
|
-
// "react/no-string-refs": "error",
|
|
1937
|
-
// "react/no-unescaped-entities": "off",
|
|
1938
|
-
// "react/no-unknown-property": "off",
|
|
1939
|
-
// "react/no-unsafe": "off",
|
|
1940
|
-
// "react/no-unstable-nested-components": [
|
|
1941
|
-
// "error",
|
|
1942
|
-
// {
|
|
1943
|
-
// allowAsProps: true,
|
|
1944
|
-
// },
|
|
1945
|
-
// ],
|
|
1946
|
-
// "react/no-unused-prop-types": "error",
|
|
1947
|
-
// "react/prefer-read-only-props": "error",
|
|
1948
|
-
// "react/prop-types": "off",
|
|
1949
|
-
// "react/react-in-jsx-scope": "off",
|
|
1950
|
-
// "react/require-render-return": "error",
|
|
1951
|
-
// "react/self-closing-comp": [
|
|
1952
|
-
// "error",
|
|
1953
|
-
// {
|
|
1954
|
-
// component: true,
|
|
1955
|
-
// },
|
|
1956
|
-
// ],
|
|
1957
1910
|
"style/jsx-curly-brace-presence": [
|
|
1958
1911
|
"error",
|
|
1959
1912
|
{
|
|
@@ -1994,7 +1947,8 @@ async function react(options = {}) {
|
|
|
1994
1947
|
{
|
|
1995
1948
|
files: [GLOB_TSX],
|
|
1996
1949
|
rules: {
|
|
1997
|
-
"max-lines-per-function": "off"
|
|
1950
|
+
"max-lines-per-function": "off",
|
|
1951
|
+
"ts/no-magic-numbers": "off"
|
|
1998
1952
|
}
|
|
1999
1953
|
}
|
|
2000
1954
|
];
|
|
@@ -2061,13 +2015,13 @@ async function roblox(options = {}) {
|
|
|
2061
2015
|
|
|
2062
2016
|
// src/configs/shopify.ts
|
|
2063
2017
|
init_cjs_shims();
|
|
2064
|
-
var
|
|
2018
|
+
var import_compat4 = require("@eslint/compat");
|
|
2065
2019
|
async function shopify() {
|
|
2066
2020
|
return [
|
|
2067
2021
|
{
|
|
2068
2022
|
name: "style:shopify",
|
|
2069
2023
|
plugins: {
|
|
2070
|
-
shopify: (0,
|
|
2024
|
+
shopify: (0, import_compat4.fixupPluginRules)(import_eslint_plugin.default)
|
|
2071
2025
|
},
|
|
2072
2026
|
rules: {
|
|
2073
2027
|
"shopify/prefer-class-properties": "error",
|
|
@@ -2157,6 +2111,7 @@ async function sortPackageJson() {
|
|
|
2157
2111
|
"packageManager",
|
|
2158
2112
|
"description",
|
|
2159
2113
|
"author",
|
|
2114
|
+
"contributors",
|
|
2160
2115
|
"license",
|
|
2161
2116
|
"funding",
|
|
2162
2117
|
"homepage",
|
|
@@ -2636,6 +2591,7 @@ async function typescript(options = {}) {
|
|
|
2636
2591
|
rules: {
|
|
2637
2592
|
"eslint-comments/no-unlimited-disable": "off",
|
|
2638
2593
|
"import/no-duplicates": "off",
|
|
2594
|
+
"max-lines": "off",
|
|
2639
2595
|
"no-restricted-syntax": "off",
|
|
2640
2596
|
"unused-imports/no-unused-vars": "off"
|
|
2641
2597
|
}
|
|
@@ -2910,13 +2866,10 @@ function style(options = {}, ...userConfigs) {
|
|
|
2910
2866
|
}
|
|
2911
2867
|
if (options.markdown ?? true) {
|
|
2912
2868
|
configs.push(
|
|
2913
|
-
markdown(
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
},
|
|
2918
|
-
options.formatters === true || !!(options.formatters || {})?.markdown
|
|
2919
|
-
)
|
|
2869
|
+
markdown({
|
|
2870
|
+
componentExts: componentExtensions,
|
|
2871
|
+
overrides: getOverrides(options, "markdown")
|
|
2872
|
+
})
|
|
2920
2873
|
);
|
|
2921
2874
|
}
|
|
2922
2875
|
if (options.formatters) {
|
|
@@ -2992,10 +2945,12 @@ init_cjs_shims();
|
|
|
2992
2945
|
jsdoc,
|
|
2993
2946
|
jsonc,
|
|
2994
2947
|
markdown,
|
|
2948
|
+
parserPlain,
|
|
2995
2949
|
perfectionist,
|
|
2996
2950
|
prettier,
|
|
2997
2951
|
promise,
|
|
2998
2952
|
react,
|
|
2953
|
+
renamePluginInConfigs,
|
|
2999
2954
|
renameRules,
|
|
3000
2955
|
resolveSubOptions,
|
|
3001
2956
|
roblox,
|