@jsse/eslint-config 0.2.24 → 0.2.26

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.
@@ -146,6 +146,12 @@ export type OptionsConfig = {
146
146
  * Array of rules to turn off.
147
147
  */
148
148
  off?: string[];
149
+ /**
150
+ * Enable `eslint-plugin-command`
151
+ *
152
+ * @default true
153
+ */
154
+ command?: boolean;
149
155
  /**
150
156
  * Enable fast mode.
151
157
  *
package/dist/esm/utils.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import process from "node:process";
2
- import { log } from "./lager.js";
2
+ import { log } from "./log.js";
3
3
  /**
4
4
  * Combine array and non-array configs into a single array.
5
5
  */
package/dist/index.cjs CHANGED
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
30
30
  ));
31
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
32
 
33
- // node_modules/.pnpm/globals@15.11.0/node_modules/globals/globals.json
33
+ // node_modules/.pnpm/globals@15.12.0/node_modules/globals/globals.json
34
34
  var require_globals = __commonJS({
35
- "node_modules/.pnpm/globals@15.11.0/node_modules/globals/globals.json"(exports2, module2) {
35
+ "node_modules/.pnpm/globals@15.12.0/node_modules/globals/globals.json"(exports2, module2) {
36
36
  module2.exports = {
37
37
  amd: {
38
38
  define: false,
@@ -204,6 +204,7 @@ var require_globals = __commonJS({
204
204
  CSSMatrixComponent: false,
205
205
  CSSMediaRule: false,
206
206
  CSSNamespaceRule: false,
207
+ CSSNestedDeclarations: false,
207
208
  CSSNumericArray: false,
208
209
  CSSNumericValue: false,
209
210
  CSSPageDescriptors: false,
@@ -504,7 +505,6 @@ var require_globals = __commonJS({
504
505
  IntersectionObserver: false,
505
506
  IntersectionObserverEntry: false,
506
507
  isSecureContext: false,
507
- Iterator: false,
508
508
  Keyboard: false,
509
509
  KeyboardEvent: false,
510
510
  KeyboardLayoutMap: false,
@@ -1218,6 +1218,7 @@ var require_globals = __commonJS({
1218
1218
  Intl: false,
1219
1219
  isFinite: false,
1220
1220
  isNaN: false,
1221
+ Iterator: false,
1221
1222
  JSON: false,
1222
1223
  Map: false,
1223
1224
  Math: false,
@@ -1929,6 +1930,7 @@ var require_globals = __commonJS({
1929
1930
  Intl: false,
1930
1931
  isFinite: false,
1931
1932
  isNaN: false,
1933
+ Iterator: false,
1932
1934
  JSON: false,
1933
1935
  Map: false,
1934
1936
  Math: false,
@@ -2228,6 +2230,7 @@ var require_globals = __commonJS({
2228
2230
  clearImmediate: false,
2229
2231
  clearInterval: false,
2230
2232
  clearTimeout: false,
2233
+ CloseEvent: false,
2231
2234
  CompressionStream: false,
2232
2235
  console: false,
2233
2236
  CountQueuingStrategy: false,
@@ -2245,7 +2248,6 @@ var require_globals = __commonJS({
2245
2248
  FormData: false,
2246
2249
  global: false,
2247
2250
  Headers: false,
2248
- Iterator: false,
2249
2251
  MessageChannel: false,
2250
2252
  MessageEvent: false,
2251
2253
  MessagePort: false,
@@ -2302,6 +2304,7 @@ var require_globals = __commonJS({
2302
2304
  clearImmediate: false,
2303
2305
  clearInterval: false,
2304
2306
  clearTimeout: false,
2307
+ CloseEvent: false,
2305
2308
  CompressionStream: false,
2306
2309
  console: false,
2307
2310
  CountQueuingStrategy: false,
@@ -2318,7 +2321,6 @@ var require_globals = __commonJS({
2318
2321
  FormData: false,
2319
2322
  global: false,
2320
2323
  Headers: false,
2321
- Iterator: false,
2322
2324
  MessageChannel: false,
2323
2325
  MessageEvent: false,
2324
2326
  MessagePort: false,
@@ -2595,6 +2597,7 @@ var require_globals = __commonJS({
2595
2597
  ByteLengthQueuingStrategy: false,
2596
2598
  clearInterval: false,
2597
2599
  clearTimeout: false,
2600
+ CloseEvent: false,
2598
2601
  CompressionStream: false,
2599
2602
  console: false,
2600
2603
  CountQueuingStrategy: false,
@@ -2610,7 +2613,6 @@ var require_globals = __commonJS({
2610
2613
  File: false,
2611
2614
  FormData: false,
2612
2615
  Headers: false,
2613
- Iterator: false,
2614
2616
  MessageChannel: false,
2615
2617
  MessageEvent: false,
2616
2618
  MessagePort: false,
@@ -2822,7 +2824,6 @@ var require_globals = __commonJS({
2822
2824
  importScripts: false,
2823
2825
  indexedDB: false,
2824
2826
  isSecureContext: false,
2825
- Iterator: false,
2826
2827
  location: false,
2827
2828
  Lock: false,
2828
2829
  LockManager: false,
@@ -2882,6 +2883,7 @@ var require_globals = __commonJS({
2882
2883
  Request: false,
2883
2884
  requestAnimationFrame: false,
2884
2885
  Response: false,
2886
+ RTCDataChannel: false,
2885
2887
  RTCEncodedAudioFrame: false,
2886
2888
  RTCEncodedVideoFrame: false,
2887
2889
  scheduler: false,
@@ -3006,9 +3008,9 @@ var require_globals = __commonJS({
3006
3008
  }
3007
3009
  });
3008
3010
 
3009
- // node_modules/.pnpm/globals@15.11.0/node_modules/globals/index.js
3011
+ // node_modules/.pnpm/globals@15.12.0/node_modules/globals/index.js
3010
3012
  var require_globals2 = __commonJS({
3011
- "node_modules/.pnpm/globals@15.11.0/node_modules/globals/index.js"(exports2, module2) {
3013
+ "node_modules/.pnpm/globals@15.12.0/node_modules/globals/index.js"(exports2, module2) {
3012
3014
  "use strict";
3013
3015
  module2.exports = require_globals();
3014
3016
  }
@@ -3017,38 +3019,15 @@ var require_globals2 = __commonJS({
3017
3019
  // src/index.ts
3018
3020
  var src_exports = {};
3019
3021
  __export(src_exports, {
3020
- GLOB_ALL_SRC: () => GLOB_ALL_SRC,
3021
- GLOB_CSS: () => GLOB_CSS,
3022
- GLOB_EXCLUDE: () => GLOB_EXCLUDE,
3023
- GLOB_GRAPHQL: () => GLOB_GRAPHQL,
3024
- GLOB_HTML: () => GLOB_HTML,
3025
- GLOB_JS: () => GLOB_JS,
3026
- GLOB_JSON: () => GLOB_JSON,
3027
- GLOB_JSON5: () => GLOB_JSON5,
3028
- GLOB_JSONC: () => GLOB_JSONC,
3029
- GLOB_JSX: () => GLOB_JSX,
3030
- GLOB_JS_SRC_EXT: () => GLOB_JS_SRC_EXT,
3031
- GLOB_LESS: () => GLOB_LESS,
3032
- GLOB_MARKDOWN: () => GLOB_MARKDOWN,
3033
- GLOB_MARKDOWN_CODE: () => GLOB_MARKDOWN_CODE,
3034
- GLOB_MARKDOWN_IN_MARKDOWN: () => GLOB_MARKDOWN_IN_MARKDOWN,
3035
- GLOB_SCSS: () => GLOB_SCSS,
3036
- GLOB_SRC: () => GLOB_SRC,
3037
- GLOB_SRC_EXT: () => GLOB_SRC_EXT,
3038
- GLOB_STYLE: () => GLOB_STYLE,
3039
- GLOB_TESTS: () => GLOB_TESTS,
3040
- GLOB_TOML: () => GLOB_TOML,
3041
- GLOB_TS: () => GLOB_TS,
3042
- GLOB_TSCONFIG: () => GLOB_TSCONFIG,
3043
- GLOB_TSX: () => GLOB_TSX,
3044
- GLOB_YAML: () => GLOB_YAML,
3045
3022
  SLOW_RULES: () => SLOW_RULES,
3023
+ VERSION: () => VERSION,
3046
3024
  changeRuleEntrySeverity: () => changeRuleEntrySeverity,
3047
3025
  combine: () => combine,
3048
3026
  combineAsync: () => combineAsync,
3049
3027
  default: () => jsse,
3050
3028
  defineConfig: () => defineConfig,
3051
3029
  error2warn: () => error2warn,
3030
+ globs: () => globs_exports,
3052
3031
  importJsoncLibs: () => importJsoncLibs,
3053
3032
  importParserJsonc: () => importParserJsonc,
3054
3033
  importPluginJsdoc: () => importPluginJsdoc,
@@ -3088,10 +3067,24 @@ module.exports = __toCommonJS(src_exports);
3088
3067
  // src/const.ts
3089
3068
  var SLOW_RULES = [
3090
3069
  "@typescript-eslint/no-misused-promises",
3070
+ "@typescript-eslint/no-redeclare",
3091
3071
  "@typescript-eslint/no-unsafe-assignment",
3092
3072
  "@typescript-eslint/no-unsafe-call",
3093
3073
  "@typescript-eslint/no-unsafe-member-access",
3094
3074
  "@typescript-eslint/no-unsafe-return",
3075
+ "import/no-duplicates",
3076
+ "import/no-self-import",
3077
+ "jsdoc/check-access",
3078
+ "jsdoc/check-alignment",
3079
+ "jsdoc/check-property-names",
3080
+ "jsdoc/check-types",
3081
+ "jsdoc/empty-tags",
3082
+ "jsdoc/multiline-blocks",
3083
+ "jsdoc/no-multi-asterisks",
3084
+ "jsdoc/require-property-description",
3085
+ "jsdoc/require-property-name",
3086
+ "jsdoc/require-property",
3087
+ "unicorn/expiring-todo-comments",
3095
3088
  "unicorn/no-unnecessary-polyfills"
3096
3089
  ];
3097
3090
 
@@ -9959,7 +9952,7 @@ function resolvePackage(name, options = {}) {
9959
9952
  }
9960
9953
  }
9961
9954
 
9962
- // node_modules/.pnpm/neverthrow@8.0.0/node_modules/neverthrow/dist/index.es.js
9955
+ // node_modules/.pnpm/neverthrow@8.1.1/node_modules/neverthrow/dist/index.es.js
9963
9956
  var defaultErrorConfig = {
9964
9957
  withStackTrace: false
9965
9958
  };
@@ -9996,7 +9989,7 @@ function __awaiter(thisArg, _arguments, P, generator) {
9996
9989
  function step(result) {
9997
9990
  result.done ? resolve2(result.value) : adopt(result.value).then(fulfilled, rejected);
9998
9991
  }
9999
- step((generator = generator.apply(thisArg, [])).next());
9992
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10000
9993
  });
10001
9994
  }
10002
9995
  function __values(o) {
@@ -10016,16 +10009,24 @@ function __await(v) {
10016
10009
  function __asyncGenerator(thisArg, _arguments, generator) {
10017
10010
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
10018
10011
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
10019
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function() {
10012
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function() {
10020
10013
  return this;
10021
10014
  }, i;
10022
- function verb(n2) {
10023
- if (g[n2]) i[n2] = function(v) {
10024
- return new Promise(function(a, b) {
10025
- q.push([n2, v, a, b]) > 1 || resume(n2, v);
10026
- });
10015
+ function awaitReturn(f) {
10016
+ return function(v) {
10017
+ return Promise.resolve(v).then(f, reject);
10027
10018
  };
10028
10019
  }
10020
+ function verb(n2, f) {
10021
+ if (g[n2]) {
10022
+ i[n2] = function(v) {
10023
+ return new Promise(function(a, b) {
10024
+ q.push([n2, v, a, b]) > 1 || resume(n2, v);
10025
+ });
10026
+ };
10027
+ if (f) i[n2] = f(i[n2]);
10028
+ }
10029
+ }
10029
10030
  function resume(n2, v) {
10030
10031
  try {
10031
10032
  step(g[n2](v));
@@ -10055,7 +10056,7 @@ function __asyncDelegator(o) {
10055
10056
  }, i;
10056
10057
  function verb(n2, f) {
10057
10058
  i[n2] = o[n2] ? function(v) {
10058
- return (p = !p) ? { value: __await(o[n2](v)), done: n2 === "return" } : f ? f(v) : v;
10059
+ return (p = !p) ? { value: __await(o[n2](v)), done: false } : f ? f(v) : v;
10059
10060
  } : f;
10060
10061
  }
10061
10062
  }
@@ -10174,6 +10175,15 @@ var ResultAsync = class _ResultAsync {
10174
10175
  return this._promise.then((res) => res.unwrapOr(t));
10175
10176
  }
10176
10177
  /**
10178
+ * @deprecated will be removed in 9.0.0.
10179
+ *
10180
+ * You can use `safeTry` without this method.
10181
+ * @example
10182
+ * ```typescript
10183
+ * safeTry(async function* () {
10184
+ * const okValue = yield* yourResult
10185
+ * })
10186
+ * ```
10177
10187
  * Emulates Rust's `?` operator in `safeTry`'s body. See also `safeTry`.
10178
10188
  */
10179
10189
  safeUnwrap() {
@@ -10185,6 +10195,15 @@ var ResultAsync = class _ResultAsync {
10185
10195
  then(successCallback, failureCallback) {
10186
10196
  return this._promise.then(successCallback, failureCallback);
10187
10197
  }
10198
+ [Symbol.asyncIterator]() {
10199
+ return __asyncGenerator(this, arguments, function* _a() {
10200
+ const result = yield __await(this._promise);
10201
+ if (result.isErr()) {
10202
+ yield yield __await(errAsync(result.error));
10203
+ }
10204
+ return yield __await(result.value);
10205
+ });
10206
+ }
10188
10207
  };
10189
10208
  var errAsync = (err2) => new ResultAsync(Promise.resolve(new Err(err2)));
10190
10209
  var fromPromise = ResultAsync.fromPromise;
@@ -10309,6 +10328,10 @@ var Ok = class {
10309
10328
  _unsafeUnwrapErr(config) {
10310
10329
  throw createNeverThrowError("Called `_unsafeUnwrapErr` on an Ok", this, config);
10311
10330
  }
10331
+ // eslint-disable-next-line @typescript-eslint/no-this-alias, require-yield
10332
+ *[Symbol.iterator]() {
10333
+ return this.value;
10334
+ }
10312
10335
  };
10313
10336
  var Err = class {
10314
10337
  constructor(error) {
@@ -10371,6 +10394,11 @@ var Err = class {
10371
10394
  _unsafeUnwrapErr(_) {
10372
10395
  return this.error;
10373
10396
  }
10397
+ *[Symbol.iterator]() {
10398
+ const self = this;
10399
+ yield self;
10400
+ return self;
10401
+ }
10374
10402
  };
10375
10403
  var fromThrowable = Result.fromThrowable;
10376
10404
 
@@ -10450,6 +10478,8 @@ var Lager = class {
10450
10478
  }
10451
10479
  }
10452
10480
  };
10481
+
10482
+ // src/log.ts
10453
10483
  var log = new Lager();
10454
10484
 
10455
10485
  // src/utils.ts
@@ -10742,6 +10772,17 @@ var antfu = async (options) => {
10742
10772
  ];
10743
10773
  };
10744
10774
 
10775
+ // src/configs/command.ts
10776
+ var import_config = __toESM(require("eslint-plugin-command/config"), 1);
10777
+ var command = async () => {
10778
+ return [
10779
+ {
10780
+ ...(0, import_config.default)(),
10781
+ name: "jsse/command/rules"
10782
+ }
10783
+ ];
10784
+ };
10785
+
10745
10786
  // src/configs/comments.ts
10746
10787
  var comments = async () => [
10747
10788
  {
@@ -10760,6 +10801,34 @@ var comments = async () => [
10760
10801
  ];
10761
10802
 
10762
10803
  // src/globs.ts
10804
+ var globs_exports = {};
10805
+ __export(globs_exports, {
10806
+ GLOB_ALL_SRC: () => GLOB_ALL_SRC,
10807
+ GLOB_CSS: () => GLOB_CSS,
10808
+ GLOB_EXCLUDE: () => GLOB_EXCLUDE,
10809
+ GLOB_GRAPHQL: () => GLOB_GRAPHQL,
10810
+ GLOB_HTML: () => GLOB_HTML,
10811
+ GLOB_JS: () => GLOB_JS,
10812
+ GLOB_JSON: () => GLOB_JSON,
10813
+ GLOB_JSON5: () => GLOB_JSON5,
10814
+ GLOB_JSONC: () => GLOB_JSONC,
10815
+ GLOB_JSX: () => GLOB_JSX,
10816
+ GLOB_JS_SRC_EXT: () => GLOB_JS_SRC_EXT,
10817
+ GLOB_LESS: () => GLOB_LESS,
10818
+ GLOB_MARKDOWN: () => GLOB_MARKDOWN,
10819
+ GLOB_MARKDOWN_CODE: () => GLOB_MARKDOWN_CODE,
10820
+ GLOB_MARKDOWN_IN_MARKDOWN: () => GLOB_MARKDOWN_IN_MARKDOWN,
10821
+ GLOB_SCSS: () => GLOB_SCSS,
10822
+ GLOB_SRC: () => GLOB_SRC,
10823
+ GLOB_SRC_EXT: () => GLOB_SRC_EXT,
10824
+ GLOB_STYLE: () => GLOB_STYLE,
10825
+ GLOB_TESTS: () => GLOB_TESTS,
10826
+ GLOB_TOML: () => GLOB_TOML,
10827
+ GLOB_TS: () => GLOB_TS,
10828
+ GLOB_TSCONFIG: () => GLOB_TSCONFIG,
10829
+ GLOB_TSX: () => GLOB_TSX,
10830
+ GLOB_YAML: () => GLOB_YAML
10831
+ });
10763
10832
  var GLOB_SRC_EXT = "?([cm])[jt]s?(x)";
10764
10833
  var GLOB_JS_SRC_EXT = "?([cm])js?(x)";
10765
10834
  var GLOB_SRC = "**/*.?([cm])[jt]s?(x)";
@@ -12278,7 +12347,6 @@ var react = async (options) => {
12278
12347
  rules: {
12279
12348
  ...reactRecomendedRules(),
12280
12349
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
12281
- // @ts-expect-error index access
12282
12350
  ...pluginReact.configs["jsx-runtime"].rules,
12283
12351
  ...reactRules()
12284
12352
  },
@@ -13052,6 +13120,7 @@ var DEBUG = ["1", "true", "t", "on", "yes", "y"].includes(
13052
13120
  );
13053
13121
  function defaultOptions2() {
13054
13122
  return {
13123
+ command: true,
13055
13124
  componentExts: [],
13056
13125
  debug: DEBUG && import_node_process6.default.env.TEST !== "true",
13057
13126
  fast: false,
@@ -13109,7 +13178,7 @@ async function jsse(options = {}, ...userConfigs) {
13109
13178
  typeAware,
13110
13179
  typescript: enableTypeScript
13111
13180
  } = normalizedOptions;
13112
- if (debug) {
13181
+ if (debug || import_node_process6.default.argv.includes("--debug")) {
13113
13182
  log.level = "debug";
13114
13183
  }
13115
13184
  log.debug("@jsse/eslint-config debug=true");
@@ -13156,6 +13225,9 @@ async function jsse(options = {}, ...userConfigs) {
13156
13225
  antfu(),
13157
13226
  perfectionist()
13158
13227
  );
13228
+ if (normalizedOptions.command) {
13229
+ configs.push(command());
13230
+ }
13159
13231
  if (enableTypeScript) {
13160
13232
  const tscfg = typescript({
13161
13233
  ...typeof enableTypeScript === "boolean" ? {} : enableTypeScript,
@@ -13291,6 +13363,9 @@ async function defineConfig(options = {}, ...userConfigs) {
13291
13363
  return jsse(options, ...userConfigs);
13292
13364
  }
13293
13365
 
13366
+ // src/generated/version.ts
13367
+ var VERSION = "0.2.26";
13368
+
13294
13369
  // src/presets.ts
13295
13370
  var jsseReact = (options, ...configs) => {
13296
13371
  return jsse(
@@ -13308,37 +13383,14 @@ var jsseReact = (options, ...configs) => {
13308
13383
  };
13309
13384
  // Annotate the CommonJS export names for ESM import in node:
13310
13385
  0 && (module.exports = {
13311
- GLOB_ALL_SRC,
13312
- GLOB_CSS,
13313
- GLOB_EXCLUDE,
13314
- GLOB_GRAPHQL,
13315
- GLOB_HTML,
13316
- GLOB_JS,
13317
- GLOB_JSON,
13318
- GLOB_JSON5,
13319
- GLOB_JSONC,
13320
- GLOB_JSX,
13321
- GLOB_JS_SRC_EXT,
13322
- GLOB_LESS,
13323
- GLOB_MARKDOWN,
13324
- GLOB_MARKDOWN_CODE,
13325
- GLOB_MARKDOWN_IN_MARKDOWN,
13326
- GLOB_SCSS,
13327
- GLOB_SRC,
13328
- GLOB_SRC_EXT,
13329
- GLOB_STYLE,
13330
- GLOB_TESTS,
13331
- GLOB_TOML,
13332
- GLOB_TS,
13333
- GLOB_TSCONFIG,
13334
- GLOB_TSX,
13335
- GLOB_YAML,
13336
13386
  SLOW_RULES,
13387
+ VERSION,
13337
13388
  changeRuleEntrySeverity,
13338
13389
  combine,
13339
13390
  combineAsync,
13340
13391
  defineConfig,
13341
13392
  error2warn,
13393
+ globs,
13342
13394
  importJsoncLibs,
13343
13395
  importParserJsonc,
13344
13396
  importPluginJsdoc,