@jsse/eslint-config 0.4.8 → 0.4.11
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/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +11 -8
- package/dist/index.d.ts +14 -4
- package/dist/index.js +38 -132
- package/dist/version-Cmu7XVG1.js +39 -0
- package/package.json +23 -20
- package/dist/esm/cli.d.ts +0 -1
- package/dist/esm/cli.js +0 -121
- package/dist/esm/config-fns.d.ts +0 -138
- package/dist/esm/config-fns.js +0 -161
- package/dist/esm/configs/antfu.d.ts +0 -4
- package/dist/esm/configs/antfu.js +0 -30
- package/dist/esm/configs/command.d.ts +0 -10
- package/dist/esm/configs/command.js +0 -17
- package/dist/esm/configs/de-morgan.d.ts +0 -2
- package/dist/esm/configs/de-morgan.js +0 -9
- package/dist/esm/configs/eslint-comments.d.ts +0 -2
- package/dist/esm/configs/eslint-comments.js +0 -16
- package/dist/esm/configs/gql.d.ts +0 -2
- package/dist/esm/configs/gql.js +0 -4
- package/dist/esm/configs/ignores.d.ts +0 -2
- package/dist/esm/configs/ignores.js +0 -9
- package/dist/esm/configs/imports.d.ts +0 -2
- package/dist/esm/configs/imports.js +0 -28
- package/dist/esm/configs/javascript.d.ts +0 -6
- package/dist/esm/configs/javascript.js +0 -262
- package/dist/esm/configs/jsdoc.d.ts +0 -2
- package/dist/esm/configs/jsdoc.js +0 -31
- package/dist/esm/configs/jsonc.d.ts +0 -4
- package/dist/esm/configs/jsonc.js +0 -76
- package/dist/esm/configs/markdown.d.ts +0 -4
- package/dist/esm/configs/markdown.js +0 -122
- package/dist/esm/configs/n.d.ts +0 -2
- package/dist/esm/configs/n.js +0 -21
- package/dist/esm/configs/no-only-tests.d.ts +0 -4
- package/dist/esm/configs/no-only-tests.js +0 -31
- package/dist/esm/configs/perfectionist.d.ts +0 -7
- package/dist/esm/configs/perfectionist.js +0 -60
- package/dist/esm/configs/pnpm.d.ts +0 -2
- package/dist/esm/configs/pnpm.js +0 -34
- package/dist/esm/configs/prettier.d.ts +0 -7
- package/dist/esm/configs/prettier.js +0 -126
- package/dist/esm/configs/react.d.ts +0 -6
- package/dist/esm/configs/react.js +0 -300
- package/dist/esm/configs/sort-package-json.d.ts +0 -7
- package/dist/esm/configs/sort-package-json.js +0 -102
- package/dist/esm/configs/sort-tsconfig.d.ts +0 -14
- package/dist/esm/configs/sort-tsconfig.js +0 -135
- package/dist/esm/configs/stylistic.d.ts +0 -2
- package/dist/esm/configs/stylistic.js +0 -39
- package/dist/esm/configs/tailwind.d.ts +0 -1
- package/dist/esm/configs/tailwind.js +0 -81
- package/dist/esm/configs/toml.d.ts +0 -2
- package/dist/esm/configs/toml.js +0 -50
- package/dist/esm/configs/ts/parser.d.ts +0 -7
- package/dist/esm/configs/ts/parser.js +0 -71
- package/dist/esm/configs/ts/requires-type-checking.d.ts +0 -1
- package/dist/esm/configs/ts/requires-type-checking.js +0 -61
- package/dist/esm/configs/ts/typescript-language-options.d.ts +0 -2
- package/dist/esm/configs/ts/typescript-language-options.js +0 -22
- package/dist/esm/configs/ts/typescript-rules.d.ts +0 -11
- package/dist/esm/configs/ts/typescript-rules.js +0 -379
- package/dist/esm/configs/ts/typescript.d.ts +0 -4
- package/dist/esm/configs/ts/typescript.js +0 -123
- package/dist/esm/configs/tsdoc.d.ts +0 -2
- package/dist/esm/configs/tsdoc.js +0 -16
- package/dist/esm/configs/unicorn.d.ts +0 -2
- package/dist/esm/configs/unicorn.js +0 -114
- package/dist/esm/configs/vitest.d.ts +0 -4
- package/dist/esm/configs/vitest.js +0 -29
- package/dist/esm/configs/yml.d.ts +0 -4
- package/dist/esm/configs/yml.js +0 -51
- package/dist/esm/const.d.ts +0 -5
- package/dist/esm/const.js +0 -25
- package/dist/esm/define-config.d.ts +0 -7
- package/dist/esm/define-config.js +0 -256
- package/dist/esm/dev.d.ts +0 -4
- package/dist/esm/dev.js +0 -25
- package/dist/esm/fixable.d.ts +0 -2
- package/dist/esm/fixable.js +0 -4
- package/dist/esm/generated/fixable-rules-map.d.ts +0 -2
- package/dist/esm/generated/fixable-rules-map.js +0 -443
- package/dist/esm/generated/version.d.ts +0 -1
- package/dist/esm/generated/version.js +0 -1
- package/dist/esm/globs.d.ts +0 -25
- package/dist/esm/globs.js +0 -73
- package/dist/esm/index.d.ts +0 -9
- package/dist/esm/index.js +0 -8
- package/dist/esm/lager.d.ts +0 -32
- package/dist/esm/lager.js +0 -87
- package/dist/esm/log.d.ts +0 -2
- package/dist/esm/log.js +0 -2
- package/dist/esm/plugins-all.d.ts +0 -26
- package/dist/esm/plugins-all.js +0 -120
- package/dist/esm/plugins.d.ts +0 -1570
- package/dist/esm/plugins.js +0 -97
- package/dist/esm/presets.d.ts +0 -18
- package/dist/esm/presets.js +0 -75
- package/dist/esm/types.d.ts +0 -287
- package/dist/esm/types.js +0 -1
- package/dist/esm/utils.d.ts +0 -51
- package/dist/esm/utils.js +0 -156
- package/dist/version-PF6gUNyJ.js +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @jsse/eslint-config
|
|
2
2
|
|
|
3
|
+
## 0.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f5835d3: remove old logging thing
|
|
8
|
+
|
|
9
|
+
## 0.4.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 5ea701f: added oxlint
|
|
14
|
+
|
|
15
|
+
## 0.4.9
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- update dependencies
|
|
20
|
+
|
|
3
21
|
## 0.4.8
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/README.md
CHANGED
package/dist/cli.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export {};
|
package/dist/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VERSION } from "./version-
|
|
1
|
+
import { DEBUG, VERSION } from "./version-Cmu7XVG1.js";
|
|
2
2
|
import fs from "node:fs";
|
|
3
3
|
import process$1 from "node:process";
|
|
4
4
|
import { EventEmitter } from "events";
|
|
@@ -572,11 +572,11 @@ var CAC = class extends EventEmitter {
|
|
|
572
572
|
}
|
|
573
573
|
};
|
|
574
574
|
const cac = (name = "") => new CAC(name);
|
|
575
|
-
var dist_default = cac;
|
|
576
575
|
|
|
577
576
|
//#endregion
|
|
578
577
|
//#region src/cli.ts
|
|
579
578
|
const cli = cac("jsselint");
|
|
579
|
+
const DEBUG$1 = DEBUG || process$1.argv.includes("-debug");
|
|
580
580
|
const CONFIG_OPTIONS_STRING = `
|
|
581
581
|
{
|
|
582
582
|
/**
|
|
@@ -627,7 +627,7 @@ export default jsse(
|
|
|
627
627
|
${CONFIG_OPTIONS_STRING}
|
|
628
628
|
);
|
|
629
629
|
`;
|
|
630
|
-
cli.command("", "default command").action(() => {
|
|
630
|
+
cli.command("", "default command ~ show help").action(() => {
|
|
631
631
|
cli.outputHelp();
|
|
632
632
|
process$1.exit(1);
|
|
633
633
|
});
|
|
@@ -662,12 +662,14 @@ cli.command("version", "echo version").action(() => {
|
|
|
662
662
|
cli.version(typeof VERSION === "string" ? VERSION : "unknown");
|
|
663
663
|
cli.help();
|
|
664
664
|
async function main(args) {
|
|
665
|
-
const argv = args ?? process$1.argv
|
|
665
|
+
const argv = args ?? process$1.argv;
|
|
666
666
|
try {
|
|
667
667
|
const parsed = cli.parse(argv, { run: false });
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
668
|
+
if (DEBUG$1) {
|
|
669
|
+
console.log("=====");
|
|
670
|
+
console.log(parsed);
|
|
671
|
+
console.log("=====");
|
|
672
|
+
}
|
|
671
673
|
await cli.runMatchedCommand();
|
|
672
674
|
} catch (error) {
|
|
673
675
|
if (error instanceof Error) {
|
|
@@ -683,4 +685,5 @@ main().catch((e) => {
|
|
|
683
685
|
throw e;
|
|
684
686
|
});
|
|
685
687
|
|
|
686
|
-
//#endregion
|
|
688
|
+
//#endregion
|
|
689
|
+
export { };
|
package/dist/index.d.ts
CHANGED
|
@@ -2598,7 +2598,14 @@ type NoRestrictedExports = [] | [{
|
|
|
2598
2598
|
type NoRestrictedGlobals = (string | {
|
|
2599
2599
|
name: string;
|
|
2600
2600
|
message?: string;
|
|
2601
|
-
})[]
|
|
2601
|
+
})[] | [] | [{
|
|
2602
|
+
globals: (string | {
|
|
2603
|
+
name: string;
|
|
2604
|
+
message?: string;
|
|
2605
|
+
})[];
|
|
2606
|
+
checkGlobalObject?: boolean;
|
|
2607
|
+
globalObjects?: string[];
|
|
2608
|
+
}];
|
|
2602
2609
|
// ----- no-restricted-imports -----
|
|
2603
2610
|
type NoRestrictedImports = (string | {
|
|
2604
2611
|
name: string;
|
|
@@ -2826,6 +2833,8 @@ type OneVar = [] | [("always" | "never" | "consecutive") | {
|
|
|
2826
2833
|
var?: "always" | "never" | "consecutive";
|
|
2827
2834
|
let?: "always" | "never" | "consecutive";
|
|
2828
2835
|
const?: "always" | "never" | "consecutive";
|
|
2836
|
+
using?: "always" | "never" | "consecutive";
|
|
2837
|
+
awaitUsing?: "always" | "never" | "consecutive";
|
|
2829
2838
|
} | {
|
|
2830
2839
|
initialized?: "always" | "never" | "consecutive";
|
|
2831
2840
|
uninitialized?: "always" | "never" | "consecutive";
|
|
@@ -7037,7 +7046,7 @@ interface PnpmRuleOptions {
|
|
|
7037
7046
|
*/
|
|
7038
7047
|
"pnpm/json-enforce-catalog"?: Linter.RuleEntry<PnpmJsonEnforceCatalog>;
|
|
7039
7048
|
/**
|
|
7040
|
-
* Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This
|
|
7049
|
+
* Prefer having pnpm settings in `pnpm-workspace.yaml` instead of `package.json`. This requires pnpm v10.6+, see https://github.com/orgs/pnpm/discussions/9037.
|
|
7041
7050
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/json/json-prefer-workspace-settings.test.ts
|
|
7042
7051
|
*/
|
|
7043
7052
|
"pnpm/json-prefer-workspace-settings"?: Linter.RuleEntry<PnpmJsonPreferWorkspaceSettings>;
|
|
@@ -7047,7 +7056,7 @@ interface PnpmRuleOptions {
|
|
|
7047
7056
|
*/
|
|
7048
7057
|
"pnpm/json-valid-catalog"?: Linter.RuleEntry<PnpmJsonValidCatalog>;
|
|
7049
7058
|
/**
|
|
7050
|
-
* Disallow
|
|
7059
|
+
* Disallow duplicate catalog items in `pnpm-workspace.yaml`
|
|
7051
7060
|
* @see https://github.com/antfu/pnpm-workspace-utils/tree/main/packages/eslint-plugin-pnpm/src/rules/yaml/yaml-no-duplicate-catalog-item.test.ts
|
|
7052
7061
|
*/
|
|
7053
7062
|
"pnpm/yaml-no-duplicate-catalog-item"?: Linter.RuleEntry<PnpmYamlNoDuplicateCatalogItem>;
|
|
@@ -13729,6 +13738,7 @@ type OptionsConfig = {
|
|
|
13729
13738
|
type RenamePefix<T extends Record<string, unknown>, FromPref extends string, ToPref extends string> = { [K in keyof T as K extends `${FromPref}${infer Rest}` ? `${ToPref}${Rest}` : K]: T[K] };
|
|
13730
13739
|
//#endregion
|
|
13731
13740
|
//#region src/const.d.ts
|
|
13741
|
+
declare const DEBUG: boolean;
|
|
13732
13742
|
declare const SLOW_RULES: RuleName[];
|
|
13733
13743
|
//#endregion
|
|
13734
13744
|
//#region src/define-config.d.ts
|
|
@@ -13740,7 +13750,7 @@ declare function defineConfig(options?: OptionsConfig & Config, ...userConfigs:
|
|
|
13740
13750
|
type DefineConfig = typeof defineConfig;
|
|
13741
13751
|
//#endregion
|
|
13742
13752
|
//#region src/generated/version.d.ts
|
|
13743
|
-
declare const VERSION = "0.4.
|
|
13753
|
+
declare const VERSION = "0.4.11";
|
|
13744
13754
|
declare namespace globs_d_exports {
|
|
13745
13755
|
export { GLOB_ALL_SRC, GLOB_CSS, GLOB_EXCLUDE, GLOB_GRAPHQL, GLOB_HTML, GLOB_JS, GLOB_JSON, GLOB_JSON5, GLOB_JSONC, GLOB_JSX, GLOB_JS_SRC_EXT, GLOB_LESS, GLOB_MARKDOWN, GLOB_MARKDOWN_CODE, GLOB_MARKDOWN_IN_MARKDOWN, GLOB_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_YAML };
|
|
13746
13756
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __commonJS, __export, __toESM } from "./chunk-CkHaCily.js";
|
|
2
|
-
import { VERSION } from "./version-
|
|
2
|
+
import { DEBUG, SLOW_RULES, VERSION } from "./version-Cmu7XVG1.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import fs, { promises, realpathSync, statSync } from "node:fs";
|
|
5
5
|
import process$1 from "node:process";
|
|
@@ -27,30 +27,6 @@ import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
|
27
27
|
import tseslint from "typescript-eslint";
|
|
28
28
|
import { fixupPluginRules } from "@eslint/compat";
|
|
29
29
|
|
|
30
|
-
//#region src/const.ts
|
|
31
|
-
const SLOW_RULES = [
|
|
32
|
-
"@typescript-eslint/no-misused-promises",
|
|
33
|
-
"@typescript-eslint/no-redeclare",
|
|
34
|
-
"@typescript-eslint/no-unsafe-assignment",
|
|
35
|
-
"@typescript-eslint/no-unsafe-call",
|
|
36
|
-
"@typescript-eslint/no-unsafe-member-access",
|
|
37
|
-
"@typescript-eslint/no-unsafe-return",
|
|
38
|
-
"import/no-duplicates",
|
|
39
|
-
"jsdoc/check-access",
|
|
40
|
-
"jsdoc/check-alignment",
|
|
41
|
-
"jsdoc/check-property-names",
|
|
42
|
-
"jsdoc/check-types",
|
|
43
|
-
"jsdoc/empty-tags",
|
|
44
|
-
"jsdoc/multiline-blocks",
|
|
45
|
-
"jsdoc/no-multi-asterisks",
|
|
46
|
-
"jsdoc/require-property-description",
|
|
47
|
-
"jsdoc/require-property-name",
|
|
48
|
-
"jsdoc/require-property",
|
|
49
|
-
"unicorn/expiring-todo-comments",
|
|
50
|
-
"unicorn/no-unnecessary-polyfills"
|
|
51
|
-
];
|
|
52
|
-
|
|
53
|
-
//#endregion
|
|
54
30
|
//#region node_modules/.pnpm/acorn@8.15.0/node_modules/acorn/dist/acorn.mjs
|
|
55
31
|
var astralIdentifierCodes = [
|
|
56
32
|
509,
|
|
@@ -1232,12 +1208,12 @@ var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;
|
|
|
1232
1208
|
var ref = Object.prototype;
|
|
1233
1209
|
var hasOwnProperty$2 = ref.hasOwnProperty;
|
|
1234
1210
|
var toString = ref.toString;
|
|
1235
|
-
var hasOwn = Object.hasOwn || function(obj, propName) {
|
|
1211
|
+
var hasOwn = Object.hasOwn || (function(obj, propName) {
|
|
1236
1212
|
return hasOwnProperty$2.call(obj, propName);
|
|
1237
|
-
};
|
|
1238
|
-
var isArray = Array.isArray || function(obj) {
|
|
1213
|
+
});
|
|
1214
|
+
var isArray = Array.isArray || (function(obj) {
|
|
1239
1215
|
return toString.call(obj) === "[object Array]";
|
|
1240
|
-
};
|
|
1216
|
+
});
|
|
1241
1217
|
var regexpCache = Object.create(null);
|
|
1242
1218
|
function wordsRegexp(words) {
|
|
1243
1219
|
return regexpCache[words] || (regexpCache[words] = new RegExp("^(?:" + words.replace(/ /g, "|") + ")$"));
|
|
@@ -12478,7 +12454,7 @@ async function isValidNodeImport(id, _options = {}) {
|
|
|
12478
12454
|
}
|
|
12479
12455
|
|
|
12480
12456
|
//#endregion
|
|
12481
|
-
//#region node_modules/.pnpm/quansync@0.2.
|
|
12457
|
+
//#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/index.mjs
|
|
12482
12458
|
const GET_IS_ASYNC = Symbol.for("quansync.getIsAsync");
|
|
12483
12459
|
var QuansyncError = class extends Error {
|
|
12484
12460
|
constructor(message = "Unexpected promise in sync context") {
|
|
@@ -12572,11 +12548,11 @@ const getIsAsync = quansync$1({
|
|
|
12572
12548
|
});
|
|
12573
12549
|
|
|
12574
12550
|
//#endregion
|
|
12575
|
-
//#region node_modules/.pnpm/quansync@0.2.
|
|
12551
|
+
//#region node_modules/.pnpm/quansync@0.2.11/node_modules/quansync/dist/macro.mjs
|
|
12576
12552
|
const quansync = quansync$1;
|
|
12577
12553
|
|
|
12578
12554
|
//#endregion
|
|
12579
|
-
//#region node_modules/.pnpm/local-pkg@1.1.
|
|
12555
|
+
//#region node_modules/.pnpm/local-pkg@1.1.2/node_modules/local-pkg/dist/index.mjs
|
|
12580
12556
|
const toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
12581
12557
|
async function findUp$1(name, { cwd: cwd$1 = process$1.cwd(), type = "file", stopAt } = {}) {
|
|
12582
12558
|
let directory = path.resolve(toPath(cwd$1) ?? "");
|
|
@@ -12709,76 +12685,12 @@ const isPackageListedSync = isPackageListed.sync;
|
|
|
12709
12685
|
//#endregion
|
|
12710
12686
|
//#region src/lager.ts
|
|
12711
12687
|
const dbg = Debug("jsse:eslint-config");
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12718
|
-
fatal: 60
|
|
12719
|
-
};
|
|
12720
|
-
function isLagerLevel(level) {
|
|
12721
|
-
return level === "trace" || level === "debug" || level === "info" || level === "warn" || level === "error" || level === "fatal";
|
|
12722
|
-
}
|
|
12723
|
-
var Lager = class {
|
|
12724
|
-
_level = "info";
|
|
12725
|
-
id = "lager";
|
|
12726
|
-
levelNo = LAGER_LEVELS[this._level];
|
|
12727
|
-
prefix = "";
|
|
12728
|
-
constructor(options) {
|
|
12729
|
-
const { level, id, prefix } = {
|
|
12730
|
-
level: "info",
|
|
12731
|
-
id: "lager",
|
|
12732
|
-
prefix: "@jsse/eslint-config",
|
|
12733
|
-
...options
|
|
12734
|
-
};
|
|
12735
|
-
this.id = id;
|
|
12736
|
-
this._level = isLagerLevel(level) ? level : "info";
|
|
12737
|
-
this.levelNo = LAGER_LEVELS[this._level];
|
|
12738
|
-
this.prefix = prefix;
|
|
12739
|
-
this.log = this.log.bind(this);
|
|
12740
|
-
this.debug = this.debug.bind(this);
|
|
12741
|
-
}
|
|
12742
|
-
get level() {
|
|
12743
|
-
return this._level;
|
|
12744
|
-
}
|
|
12745
|
-
set level(level) {
|
|
12746
|
-
this._level = level;
|
|
12747
|
-
this.levelNo = LAGER_LEVELS[level];
|
|
12748
|
-
}
|
|
12749
|
-
log(...args) {
|
|
12750
|
-
console.log(this.prefix, ...args);
|
|
12751
|
-
}
|
|
12752
|
-
trace(...args) {
|
|
12753
|
-
if (this.levelNo <= LAGER_LEVELS.trace) {
|
|
12754
|
-
console.trace(this.prefix, ...args);
|
|
12755
|
-
}
|
|
12756
|
-
}
|
|
12757
|
-
debug(...args) {
|
|
12758
|
-
if (this.levelNo <= LAGER_LEVELS.debug) {
|
|
12759
|
-
console.debug(this.prefix, ...args);
|
|
12760
|
-
}
|
|
12761
|
-
}
|
|
12762
|
-
info(...args) {
|
|
12763
|
-
if (this.levelNo <= LAGER_LEVELS.info) {
|
|
12764
|
-
console.info(this.prefix, ...args);
|
|
12765
|
-
}
|
|
12766
|
-
}
|
|
12767
|
-
warn(...args) {
|
|
12768
|
-
if (this.levelNo <= LAGER_LEVELS.warn) {
|
|
12769
|
-
console.warn(this.prefix, ...args);
|
|
12770
|
-
}
|
|
12771
|
-
}
|
|
12772
|
-
error(...args) {
|
|
12773
|
-
if (this.levelNo <= LAGER_LEVELS.error) {
|
|
12774
|
-
console.error(this.prefix, ...args);
|
|
12775
|
-
}
|
|
12776
|
-
}
|
|
12777
|
-
};
|
|
12778
|
-
|
|
12779
|
-
//#endregion
|
|
12780
|
-
//#region src/log.ts
|
|
12781
|
-
const log = new Lager();
|
|
12688
|
+
function enableDbg() {
|
|
12689
|
+
const currentNamespaces = Debug.namespaces;
|
|
12690
|
+
const current = typeof currentNamespaces === "string" ? currentNamespaces : undefined;
|
|
12691
|
+
Debug.enable([current, "jsse:eslint-config"].filter((ns) => ns !== undefined).join(","));
|
|
12692
|
+
dbg("Debugging enabled for @jsse/eslint-config");
|
|
12693
|
+
}
|
|
12782
12694
|
|
|
12783
12695
|
//#endregion
|
|
12784
12696
|
//#region src/utils.ts
|
|
@@ -12857,15 +12769,17 @@ const parserPlain = {
|
|
|
12857
12769
|
function turnOffRules(configs, off) {
|
|
12858
12770
|
if (off.length > 0) {
|
|
12859
12771
|
for (const rule of off) {
|
|
12860
|
-
|
|
12772
|
+
dbg(`turning-off: ${rule}`);
|
|
12861
12773
|
}
|
|
12862
12774
|
const currentlyActiveRules = new Set();
|
|
12863
12775
|
for (const config of configs) {
|
|
12864
|
-
for (const rule of Object.keys(config.rules ?? {}))
|
|
12776
|
+
for (const rule of Object.keys(config.rules ?? {})) {
|
|
12777
|
+
currentlyActiveRules.add(rule);
|
|
12778
|
+
}
|
|
12865
12779
|
}
|
|
12866
12780
|
for (const rule of off) {
|
|
12867
12781
|
if (!currentlyActiveRules.has(rule)) {
|
|
12868
|
-
|
|
12782
|
+
dbg(`Rule \`${rule}\` is not active in the current config, you can remove it from the off list`);
|
|
12869
12783
|
}
|
|
12870
12784
|
}
|
|
12871
12785
|
for (const config of configs) {
|
|
@@ -13177,7 +13091,7 @@ const imports = async (options) => {
|
|
|
13177
13091
|
|
|
13178
13092
|
//#endregion
|
|
13179
13093
|
//#region node_modules/.pnpm/globals@16.3.0/node_modules/globals/globals.json
|
|
13180
|
-
var require_globals$1 = __commonJS({ "node_modules/.pnpm/globals@16.3.0/node_modules/globals/globals.json"(exports, module) {
|
|
13094
|
+
var require_globals$1 = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/globals@16.3.0/node_modules/globals/globals.json": ((exports, module) => {
|
|
13181
13095
|
module.exports = {
|
|
13182
13096
|
"amd": {
|
|
13183
13097
|
"define": false,
|
|
@@ -16472,17 +16386,17 @@ var require_globals$1 = __commonJS({ "node_modules/.pnpm/globals@16.3.0/node_mod
|
|
|
16472
16386
|
"YUI_config": false
|
|
16473
16387
|
}
|
|
16474
16388
|
};
|
|
16475
|
-
} });
|
|
16389
|
+
}) });
|
|
16476
16390
|
|
|
16477
16391
|
//#endregion
|
|
16478
16392
|
//#region node_modules/.pnpm/globals@16.3.0/node_modules/globals/index.js
|
|
16479
|
-
var require_globals = __commonJS({ "node_modules/.pnpm/globals@16.3.0/node_modules/globals/index.js"(exports, module) {
|
|
16393
|
+
var require_globals = /* @__PURE__ */ __commonJS({ "node_modules/.pnpm/globals@16.3.0/node_modules/globals/index.js": ((exports, module) => {
|
|
16480
16394
|
module.exports = require_globals$1();
|
|
16481
|
-
} });
|
|
16395
|
+
}) });
|
|
16482
16396
|
|
|
16483
16397
|
//#endregion
|
|
16484
16398
|
//#region src/configs/javascript.ts
|
|
16485
|
-
var import_globals = __toESM(require_globals(), 1);
|
|
16399
|
+
var import_globals = /* @__PURE__ */ __toESM(require_globals(), 1);
|
|
16486
16400
|
const javascript = async (options) => {
|
|
16487
16401
|
const { isInEditor: isInEditor$1 = false, overrides = {}, reportUnusedDisableDirectives = true } = options ?? {};
|
|
16488
16402
|
return [{
|
|
@@ -18440,14 +18354,6 @@ const flatConfigProps = [
|
|
|
18440
18354
|
"rules",
|
|
18441
18355
|
"settings"
|
|
18442
18356
|
];
|
|
18443
|
-
const DEBUG = [
|
|
18444
|
-
"1",
|
|
18445
|
-
"true",
|
|
18446
|
-
"t",
|
|
18447
|
-
"on",
|
|
18448
|
-
"yes",
|
|
18449
|
-
"y"
|
|
18450
|
-
].includes(process$1.env.DEBUG ?? "");
|
|
18451
18357
|
function defaultOptions() {
|
|
18452
18358
|
const typescriptExists = isPackageExists("typescript");
|
|
18453
18359
|
return {
|
|
@@ -18499,27 +18405,27 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
18499
18405
|
const normalizedOptions = normalizeOptions(options);
|
|
18500
18406
|
const { command: enableCommand, componentExts, debug, gitignore: enableGitignore, isInEditor: isInEditor$1, jsonc: enableJsonc, markdown: enableMarkdown, off, overrides = {}, pnpm: enablePnpm, prettier: enablePrettier, react: enableReact, reportUnusedDisableDirectives, rootId, stylistic: stylisticOptions, tailwind: tailwindOptions, test: enableTest, tsPrefix, typeAware, typescript: typescriptOptions, yaml: enableYaml } = normalizedOptions;
|
|
18501
18407
|
if (debug || process$1.argv.includes("--debug")) {
|
|
18502
|
-
|
|
18408
|
+
enableDbg();
|
|
18503
18409
|
}
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18410
|
+
dbg("@jsse/eslint-config debug=true");
|
|
18411
|
+
dbg("@jsse/eslint-config isInEditor: %O", isInEditor$1);
|
|
18412
|
+
dbg("@jsse/eslint-config enableTypeScript: %O", typescriptOptions);
|
|
18413
|
+
dbg("@jsse/eslint-config normalizedOptions: %O", normalizedOptions);
|
|
18508
18414
|
const configs = [];
|
|
18509
18415
|
if (enableGitignore) {
|
|
18510
18416
|
if (typeof enableGitignore === "boolean") {
|
|
18511
18417
|
if (fs.existsSync(".gitignore")) {
|
|
18512
18418
|
configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r$3) => {
|
|
18513
18419
|
const res = r$3();
|
|
18514
|
-
|
|
18420
|
+
dbg("Using eslint-config-flat-gitignore res: %O", res);
|
|
18515
18421
|
return [res];
|
|
18516
18422
|
}));
|
|
18517
18423
|
}
|
|
18518
18424
|
} else {
|
|
18519
18425
|
configs.push(interopDefault(import("eslint-config-flat-gitignore")).then((r$3) => {
|
|
18520
|
-
|
|
18426
|
+
dbg("Using eslint-config-flat-gitignore: %O", r$3);
|
|
18521
18427
|
const res = r$3(enableGitignore);
|
|
18522
|
-
|
|
18428
|
+
dbg("Using eslint-config-flat-gitignore: %O", res);
|
|
18523
18429
|
return [res];
|
|
18524
18430
|
}));
|
|
18525
18431
|
}
|
|
@@ -18596,7 +18502,7 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
18596
18502
|
}), sortPackageJson(), sortTsconfig({ extendTsconfigGlobs: normalizedOptions.extendTsconfigLintGlobs }));
|
|
18597
18503
|
}
|
|
18598
18504
|
if (tailwindOptions) {
|
|
18599
|
-
console.error("Tailwind configuration is
|
|
18505
|
+
console.error("Tailwind configuration is deprecated...");
|
|
18600
18506
|
}
|
|
18601
18507
|
if (normalizedOptions.prettier) {
|
|
18602
18508
|
configs.push(prettier());
|
|
@@ -18640,17 +18546,17 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
18640
18546
|
}
|
|
18641
18547
|
}
|
|
18642
18548
|
if (normalizedOptions.preReturn) {
|
|
18643
|
-
|
|
18549
|
+
dbg("Running preReturn");
|
|
18644
18550
|
const preReturned = normalizedOptions.preReturn(combinedConfigs);
|
|
18645
18551
|
if (preReturned instanceof Promise) {
|
|
18646
18552
|
const res = await preReturned;
|
|
18647
|
-
|
|
18648
|
-
|
|
18553
|
+
dbg("preReturn finished");
|
|
18554
|
+
dbg("final config", res);
|
|
18649
18555
|
return res;
|
|
18650
18556
|
} else {
|
|
18651
18557
|
const res = preReturned;
|
|
18652
|
-
|
|
18653
|
-
|
|
18558
|
+
dbg("preReturn finished");
|
|
18559
|
+
dbg("final config", res);
|
|
18654
18560
|
return res;
|
|
18655
18561
|
}
|
|
18656
18562
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
|
|
3
|
+
//#region src/const.ts
|
|
4
|
+
const DEBUG = [
|
|
5
|
+
"1",
|
|
6
|
+
"true",
|
|
7
|
+
"t",
|
|
8
|
+
"on",
|
|
9
|
+
"yes",
|
|
10
|
+
"y"
|
|
11
|
+
].includes(process.env.DEBUG ?? "");
|
|
12
|
+
const SLOW_RULES = [
|
|
13
|
+
"@typescript-eslint/no-misused-promises",
|
|
14
|
+
"@typescript-eslint/no-redeclare",
|
|
15
|
+
"@typescript-eslint/no-unsafe-assignment",
|
|
16
|
+
"@typescript-eslint/no-unsafe-call",
|
|
17
|
+
"@typescript-eslint/no-unsafe-member-access",
|
|
18
|
+
"@typescript-eslint/no-unsafe-return",
|
|
19
|
+
"import/no-duplicates",
|
|
20
|
+
"jsdoc/check-access",
|
|
21
|
+
"jsdoc/check-alignment",
|
|
22
|
+
"jsdoc/check-property-names",
|
|
23
|
+
"jsdoc/check-types",
|
|
24
|
+
"jsdoc/empty-tags",
|
|
25
|
+
"jsdoc/multiline-blocks",
|
|
26
|
+
"jsdoc/no-multi-asterisks",
|
|
27
|
+
"jsdoc/require-property-description",
|
|
28
|
+
"jsdoc/require-property-name",
|
|
29
|
+
"jsdoc/require-property",
|
|
30
|
+
"unicorn/expiring-todo-comments",
|
|
31
|
+
"unicorn/no-unnecessary-polyfills"
|
|
32
|
+
];
|
|
33
|
+
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/generated/version.ts
|
|
36
|
+
const VERSION = "0.4.11";
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
export { DEBUG, SLOW_RULES, VERSION };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.11",
|
|
5
5
|
"description": "@jsse/eslint-config ~ WYSIWYG",
|
|
6
6
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -61,63 +61,64 @@
|
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
64
|
-
"@eslint/compat": "^1.3.
|
|
65
|
-
"@eslint/js": "~9.
|
|
64
|
+
"@eslint/compat": "^1.3.2",
|
|
65
|
+
"@eslint/js": "~9.33.0",
|
|
66
66
|
"@eslint/markdown": "^7.1.0",
|
|
67
|
-
"@stylistic/eslint-plugin": "5.2.
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
69
|
-
"@typescript-eslint/parser": "^8.
|
|
67
|
+
"@stylistic/eslint-plugin": "5.2.3",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.40.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.40.0",
|
|
70
70
|
"@vitest/eslint-plugin": "^1.3.4",
|
|
71
71
|
"debug": "^4.4.1",
|
|
72
72
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
73
73
|
"eslint-merge-processors": "^2.0.0",
|
|
74
74
|
"eslint-plugin-antfu": "^3.1.1",
|
|
75
75
|
"eslint-plugin-command": "^3.3.1",
|
|
76
|
-
"eslint-plugin-de-morgan": "^1.3.
|
|
76
|
+
"eslint-plugin-de-morgan": "^1.3.1",
|
|
77
77
|
"eslint-plugin-import-lite": "^0.3.0",
|
|
78
|
-
"eslint-plugin-jsdoc": "^
|
|
78
|
+
"eslint-plugin-jsdoc": "^54.1.1",
|
|
79
79
|
"eslint-plugin-jsonc": "^2.20.1",
|
|
80
80
|
"eslint-plugin-n": "^17.21.3",
|
|
81
81
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
82
82
|
"eslint-plugin-perfectionist": "^4.15.0",
|
|
83
|
-
"eslint-plugin-pnpm": "^1.1.
|
|
83
|
+
"eslint-plugin-pnpm": "^1.1.1",
|
|
84
84
|
"eslint-plugin-react": "~7.37.5",
|
|
85
85
|
"eslint-plugin-react-hooks": "~5.2.0",
|
|
86
86
|
"eslint-plugin-react-refresh": "~0.4.20",
|
|
87
87
|
"eslint-plugin-toml": "^0.12.0",
|
|
88
88
|
"eslint-plugin-tsdoc": "^0.4.0",
|
|
89
89
|
"eslint-plugin-unicorn": "^60.0.0",
|
|
90
|
-
"eslint-plugin-unused-imports": "^4.
|
|
90
|
+
"eslint-plugin-unused-imports": "^4.2.0",
|
|
91
91
|
"eslint-plugin-yml": "^1.18.0",
|
|
92
92
|
"jsonc-eslint-parser": "^2.4.0",
|
|
93
93
|
"toml-eslint-parser": "^0.10.0",
|
|
94
|
-
"typescript-eslint": "^8.
|
|
94
|
+
"typescript-eslint": "^8.40.0",
|
|
95
95
|
"yaml-eslint-parser": "^1.3.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@biomejs/biome": "2.
|
|
99
|
-
"@changesets/cli": "^2.29.
|
|
98
|
+
"@biomejs/biome": "2.2.0",
|
|
99
|
+
"@changesets/cli": "^2.29.6",
|
|
100
100
|
"@jsse/prettier-config": "^1.0.0",
|
|
101
101
|
"@jsse/tsconfig": "^0.3.0",
|
|
102
102
|
"@types/debug": "^4.1.12",
|
|
103
103
|
"@types/fs-extra": "^11.0.4",
|
|
104
|
-
"@types/node": "^
|
|
104
|
+
"@types/node": "^24.3.0",
|
|
105
105
|
"cac": "^6.7.14",
|
|
106
|
-
"eslint": "^9.
|
|
106
|
+
"eslint": "^9.33.0",
|
|
107
107
|
"eslint-flat-config-utils": "^2.1.1",
|
|
108
108
|
"eslint-typegen": "^2.3.0",
|
|
109
109
|
"execa": "~9.6.0",
|
|
110
110
|
"fast-glob": "^3.3.3",
|
|
111
|
-
"fs-extra": "^11.3.
|
|
111
|
+
"fs-extra": "^11.3.1",
|
|
112
112
|
"globals": "^16.3.0",
|
|
113
|
-
"local-pkg": "^1.1.
|
|
113
|
+
"local-pkg": "^1.1.2",
|
|
114
|
+
"oxlint": "^1.12.0",
|
|
114
115
|
"picocolors": "^1.1.1",
|
|
115
116
|
"prettier": "^3.6.2",
|
|
116
117
|
"react": "~19.1.1",
|
|
117
118
|
"rimraf": "^6.0.1",
|
|
118
|
-
"tsdown": "^0.
|
|
119
|
-
"tsx": "^4.20.
|
|
120
|
-
"typescript": "5.8.3",
|
|
119
|
+
"tsdown": "^0.14.1",
|
|
120
|
+
"tsx": "^4.20.4",
|
|
121
|
+
"typescript": "~5.8.3",
|
|
121
122
|
"vitest": "^3.2.4"
|
|
122
123
|
},
|
|
123
124
|
"prettier": "@jsse/prettier-config",
|
|
@@ -130,6 +131,8 @@
|
|
|
130
131
|
"fmt": "prettier -w .",
|
|
131
132
|
"fmtc": "prettier --check .",
|
|
132
133
|
"lint": "pnpm run build-fast && eslint .",
|
|
134
|
+
"lint:self": "pnpm run build-fast && eslint --report-unused-disable-directives .",
|
|
135
|
+
"oxlint": "oxlint",
|
|
133
136
|
"change": "changeset",
|
|
134
137
|
"release": "pnpm run ci:version && pnpm run ci:publish",
|
|
135
138
|
"stub": "tsdown src/index.ts --format esm",
|
package/dist/esm/cli.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|