@jsse/eslint-config 0.2.19 → 0.2.20

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.cts CHANGED
@@ -2,9 +2,11 @@ import { ParserOptions } from '@typescript-eslint/parser';
2
2
  import * as parser from '@typescript-eslint/parser';
3
3
  export { parser as parserTs };
4
4
  import * as eslint from 'eslint';
5
- import { Linter } from 'eslint';
5
+ import { Linter, Rule } from 'eslint';
6
6
  import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
7
+ import * as neverthrow from 'neverthrow';
7
8
  import * as _stylistic_eslint_plugin from '@stylistic/eslint-plugin';
9
+ import * as _eslint_markdown from '@eslint/markdown';
8
10
  import * as eslint_plugin_yml_lib_types_js from 'eslint-plugin-yml/lib/types.js';
9
11
  import * as eslint_plugin_yml_lib_meta_js from 'eslint-plugin-yml/lib/meta.js';
10
12
  import * as yaml_eslint_parser from 'yaml-eslint-parser';
@@ -1777,6 +1779,7 @@ type Complexity =
1777
1779
  | {
1778
1780
  maximum?: number;
1779
1781
  max?: number;
1782
+ variant?: "classic" | "modified";
1780
1783
  },
1781
1784
  ];
1782
1785
  // ----- computed-property-spacing -----
@@ -6701,7 +6704,54 @@ type JsoncSpaceUnaryOps =
6701
6704
  /* prettier-ignore */
6702
6705
 
6703
6706
 
6704
- interface MarkdownRuleOptions {}
6707
+ interface MarkdownRuleOptions {
6708
+ /**
6709
+ * Require languages for fenced code blocks.
6710
+ */
6711
+ "markdown/fenced-code-language"?: Linter.RuleEntry<MarkdownFencedCodeLanguage>;
6712
+ /**
6713
+ * Enforce heading levels increment by one.
6714
+ */
6715
+ "markdown/heading-increment"?: Linter.RuleEntry<[]>;
6716
+ /**
6717
+ * Disallow duplicate headings in the same document.
6718
+ */
6719
+ "markdown/no-duplicate-headings"?: Linter.RuleEntry<[]>;
6720
+ /**
6721
+ * Disallow empty links.
6722
+ */
6723
+ "markdown/no-empty-links"?: Linter.RuleEntry<[]>;
6724
+ /**
6725
+ * Disallow HTML tags.
6726
+ */
6727
+ "markdown/no-html"?: Linter.RuleEntry<MarkdownNoHtml>;
6728
+ /**
6729
+ * Disallow invalid label references.
6730
+ */
6731
+ "markdown/no-invalid-label-refs"?: Linter.RuleEntry<[]>;
6732
+ /**
6733
+ * Disallow missing label references.
6734
+ */
6735
+ "markdown/no-missing-label-refs"?: Linter.RuleEntry<[]>;
6736
+ }
6737
+
6738
+ /* ======= Declarations ======= */
6739
+ // ----- markdown/fenced-code-language -----
6740
+ type MarkdownFencedCodeLanguage =
6741
+ | []
6742
+ | [
6743
+ {
6744
+ required?: string[];
6745
+ },
6746
+ ];
6747
+ // ----- markdown/no-html -----
6748
+ type MarkdownNoHtml =
6749
+ | []
6750
+ | [
6751
+ {
6752
+ allowed?: string[];
6753
+ },
6754
+ ];
6705
6755
 
6706
6756
  /* eslint-disable */
6707
6757
  /* prettier-ignore */
@@ -6798,7 +6848,7 @@ interface NRuleOptions {
6798
6848
  * disallow the use of `process.env`
6799
6849
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-env.md
6800
6850
  */
6801
- "n/no-process-env"?: Linter.RuleEntry<[]>;
6851
+ "n/no-process-env"?: Linter.RuleEntry<NNoProcessEnv>;
6802
6852
  /**
6803
6853
  * disallow the use of `process.exit()`
6804
6854
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-exit.md
@@ -7021,6 +7071,9 @@ type NNoDeprecatedApi =
7021
7071
  | "readline.getStringWidth"
7022
7072
  | "readline.isFullWidthCodePoint"
7023
7073
  | "readline.stripVTControlCharacters"
7074
+ | "repl.REPLServer"
7075
+ | "repl.Recoverable"
7076
+ | "repl.REPL_MODE_MAGIC"
7024
7077
  | "safe-buffer.Buffer()"
7025
7078
  | "new safe-buffer.Buffer()"
7026
7079
  | "safe-buffer.SlowBuffer"
@@ -7059,6 +7112,15 @@ type NNoDeprecatedApi =
7059
7112
  | "util.puts"
7060
7113
  | "util._extend"
7061
7114
  | "vm.runInDebugContext"
7115
+ | "zlib.BrotliCompress()"
7116
+ | "zlib.BrotliDecompress()"
7117
+ | "zlib.Deflate()"
7118
+ | "zlib.DeflateRaw()"
7119
+ | "zlib.Gunzip()"
7120
+ | "zlib.Gzip()"
7121
+ | "zlib.Inflate()"
7122
+ | "zlib.InflateRaw()"
7123
+ | "zlib.Unzip()"
7062
7124
  )[];
7063
7125
  ignoreGlobalItems?: (
7064
7126
  | "Buffer()"
@@ -7185,6 +7247,7 @@ type NNoMissingImport =
7185
7247
  allowModules?: string[];
7186
7248
  resolvePaths?: string[];
7187
7249
  tryExtensions?: string[];
7250
+ ignoreTypeImport?: boolean;
7188
7251
  tsconfigPath?: string;
7189
7252
  typescriptExtensionMap?:
7190
7253
  | unknown[][]
@@ -7227,6 +7290,14 @@ type NNoMixedRequires =
7227
7290
  allowCall?: boolean;
7228
7291
  },
7229
7292
  ];
7293
+ // ----- n/no-process-env -----
7294
+ type NNoProcessEnv =
7295
+ | []
7296
+ | [
7297
+ {
7298
+ allowedVariables?: string[];
7299
+ },
7300
+ ];
7230
7301
  // ----- n/no-restricted-import -----
7231
7302
  type NNoRestrictedImport =
7232
7303
  | []
@@ -8360,6 +8431,31 @@ type NNoUnsupportedFeaturesNodeBuiltins =
8360
8431
  | "PerformanceObserverEntryList"
8361
8432
  | "PerformanceResourceTiming"
8362
8433
  | "performance"
8434
+ | "performance.clearMarks"
8435
+ | "performance.clearMeasures"
8436
+ | "performance.clearResourceTimings"
8437
+ | "performance.eventLoopUtilization"
8438
+ | "performance.getEntries"
8439
+ | "performance.getEntriesByName"
8440
+ | "performance.getEntriesByType"
8441
+ | "performance.mark"
8442
+ | "performance.markResourceTiming"
8443
+ | "performance.measure"
8444
+ | "performance.nodeTiming"
8445
+ | "performance.nodeTiming.bootstrapComplete"
8446
+ | "performance.nodeTiming.environment"
8447
+ | "performance.nodeTiming.idleTime"
8448
+ | "performance.nodeTiming.loopExit"
8449
+ | "performance.nodeTiming.loopStart"
8450
+ | "performance.nodeTiming.nodeStart"
8451
+ | "performance.nodeTiming.uvMetricsInfo"
8452
+ | "performance.nodeTiming.v8Start"
8453
+ | "performance.now"
8454
+ | "performance.onresourcetimingbufferfull"
8455
+ | "performance.setResourceTimingBufferSize"
8456
+ | "performance.timeOrigin"
8457
+ | "performance.timerify"
8458
+ | "performance.toJSON"
8363
8459
  | "process"
8364
8460
  | "process.allowedNodeEnvironmentFlags"
8365
8461
  | "process.availableMemory"
@@ -9021,6 +9117,10 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9021
9117
  | "http.Server"
9022
9118
  | "inspector"
9023
9119
  | "inspector.Session"
9120
+ | "inspector.Network.requestWillBeSent"
9121
+ | "inspector.Network.responseReceived"
9122
+ | "inspector.Network.loadingFinished"
9123
+ | "inspector.Network.loadingFailed"
9024
9124
  | "inspector.console"
9025
9125
  | "inspector.close"
9026
9126
  | "inspector.open"
@@ -9034,8 +9134,11 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9034
9134
  | "inspector/promises.url"
9035
9135
  | "inspector/promises.waitForDebugger"
9036
9136
  | "module.builtinModules"
9137
+ | "module.constants.compileCacheStatus"
9037
9138
  | "module.createRequire"
9038
9139
  | "module.createRequireFromPath"
9140
+ | "module.enableCompileCache"
9141
+ | "module.getCompileCacheDir"
9039
9142
  | "module.isBuiltin"
9040
9143
  | "module.register"
9041
9144
  | "module.syncBuiltinESMExports"
@@ -9044,6 +9147,8 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9044
9147
  | "module.Module.builtinModules"
9045
9148
  | "module.Module.createRequire"
9046
9149
  | "module.Module.createRequireFromPath"
9150
+ | "module.Module.enableCompileCache"
9151
+ | "module.Module.getCompileCacheDir"
9047
9152
  | "module.Module.isBuiltin"
9048
9153
  | "module.Module.register"
9049
9154
  | "module.Module.syncBuiltinESMExports"
@@ -9166,6 +9271,31 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9166
9271
  | "path/win32.toNamespacedPath"
9167
9272
  | "perf_hooks"
9168
9273
  | "perf_hooks.performance"
9274
+ | "perf_hooks.performance.clearMarks"
9275
+ | "perf_hooks.performance.clearMeasures"
9276
+ | "perf_hooks.performance.clearResourceTimings"
9277
+ | "perf_hooks.performance.eventLoopUtilization"
9278
+ | "perf_hooks.performance.getEntries"
9279
+ | "perf_hooks.performance.getEntriesByName"
9280
+ | "perf_hooks.performance.getEntriesByType"
9281
+ | "perf_hooks.performance.mark"
9282
+ | "perf_hooks.performance.markResourceTiming"
9283
+ | "perf_hooks.performance.measure"
9284
+ | "perf_hooks.performance.nodeTiming"
9285
+ | "perf_hooks.performance.nodeTiming.bootstrapComplete"
9286
+ | "perf_hooks.performance.nodeTiming.environment"
9287
+ | "perf_hooks.performance.nodeTiming.idleTime"
9288
+ | "perf_hooks.performance.nodeTiming.loopExit"
9289
+ | "perf_hooks.performance.nodeTiming.loopStart"
9290
+ | "perf_hooks.performance.nodeTiming.nodeStart"
9291
+ | "perf_hooks.performance.nodeTiming.uvMetricsInfo"
9292
+ | "perf_hooks.performance.nodeTiming.v8Start"
9293
+ | "perf_hooks.performance.now"
9294
+ | "perf_hooks.performance.onresourcetimingbufferfull"
9295
+ | "perf_hooks.performance.setResourceTimingBufferSize"
9296
+ | "perf_hooks.performance.timeOrigin"
9297
+ | "perf_hooks.performance.timerify"
9298
+ | "perf_hooks.performance.toJSON"
9169
9299
  | "perf_hooks.createHistogram"
9170
9300
  | "perf_hooks.monitorEventLoopDelay"
9171
9301
  | "perf_hooks.PerformanceEntry"
@@ -9210,6 +9340,17 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9210
9340
  | "readline/promises.createInterface"
9211
9341
  | "readline/promises.Interface"
9212
9342
  | "readline/promises.Readline"
9343
+ | "repl"
9344
+ | "repl.start"
9345
+ | "repl.writer"
9346
+ | "repl.REPLServer()"
9347
+ | "repl.REPLServer"
9348
+ | "repl.REPL_MODE_MAGIC"
9349
+ | "repl.REPL_MODE_SLOPPY"
9350
+ | "repl.REPL_MODE_STRICT"
9351
+ | "repl.Recoverable()"
9352
+ | "repl.Recoverable"
9353
+ | "repl.builtinModules"
9213
9354
  | "sea"
9214
9355
  | "sea.isSea"
9215
9356
  | "sea.getAsset"
@@ -9226,6 +9367,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9226
9367
  | "stream.finished"
9227
9368
  | "stream.pipeline"
9228
9369
  | "stream.compose"
9370
+ | "stream.duplexPair"
9229
9371
  | "stream.Readable"
9230
9372
  | "stream.Readable.from"
9231
9373
  | "stream.Readable.isDisturbed"
@@ -9387,6 +9529,7 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9387
9529
  | "util.deprecate"
9388
9530
  | "util.format"
9389
9531
  | "util.formatWithOptions"
9532
+ | "util.getCallSite"
9390
9533
  | "util.getSystemErrorName"
9391
9534
  | "util.getSystemErrorMap"
9392
9535
  | "util.inherits"
@@ -9605,14 +9748,23 @@ type NNoUnsupportedFeaturesNodeBuiltins =
9605
9748
  | "zlib.inflateRawSync"
9606
9749
  | "zlib.unzip"
9607
9750
  | "zlib.unzipSync"
9751
+ | "zlib.BrotliCompress()"
9608
9752
  | "zlib.BrotliCompress"
9753
+ | "zlib.BrotliDecompress()"
9609
9754
  | "zlib.BrotliDecompress"
9755
+ | "zlib.Deflate()"
9610
9756
  | "zlib.Deflate"
9757
+ | "zlib.DeflateRaw()"
9611
9758
  | "zlib.DeflateRaw"
9759
+ | "zlib.Gunzip()"
9612
9760
  | "zlib.Gunzip"
9761
+ | "zlib.Gzip()"
9613
9762
  | "zlib.Gzip"
9763
+ | "zlib.Inflate()"
9614
9764
  | "zlib.Inflate"
9765
+ | "zlib.InflateRaw()"
9615
9766
  | "zlib.InflateRaw"
9767
+ | "zlib.Unzip()"
9616
9768
  | "zlib.Unzip"
9617
9769
  | "zlib"
9618
9770
  )[];
@@ -21490,6 +21642,7 @@ declare const GLOB_JSON5 = "**/*.json5";
21490
21642
  declare const GLOB_JSONC = "**/*.jsonc";
21491
21643
  declare const GLOB_TOML = "**/*.toml";
21492
21644
  declare const GLOB_MARKDOWN = "**/*.md";
21645
+ declare const GLOB_MARKDOWN_IN_MARKDOWN = "**/*.md/*.md";
21493
21646
  declare const GLOB_GRAPHQL: string[];
21494
21647
  declare const GLOB_YAML = "**/*.y?(a)ml";
21495
21648
  declare const GLOB_HTML = "**/*.htm?(l)";
@@ -22447,7 +22600,9 @@ declare function importYmlLibs(): Promise<{
22447
22600
  };
22448
22601
  }>;
22449
22602
  declare function importPluginMarkdown(): Promise<{
22450
- pluginMarkdown: any;
22603
+ pluginMarkdown: eslint.ESLint.Plugin & {
22604
+ languages: Record<string, _eslint_markdown.Language>;
22605
+ };
22451
22606
  }>;
22452
22607
  declare function importPluginJsdoc(): Promise<{
22453
22608
  pluginJsdoc: eslint.ESLint.Plugin & {
@@ -22457,7 +22612,7 @@ declare function importPluginJsdoc(): Promise<{
22457
22612
  declare function importPluginTsdoc(): Promise<{
22458
22613
  pluginTsdoc: {
22459
22614
  rules: {
22460
- [x: string]: eslint.Rule.RuleModule;
22615
+ [x: string]: Rule.RuleModule;
22461
22616
  };
22462
22617
  };
22463
22618
  }>;
@@ -22467,6 +22622,9 @@ declare function importPluginStylistic(): Promise<{
22467
22622
  declare function importPluginTailwind(): Promise<{
22468
22623
  pluginTailwind: any;
22469
22624
  }>;
22625
+ declare function safeImportPluginTailwind(): Promise<neverthrow.Ok<{
22626
+ pluginTailwind: any;
22627
+ }, never> | neverthrow.Err<never, Error>>;
22470
22628
 
22471
22629
  declare function jssestd(): Promise<TypedFlatConfigItem[]>;
22472
22630
  declare function jsseReact(): Promise<TypedFlatConfigItem[]>;
@@ -22491,5 +22649,31 @@ declare function isInEditor(): boolean;
22491
22649
  * @returns unique strings
22492
22650
  */
22493
22651
  declare function uniqueStrings(...strings: (string | string[])[]): string[];
22652
+ declare const parserPlain: {
22653
+ meta: {
22654
+ name: string;
22655
+ };
22656
+ parseForESLint: (code: string) => {
22657
+ ast: {
22658
+ body: never[];
22659
+ comments: never[];
22660
+ loc: {
22661
+ end: number;
22662
+ start: number;
22663
+ };
22664
+ range: number[];
22665
+ tokens: never[];
22666
+ type: string;
22667
+ };
22668
+ scopeManager: undefined;
22669
+ services: {
22670
+ isPlain: boolean;
22671
+ };
22672
+ visitorKeys: {
22673
+ Program: never[];
22674
+ };
22675
+ };
22676
+ };
22677
+ declare function turnOffRules(configs: TypedFlatConfigItem[], off: string[]): TypedFlatConfigItem[];
22494
22678
 
22495
- export { type Awaitable, type EslintConfigFn, 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_SCSS, GLOB_SRC, GLOB_SRC_EXT, GLOB_STYLE, GLOB_TESTS, GLOB_TOML, GLOB_TS, GLOB_TSCONFIG, GLOB_TSX, GLOB_YAML, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PromiseFlatConfigItem, type RenamePefix, type RuleName, type Rules, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItem, type TypedFlatConfigItemWithId, combine, combineAsync, jsse as default, importJsoncLibs, importParserJsonc, importPluginJsdoc, importPluginJsonc, importPluginMarkdown, importPluginReact, importPluginReactHooks, importPluginReactRefresh, importPluginStylistic, importPluginTailwind, importPluginTsdoc, importReactPlugins, importYmlLibs, interopDefault, isCI, isInEditor, jsse, jsseReact, jssestd, renameRules, uniqueStrings };
22679
+ export { type Awaitable, type EslintConfigFn, 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, type LanguageOptions, type OptionsCommon, type OptionsComponentExts, type OptionsConfig, type OptionsFiles, type OptionsHasTypeScript, type OptionsIsInEditor, type OptionsOverrides, type OptionsPrefix, type OptionsReact, type OptionsStylistic, type OptionsTypeScriptParserOptions, type OptionsTypeScriptWithTypes, type OptionsTypescript, type PromiseFlatConfigItem, type RenamePefix, type RuleName, type Rules, SLOW_RULES, type StylisticConfig, type TailwindEslintSettings, type TailwindOptions, type TypedFlatConfigItem, type TypedFlatConfigItemWithId, combine, combineAsync, jsse as default, importJsoncLibs, importParserJsonc, importPluginJsdoc, importPluginJsonc, importPluginMarkdown, importPluginReact, importPluginReactHooks, importPluginReactRefresh, importPluginStylistic, importPluginTailwind, importPluginTsdoc, importReactPlugins, importYmlLibs, interopDefault, isCI, isInEditor, jsse, jsseReact, jssestd, parserPlain, renameRules, safeImportPluginTailwind, turnOffRules, uniqueStrings };