@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/dist/esm/lager.js
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-console */
|
|
2
|
-
/* eslint-disable perfectionist/sort-objects */
|
|
3
|
-
import Debug from "debug";
|
|
4
|
-
export const dbg = Debug("jsse:eslint-config");
|
|
5
|
-
const LAGER_LEVELS = {
|
|
6
|
-
trace: 10,
|
|
7
|
-
debug: 20,
|
|
8
|
-
info: 30,
|
|
9
|
-
warn: 40,
|
|
10
|
-
error: 50,
|
|
11
|
-
fatal: 60,
|
|
12
|
-
};
|
|
13
|
-
function isLagerLevel(level) {
|
|
14
|
-
return (level === "trace" ||
|
|
15
|
-
level === "debug" ||
|
|
16
|
-
level === "info" ||
|
|
17
|
-
level === "warn" ||
|
|
18
|
-
level === "error" ||
|
|
19
|
-
level === "fatal");
|
|
20
|
-
}
|
|
21
|
-
export class Lager {
|
|
22
|
-
_level = "info";
|
|
23
|
-
id = "lager";
|
|
24
|
-
levelNo = LAGER_LEVELS[this._level];
|
|
25
|
-
prefix = "";
|
|
26
|
-
constructor(options) {
|
|
27
|
-
const { level, id, prefix } = {
|
|
28
|
-
level: "info",
|
|
29
|
-
id: "lager",
|
|
30
|
-
prefix: "@jsse/eslint-config",
|
|
31
|
-
...options,
|
|
32
|
-
};
|
|
33
|
-
this.id = id;
|
|
34
|
-
this._level = isLagerLevel(level) ? level : "info";
|
|
35
|
-
this.levelNo = LAGER_LEVELS[this._level];
|
|
36
|
-
this.prefix = prefix;
|
|
37
|
-
this.log = this.log.bind(this);
|
|
38
|
-
this.debug = this.debug.bind(this);
|
|
39
|
-
}
|
|
40
|
-
get level() {
|
|
41
|
-
return this._level;
|
|
42
|
-
}
|
|
43
|
-
set level(level) {
|
|
44
|
-
this._level = level;
|
|
45
|
-
this.levelNo = LAGER_LEVELS[level];
|
|
46
|
-
}
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
log(...args) {
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
50
|
-
console.log(this.prefix, ...args);
|
|
51
|
-
}
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
53
|
-
trace(...args) {
|
|
54
|
-
if (this.levelNo <= LAGER_LEVELS.trace) {
|
|
55
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
56
|
-
console.trace(this.prefix, ...args);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
60
|
-
debug(...args) {
|
|
61
|
-
if (this.levelNo <= LAGER_LEVELS.debug) {
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
63
|
-
console.debug(this.prefix, ...args);
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
67
|
-
info(...args) {
|
|
68
|
-
if (this.levelNo <= LAGER_LEVELS.info) {
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
70
|
-
console.info(this.prefix, ...args);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
74
|
-
warn(...args) {
|
|
75
|
-
if (this.levelNo <= LAGER_LEVELS.warn) {
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
77
|
-
console.warn(this.prefix, ...args);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
81
|
-
error(...args) {
|
|
82
|
-
if (this.levelNo <= LAGER_LEVELS.error) {
|
|
83
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
|
84
|
-
console.error(this.prefix, ...args);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
package/dist/esm/log.d.ts
DELETED
package/dist/esm/log.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as pluginReactRefresh from "eslint-plugin-react-refresh";
|
|
2
|
-
export { pluginAntfu, pluginDeMorgan, pluginEslintComments, pluginImportLite as pluginImport, pluginN, pluginPerfectionist, pluginPnpm, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
|
|
3
|
-
/**
|
|
4
|
-
* The main `plugins.ts` does not export these plugins, but
|
|
5
|
-
* exports functions that dynamically import them, so
|
|
6
|
-
* we provide them here for testing etc
|
|
7
|
-
*/
|
|
8
|
-
export { default as pluginMarkdown } from "@eslint/markdown";
|
|
9
|
-
export { default as pluginStylistic } from "@stylistic/eslint-plugin";
|
|
10
|
-
export { default as pluginTypescript } from "@typescript-eslint/eslint-plugin";
|
|
11
|
-
export * as parserTs from "@typescript-eslint/parser";
|
|
12
|
-
export { default as pluginVitest } from "@vitest/eslint-plugin";
|
|
13
|
-
export { default as pluginJsdoc } from "eslint-plugin-jsdoc";
|
|
14
|
-
export * as pluginJsonc from "eslint-plugin-jsonc";
|
|
15
|
-
export { default as pluginNoOnlyTests } from "eslint-plugin-no-only-tests";
|
|
16
|
-
export { default as pluginReact } from "eslint-plugin-react";
|
|
17
|
-
export { default as pluginReactHooks } from "eslint-plugin-react-hooks";
|
|
18
|
-
export { default as pluginTsdoc } from "eslint-plugin-tsdoc";
|
|
19
|
-
export { default as parserJsonc } from "jsonc-eslint-parser";
|
|
20
|
-
export { pluginReactRefresh };
|
|
21
|
-
type PluginIndexEntry = {
|
|
22
|
-
plugin: any;
|
|
23
|
-
prefix: string;
|
|
24
|
-
};
|
|
25
|
-
type PluginsIndex = Record<string, PluginIndexEntry>;
|
|
26
|
-
export declare const plugindex: PluginsIndex;
|
package/dist/esm/plugins-all.js
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/* eslint-disable unicorn/prefer-export-from */
|
|
2
|
-
import pluginMarkdown from "@eslint/markdown";
|
|
3
|
-
// @ts-nocheck
|
|
4
|
-
import pluginStylistic from "@stylistic/eslint-plugin";
|
|
5
|
-
import pluginTypescript from "@typescript-eslint/eslint-plugin";
|
|
6
|
-
import pluginVitest from "@vitest/eslint-plugin";
|
|
7
|
-
import pluginJsdoc from "eslint-plugin-jsdoc";
|
|
8
|
-
import * as pluginJsonc from "eslint-plugin-jsonc";
|
|
9
|
-
// @ts-expect-error - no types
|
|
10
|
-
import pluginNoOnlyTests from "eslint-plugin-no-only-tests";
|
|
11
|
-
import pluginReact from "eslint-plugin-react";
|
|
12
|
-
import pluginReactHooks from "eslint-plugin-react-hooks";
|
|
13
|
-
import * as pluginReactRefresh from "eslint-plugin-react-refresh";
|
|
14
|
-
import pluginTsdoc from "eslint-plugin-tsdoc";
|
|
15
|
-
import { pluginAntfu, pluginDeMorgan, pluginEslintComments, pluginImportLite, pluginN, pluginPerfectionist, pluginPnpm, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
|
|
16
|
-
export { pluginAntfu, pluginDeMorgan, pluginEslintComments, pluginImportLite as pluginImport, pluginN, pluginPerfectionist, pluginPnpm, pluginUnicorn, pluginUnusedImports, } from "./plugins.js";
|
|
17
|
-
/**
|
|
18
|
-
* The main `plugins.ts` does not export these plugins, but
|
|
19
|
-
* exports functions that dynamically import them, so
|
|
20
|
-
* we provide them here for testing etc
|
|
21
|
-
*/
|
|
22
|
-
export { default as pluginMarkdown } from "@eslint/markdown";
|
|
23
|
-
export { default as pluginStylistic } from "@stylistic/eslint-plugin";
|
|
24
|
-
export { default as pluginTypescript } from "@typescript-eslint/eslint-plugin";
|
|
25
|
-
export * as parserTs from "@typescript-eslint/parser";
|
|
26
|
-
export { default as pluginVitest } from "@vitest/eslint-plugin";
|
|
27
|
-
export { default as pluginJsdoc } from "eslint-plugin-jsdoc";
|
|
28
|
-
export * as pluginJsonc from "eslint-plugin-jsonc";
|
|
29
|
-
// @ts-expect-error - no types
|
|
30
|
-
export { default as pluginNoOnlyTests } from "eslint-plugin-no-only-tests";
|
|
31
|
-
export { default as pluginReact } from "eslint-plugin-react";
|
|
32
|
-
export { default as pluginReactHooks } from "eslint-plugin-react-hooks";
|
|
33
|
-
export { default as pluginTsdoc } from "eslint-plugin-tsdoc";
|
|
34
|
-
export { default as parserJsonc } from "jsonc-eslint-parser";
|
|
35
|
-
export { pluginReactRefresh };
|
|
36
|
-
export const plugindex = {
|
|
37
|
-
antfu: {
|
|
38
|
-
plugin: pluginAntfu,
|
|
39
|
-
prefix: "antfu/",
|
|
40
|
-
},
|
|
41
|
-
deMorgan: {
|
|
42
|
-
plugin: pluginDeMorgan,
|
|
43
|
-
prefix: "de-morgan/",
|
|
44
|
-
},
|
|
45
|
-
eslintComments: {
|
|
46
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
47
|
-
plugin: pluginEslintComments,
|
|
48
|
-
prefix: "eslint-comments/",
|
|
49
|
-
},
|
|
50
|
-
import: {
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
52
|
-
plugin: pluginImportLite,
|
|
53
|
-
prefix: "import/",
|
|
54
|
-
},
|
|
55
|
-
jsdoc: {
|
|
56
|
-
plugin: pluginJsdoc,
|
|
57
|
-
prefix: "jsdoc/",
|
|
58
|
-
},
|
|
59
|
-
jsonc: {
|
|
60
|
-
plugin: pluginJsonc,
|
|
61
|
-
prefix: "jsonc/",
|
|
62
|
-
},
|
|
63
|
-
markdown: {
|
|
64
|
-
plugin: pluginMarkdown,
|
|
65
|
-
prefix: "markdown/",
|
|
66
|
-
},
|
|
67
|
-
n: {
|
|
68
|
-
plugin: pluginN,
|
|
69
|
-
prefix: "n/",
|
|
70
|
-
},
|
|
71
|
-
noOnlyTests: {
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
73
|
-
plugin: pluginNoOnlyTests,
|
|
74
|
-
prefix: "no-only-tests/",
|
|
75
|
-
},
|
|
76
|
-
perfectionist: {
|
|
77
|
-
plugin: pluginPerfectionist,
|
|
78
|
-
prefix: "perfectionist/",
|
|
79
|
-
},
|
|
80
|
-
pnpm: {
|
|
81
|
-
plugin: pluginPnpm,
|
|
82
|
-
prefix: "pnpm/",
|
|
83
|
-
},
|
|
84
|
-
react: {
|
|
85
|
-
plugin: pluginReact,
|
|
86
|
-
prefix: "react/",
|
|
87
|
-
},
|
|
88
|
-
reactHooks: {
|
|
89
|
-
plugin: pluginReactHooks,
|
|
90
|
-
prefix: "react-hooks/",
|
|
91
|
-
},
|
|
92
|
-
reactRefresh: {
|
|
93
|
-
plugin: pluginReactRefresh,
|
|
94
|
-
prefix: "react-refresh/",
|
|
95
|
-
},
|
|
96
|
-
stylistic: {
|
|
97
|
-
plugin: pluginStylistic,
|
|
98
|
-
prefix: "@stylistic/",
|
|
99
|
-
},
|
|
100
|
-
tsdoc: {
|
|
101
|
-
plugin: pluginTsdoc,
|
|
102
|
-
prefix: "tsdoc/",
|
|
103
|
-
},
|
|
104
|
-
typescript: {
|
|
105
|
-
plugin: pluginTypescript,
|
|
106
|
-
prefix: "@typescript-eslint/",
|
|
107
|
-
},
|
|
108
|
-
unicorn: {
|
|
109
|
-
plugin: pluginUnicorn,
|
|
110
|
-
prefix: "unicorn/",
|
|
111
|
-
},
|
|
112
|
-
unusedImports: {
|
|
113
|
-
plugin: pluginUnusedImports,
|
|
114
|
-
prefix: "unused-imports/",
|
|
115
|
-
},
|
|
116
|
-
vitest: {
|
|
117
|
-
plugin: pluginVitest,
|
|
118
|
-
prefix: "vitest/",
|
|
119
|
-
},
|
|
120
|
-
};
|