@jsse/eslint-config 0.2.33 → 0.3.1

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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @jsse/eslint-config
2
2
 
3
+ ## 0.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - update deps
8
+
9
+ ## 0.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - esmodule only now
14
+
15
+ ### Patch Changes
16
+
17
+ - 083ab04: updated smaller dependencies
18
+ - Updated eslint and ts-eslint etc...
19
+
3
20
  ## 0.2.33
4
21
 
5
22
  ### Patch Changes
package/dist/cli.js CHANGED
@@ -588,7 +588,7 @@ var CAC = class extends EventEmitter {
588
588
  var cac = (name = "") => new CAC(name);
589
589
 
590
590
  // src/generated/version.ts
591
- var VERSION = "0.2.33";
591
+ var VERSION = "0.3.1";
592
592
 
593
593
  // src/cli.ts
594
594
  var cli = cac("jsselint");
@@ -13,7 +13,7 @@ function unicornOff() {
13
13
  "unicorn/prevent-abbreviations": "off", // Super insanely annoying rule
14
14
  };
15
15
  }
16
- function unicornRecommended() {
16
+ function unicornRecommended(pluginUnicorn) {
17
17
  // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access
18
18
  const rules = pluginUnicorn.configs.recommended.rules;
19
19
  if (rules === undefined) {
@@ -30,7 +30,7 @@ export const unicorn = async () => {
30
30
  unicorn: pluginUnicorn,
31
31
  },
32
32
  rules: {
33
- ...unicornRecommended(),
33
+ ...unicornRecommended(pluginUnicorn),
34
34
  ...unicornOff(),
35
35
  "unicorn/better-regex": "error",
36
36
  "unicorn/consistent-empty-array-spread": "error",
@@ -60,7 +60,6 @@ export const unicorn = async () => {
60
60
  "unicorn/no-static-only-class": "error",
61
61
  "unicorn/no-unnecessary-await": "error",
62
62
  // Keep regex literals safe!
63
- "unicorn/no-unsafe-regex": "error",
64
63
  "unicorn/no-zero-fractions": "error",
65
64
  // Lowercase number formatting for octal, hex, binary (0x1ERROR instead of 0X1'error')
66
65
  "unicorn/number-literal-case": "error",
@@ -264,6 +264,8 @@ export const fixableRules = {
264
264
  unicorn: [
265
265
  "unicorn/better-regex",
266
266
  "unicorn/catch-error-name",
267
+ "unicorn/consistent-assert",
268
+ "unicorn/consistent-date-clone",
267
269
  "unicorn/consistent-destructuring",
268
270
  "unicorn/consistent-empty-array-spread",
269
271
  "unicorn/consistent-existence-index-check",
@@ -279,9 +281,10 @@ export const fixableRules = {
279
281
  "unicorn/no-console-spaces",
280
282
  "unicorn/no-for-loop",
281
283
  "unicorn/no-hex-escape",
282
- "unicorn/no-instanceof-array",
284
+ "unicorn/no-instanceof-builtins",
283
285
  "unicorn/no-length-as-slice-end",
284
286
  "unicorn/no-lonely-if",
287
+ "unicorn/no-named-default",
285
288
  "unicorn/no-negated-condition",
286
289
  "unicorn/no-nested-ternary",
287
290
  "unicorn/no-new-array",
@@ -1 +1 @@
1
- export declare const VERSION = "0.2.33";
1
+ export declare const VERSION = "0.3.1";
@@ -1 +1 @@
1
- export const VERSION = "0.2.33";
1
+ export const VERSION = "0.3.1";
@@ -8,6 +8,16 @@ export { default as pluginN } from "eslint-plugin-n";
8
8
  export { default as pluginPerfectionist } from "eslint-plugin-perfectionist";
9
9
  export { default as pluginUnicorn } from "eslint-plugin-unicorn";
10
10
  export { default as pluginUnusedImports } from "eslint-plugin-unused-imports";
11
+ export declare function importPluginUnicorn(): Promise<{
12
+ pluginUnicorn: import("eslint").ESLint.Plugin & {
13
+ configs: {
14
+ recommended: import("eslint").Linter.FlatConfig;
15
+ all: import("eslint").Linter.FlatConfig;
16
+ "flat/all": import("eslint").Linter.FlatConfig;
17
+ "flat/recommended": import("eslint").Linter.FlatConfig;
18
+ };
19
+ };
20
+ }>;
11
21
  export declare function importPluginReact(): Promise<{
12
22
  pluginReact: {
13
23
  deprecatedRules: Partial<{
@@ -282,7 +292,7 @@ export declare function importPluginReact(): Promise<{
282
292
  };
283
293
  }>;
284
294
  export declare function importPluginReactHooks(): Promise<{
285
- pluginReactHooks: any;
295
+ pluginReactHooks: typeof import("eslint-plugin-react-hooks");
286
296
  }>;
287
297
  export declare function importPluginReactRefresh(): Promise<{
288
298
  pluginReactRefresh: {
@@ -579,7 +589,7 @@ export declare function importReactPlugins(): Promise<{
579
589
  flat: Record<string, import("eslint-plugin-react").ReactFlatConfig>;
580
590
  };
581
591
  };
582
- pluginReactHooks: any;
592
+ pluginReactHooks: typeof import("eslint-plugin-react-hooks");
583
593
  pluginReactRefresh: {
584
594
  rules: Record<string, any>;
585
595
  configs: {
@@ -1551,7 +1561,10 @@ export declare function importPluginTsdoc(): Promise<{
1551
1561
  };
1552
1562
  }>;
1553
1563
  export declare function importPluginStylistic(): Promise<{
1554
- pluginStylistic: typeof import("@stylistic/eslint-plugin");
1564
+ pluginStylistic: {
1565
+ rules: import("@stylistic/eslint-plugin").Rules;
1566
+ configs: import("eslint").ESLint.Plugin["configs"] & import("@stylistic/eslint-plugin").Configs;
1567
+ };
1555
1568
  }>;
1556
1569
  export declare function importPluginTailwind(): Promise<{
1557
1570
  pluginTailwind: any;
@@ -14,6 +14,12 @@ export { default as pluginN } from "eslint-plugin-n";
14
14
  export { default as pluginPerfectionist } from "eslint-plugin-perfectionist";
15
15
  export { default as pluginUnicorn } from "eslint-plugin-unicorn";
16
16
  export { default as pluginUnusedImports } from "eslint-plugin-unused-imports";
17
+ export async function importPluginUnicorn() {
18
+ const pluginUnicorn = await interopDefault(import("eslint-plugin-unicorn"));
19
+ return {
20
+ pluginUnicorn,
21
+ };
22
+ }
17
23
  export async function importPluginReact() {
18
24
  const pluginReact = await interopDefault(import("eslint-plugin-react"));
19
25
  return {
@@ -21,9 +27,7 @@ export async function importPluginReact() {
21
27
  };
22
28
  }
23
29
  export async function importPluginReactHooks() {
24
- const pluginReactHooks = await interopDefault(
25
- // @ts-expect-error - bad types
26
- import("eslint-plugin-react-hooks"));
30
+ const pluginReactHooks = await interopDefault(import("eslint-plugin-react-hooks"));
27
31
  return {
28
32
  pluginReactHooks,
29
33
  };
@@ -37,7 +41,6 @@ export async function importPluginReactRefresh() {
37
41
  export async function importReactPlugins() {
38
42
  const [pluginReact, pluginReactHooks, pluginReactRefresh] = await Promise.all([
39
43
  interopDefault(import("eslint-plugin-react")),
40
- // @ts-expect-error - bad types
41
44
  interopDefault(import("eslint-plugin-react-hooks")),
42
45
  interopDefault(import("eslint-plugin-react-refresh")),
43
46
  ]);
@@ -3,6 +3,7 @@ import type { Linter } from "eslint";
3
3
  import type { FlatGitignoreOptions } from "eslint-config-flat-gitignore";
4
4
  import type { RuleOptionsUnion as RuleOptions } from "./generated/rule-options.js";
5
5
  export type Awaitable<T> = T | Promise<T>;
6
+ export type UnPromise<T> = T extends Promise<infer U> ? U : T;
6
7
  export type Rules = RuleOptions;
7
8
  export type LanguageOptions = Linter.Config["languageOptions"];
8
9
  export type TypedFlatConfigItem = Omit<Linter.Config<Linter.RulesRecord & Rules>, "plugins"> & {