@w5s/eslint-config 3.16.0 → 3.17.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/dist/index.d.ts +1597 -878
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -9
- package/dist/index.js.map +1 -1
- package/package.json +11 -10
- package/src/config/markdown.ts +1 -1
- package/src/config/unused-imports.ts +51 -0
- package/src/config.ts +1 -0
- package/src/defineConfig.ts +20 -16
- package/src/typegen/jsonc.d.ts +4 -0
- package/src/typegen/perfectionist.d.ts +181 -4
- package/src/typegen/react.d.ts +2 -2
- package/src/typegen/test.d.ts +3 -1
- package/src/typegen/ts.d.ts +1 -0
- package/src/typegen/unicorn.d.ts +374 -322
- package/src/typegen/unused-imports.d.ts +84 -0
- package/src/typegen/yml.d.ts +4 -0
package/dist/index.js
CHANGED
|
@@ -838,11 +838,7 @@ async function jsx(options = {}) {
|
|
|
838
838
|
}
|
|
839
839
|
//#endregion
|
|
840
840
|
//#region src/config/markdown.ts
|
|
841
|
-
const defaultFiles$7 = [
|
|
842
|
-
`**/${Project.extensionsToGlob(Project.queryExtensions(["markdown"]))}`,
|
|
843
|
-
"**/CHANGELOG.md",
|
|
844
|
-
"**/CODE_OF_CONDUCT.md"
|
|
845
|
-
];
|
|
841
|
+
const defaultFiles$7 = [`**/${Project.extensionsToGlob(Project.queryExtensions(["markdown"]))}`];
|
|
846
842
|
async function markdown(options = {}) {
|
|
847
843
|
const [markdownPlugin] = await Promise.all([interopDefault(import("@eslint/markdown"))]);
|
|
848
844
|
const { files, language = "markdown/gfm", languageOptions, recommended = true, rules = {}, stylistic = true } = options;
|
|
@@ -1050,7 +1046,7 @@ var import_dist = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
1050
1046
|
const meta = Object.freeze({
|
|
1051
1047
|
buildNumber: 1,
|
|
1052
1048
|
name: "@w5s/dev",
|
|
1053
|
-
version: "3.
|
|
1049
|
+
version: "3.8.0"
|
|
1054
1050
|
});
|
|
1055
1051
|
/**
|
|
1056
1052
|
* Supported ECMA version
|
|
@@ -1471,6 +1467,33 @@ async function unicorn(options = {}) {
|
|
|
1471
1467
|
];
|
|
1472
1468
|
}
|
|
1473
1469
|
//#endregion
|
|
1470
|
+
//#region src/config/unused-imports.ts
|
|
1471
|
+
async function unusedImports(options = {}) {
|
|
1472
|
+
const [unusedImportPlugin] = await Promise.all([interopDefault(import("eslint-plugin-unused-imports"))]);
|
|
1473
|
+
const { files = [sourceGlob$1], recommended = true, rules = {} } = options;
|
|
1474
|
+
return [{
|
|
1475
|
+
name: "w5s/unused-imports/setup",
|
|
1476
|
+
plugins: { "unused-imports": unusedImportPlugin }
|
|
1477
|
+
}, {
|
|
1478
|
+
files,
|
|
1479
|
+
name: "w5s/unused-imports/rules",
|
|
1480
|
+
rules: {
|
|
1481
|
+
...recommended ? {
|
|
1482
|
+
"no-unused-vars": "off",
|
|
1483
|
+
"ts/no-unused-vars": "off",
|
|
1484
|
+
"unused-imports/no-unused-imports": "error",
|
|
1485
|
+
"unused-imports/no-unused-vars": ["error", {
|
|
1486
|
+
args: "after-used",
|
|
1487
|
+
argsIgnorePattern: "^_",
|
|
1488
|
+
vars: "all",
|
|
1489
|
+
varsIgnorePattern: "^_"
|
|
1490
|
+
}]
|
|
1491
|
+
} : {},
|
|
1492
|
+
...rules
|
|
1493
|
+
}
|
|
1494
|
+
}];
|
|
1495
|
+
}
|
|
1496
|
+
//#endregion
|
|
1474
1497
|
//#region src/config/yml.ts
|
|
1475
1498
|
const defaultFiles = [ymlSourceGlob];
|
|
1476
1499
|
async function yml(options = {}) {
|
|
@@ -1530,16 +1553,16 @@ async function defineConfig(options = {}) {
|
|
|
1530
1553
|
...optionsOrBoolean
|
|
1531
1554
|
});
|
|
1532
1555
|
const includeEnabled = (factory, input) => input.enabled ? [factory(input)] : [];
|
|
1533
|
-
return ESLintConfig.concat(...includeEnabled(e18e, toOption(plugins.e18e)), ...includeEnabled(es, toOption(plugins.es)), ...includeEnabled(ts, toOption(plugins.ts)), ...includeEnabled(ignores, toOption(options)), ...includeEnabled(jsonc, toOption(plugins.jsonc)), ...includeEnabled(jsdoc, toOption(plugins.jsdoc)), ...includeEnabled(jsx, toOption(plugins.jsx)), ...includeEnabled(react, toOption(plugins.react)), ...includeEnabled(stylistic, toOption(plugins.stylistic)), ...includeEnabled(imports, toOption(plugins.import)), ...includeEnabled(markdown, toOption(plugins.markdown)), ...includeEnabled(next, toOption(plugins.next, false)), ...includeEnabled(node, toOption(plugins.node)), ...includeEnabled(perfectionist, toOption(plugins.perfectionist)), ...includeEnabled(unicorn, toOption(plugins.unicorn)), ...includeEnabled(yml, toOption(plugins.yml)), ...includeEnabled(test, toOption(plugins.test)), ...rules ? [{ rules }] : []);
|
|
1556
|
+
return ESLintConfig.concat(...includeEnabled(e18e, toOption(plugins.e18e)), ...includeEnabled(es, toOption(plugins.es)), ...includeEnabled(ts, toOption(plugins.ts)), ...includeEnabled(ignores, toOption(options)), ...includeEnabled(jsonc, toOption(plugins.jsonc)), ...includeEnabled(jsdoc, toOption(plugins.jsdoc)), ...includeEnabled(jsx, toOption(plugins.jsx)), ...includeEnabled(react, toOption(plugins.react)), ...includeEnabled(stylistic, toOption(plugins.stylistic)), ...includeEnabled(imports, toOption(plugins.import)), ...includeEnabled(markdown, toOption(plugins.markdown)), ...includeEnabled(next, toOption(plugins.next, false)), ...includeEnabled(node, toOption(plugins.node)), ...includeEnabled(perfectionist, toOption(plugins.perfectionist)), ...includeEnabled(unicorn, toOption(plugins.unicorn)), ...includeEnabled(yml, toOption(plugins.yml)), ...includeEnabled(test, toOption(plugins.test)), ...includeEnabled(unusedImports, toOption(plugins["unused-imports"])), ...rules ? [{ rules }] : []);
|
|
1534
1557
|
}
|
|
1535
1558
|
//#endregion
|
|
1536
1559
|
//#region src/meta.ts
|
|
1537
1560
|
const meta = Object.freeze({
|
|
1538
1561
|
buildNumber: 1,
|
|
1539
1562
|
name: "@w5s/eslint-config",
|
|
1540
|
-
version: "3.
|
|
1563
|
+
version: "3.17.0"
|
|
1541
1564
|
});
|
|
1542
1565
|
//#endregion
|
|
1543
|
-
export { StylisticConfig, defineConfig as default, defineConfig, e18e, es, ignores, imports, jsdoc, jsonc, jsx, markdown, meta, next, node, perfectionist, react, stylistic, test, ts, unicorn, yml };
|
|
1566
|
+
export { StylisticConfig, defineConfig as default, defineConfig, e18e, es, ignores, imports, jsdoc, jsonc, jsx, markdown, meta, next, node, perfectionist, react, stylistic, test, ts, unicorn, unusedImports, yml };
|
|
1544
1567
|
|
|
1545
1568
|
//# sourceMappingURL=index.js.map
|