@2digits/eslint-config 5.1.9 → 5.1.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/dist/index.d.mts CHANGED
@@ -725,7 +725,7 @@ interface JSONSchema4 {
725
725
  format?: string | undefined;
726
726
  }
727
727
  //#endregion
728
- //#region ../../node_modules/.pnpm/@eslint+core@0.17.0/node_modules/@eslint/core/dist/esm/types.d.ts
728
+ //#region ../../node_modules/.pnpm/@eslint+core@1.1.0/node_modules/@eslint/core/dist/esm/types.d.ts
729
729
  /**
730
730
  * Represents an error inside of a file.
731
731
  */
@@ -781,7 +781,7 @@ type RuleFixType = "code" | "whitespace";
781
781
  * name of a node type or a selector, or is a method that will be called at specific
782
782
  * times during the traversal.
783
783
  */
784
- type RuleVisitor = Record<string, ((...args: any[]) => void) | undefined>;
784
+ type RuleVisitor$1 = Record<string, ((...args: any[]) => void) | undefined>;
785
785
  /**
786
786
  * Rule meta information used for documentation.
787
787
  */
@@ -794,11 +794,6 @@ interface RulesMetaDocs {
794
794
  * The URL to the documentation for the rule.
795
795
  */
796
796
  url?: string | undefined;
797
- /**
798
- * The category the rule falls under.
799
- * @deprecated No longer used.
800
- */
801
- category?: string | undefined;
802
797
  /**
803
798
  * Indicates if the rule is generally recommended for all users.
804
799
  *
@@ -945,56 +940,26 @@ interface RuleContext$1<Options extends RuleContextTypeOptions = RuleContextType
945
940
  * The current working directory for the session.
946
941
  */
947
942
  cwd: string;
948
- /**
949
- * Returns the current working directory for the session.
950
- * @deprecated Use `cwd` instead.
951
- */
952
- getCwd(): string;
953
943
  /**
954
944
  * The filename of the file being linted.
955
945
  */
956
946
  filename: string;
957
- /**
958
- * Returns the filename of the file being linted.
959
- * @deprecated Use `filename` instead.
960
- */
961
- getFilename(): string;
962
947
  /**
963
948
  * The physical filename of the file being linted.
964
949
  */
965
950
  physicalFilename: string;
966
- /**
967
- * Returns the physical filename of the file being linted.
968
- * @deprecated Use `physicalFilename` instead.
969
- */
970
- getPhysicalFilename(): string;
971
951
  /**
972
952
  * The source code object that the rule is running on.
973
953
  */
974
954
  sourceCode: Options["Code"];
975
- /**
976
- * Returns the source code object that the rule is running on.
977
- * @deprecated Use `sourceCode` instead.
978
- */
979
- getSourceCode(): Options["Code"];
980
955
  /**
981
956
  * Shared settings for the configuration.
982
957
  */
983
958
  settings: SettingsConfig;
984
- /**
985
- * Parser-specific options for the configuration.
986
- * @deprecated Use `languageOptions.parserOptions` instead.
987
- */
988
- parserOptions: Record<string, unknown>;
989
959
  /**
990
960
  * The language options for the configuration.
991
961
  */
992
962
  languageOptions: Options["LangOptions"];
993
- /**
994
- * The CommonJS path to the parser used while parsing this file.
995
- * @deprecated No longer used.
996
- */
997
- parserPath: string | undefined;
998
963
  /**
999
964
  * The rule ID.
1000
965
  */
@@ -1083,11 +1048,15 @@ interface RuleTextEdit {
1083
1048
  * @returns The fix(es) for the violation.
1084
1049
  */
1085
1050
  type RuleFixer = (fixer: RuleTextEditor) => RuleTextEdit | Iterable<RuleTextEdit> | null;
1051
+ /**
1052
+ * Data that can be used to fill placeholders in error messages.
1053
+ */
1054
+ type MessagePlaceholderData = Record<string, string | number | boolean | bigint | null | undefined>;
1086
1055
  interface ViolationReportBase {
1087
1056
  /**
1088
1057
  * The data to insert into the message.
1089
1058
  */
1090
- data?: Record<string, unknown> | undefined;
1059
+ data?: MessagePlaceholderData | undefined;
1091
1060
  /**
1092
1061
  * The fix to be applied for the violation.
1093
1062
  */
@@ -1113,7 +1082,7 @@ interface SuggestedEditBase {
1113
1082
  /**
1114
1083
  * The data to insert into the message.
1115
1084
  */
1116
- data?: Record<string, unknown> | undefined;
1085
+ data?: MessagePlaceholderData | undefined;
1117
1086
  /**
1118
1087
  * The fix to be applied for the suggestion.
1119
1088
  */
@@ -1157,11 +1126,6 @@ interface LintMessage$1 {
1157
1126
  message: string;
1158
1127
  /** The ID of the message in the rule's meta. */
1159
1128
  messageId?: string | undefined;
1160
- /**
1161
- * Type of node.
1162
- * @deprecated `nodeType` is deprecated and will be removed in the next major version.
1163
- */
1164
- nodeType?: string | undefined;
1165
1129
  /** If `true` then this is a fatal error. */
1166
1130
  fatal?: true | undefined;
1167
1131
  /** The severity of this message. */
@@ -1178,7 +1142,7 @@ interface RuleDefinitionTypeOptions {
1178
1142
  LangOptions: LanguageOptions;
1179
1143
  Code: SourceCode$1;
1180
1144
  RuleOptions: unknown[];
1181
- Visitor: RuleVisitor;
1145
+ Visitor: RuleVisitor$1;
1182
1146
  Node: unknown;
1183
1147
  MessageIds: string;
1184
1148
  ExtRuleDocs: unknown;
@@ -1329,7 +1293,7 @@ interface ConfigObject<Rules extends RulesConfig = RulesConfig> {
1329
1293
  * An object containing name-value pairs of information that should be
1330
1294
  * available to all rules.
1331
1295
  */
1332
- settings?: Record<string, unknown>;
1296
+ settings?: SettingsConfig;
1333
1297
  }
1334
1298
  /** @deprecated Only supported in legacy eslintrc config format. */
1335
1299
  type GlobalAccess = boolean | "off" | "readable" | "readonly" | "writable" | "writeable";
@@ -1392,7 +1356,6 @@ interface JavaScriptParserOptionsConfig {
1392
1356
  globalReturn?: boolean | undefined;
1393
1357
  impliedStrict?: boolean | undefined;
1394
1358
  jsx?: boolean | undefined;
1395
- experimentalObjectRestSpread?: boolean | undefined;
1396
1359
  [key: string]: any;
1397
1360
  } | undefined;
1398
1361
  [key: string]: any;
@@ -1861,12 +1824,18 @@ interface Directive {
1861
1824
  justification?: string;
1862
1825
  }
1863
1826
  //#endregion
1864
- //#region ../../node_modules/.pnpm/eslint@9.39.2_jiti@2.6.0/node_modules/eslint/lib/types/index.d.ts
1865
- //------------------------------------------------------------------------------
1866
- // Helpers
1827
+ //#region ../../node_modules/.pnpm/@eslint+plugin-kit@0.6.0_patch_hash=c9c5f1e48363ce3f8a4fae7cf0229bb54da3894d3524eb9e6f5fe82c8c793c55/node_modules/@eslint/plugin-kit/dist/cjs/types.d.cts
1828
+ /**
1829
+ * Adds matching `:exit` selector properties for each key of a `RuleVisitor`.
1830
+ */
1831
+ type CustomRuleVisitorWithExit$1<RuleVisitorType extends RuleVisitor$1> = { [Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key] };
1832
+ //#endregion
1833
+ //#region ../../node_modules/.pnpm/@eslint+plugin-kit@0.6.0_patch_hash=c9c5f1e48363ce3f8a4fae7cf0229bb54da3894d3524eb9e6f5fe82c8c793c55/node_modules/@eslint/plugin-kit/dist/cjs/index.d.cts
1834
+ type RuleVisitor = RuleVisitor$1;
1835
+ type CustomRuleVisitorWithExit<RuleVisitorType extends RuleVisitor> = CustomRuleVisitorWithExit$1<RuleVisitorType>;
1836
+ //#endregion
1837
+ //#region ../../node_modules/.pnpm/eslint@10.0.0_jiti@2.6.0/node_modules/eslint/lib/types/index.d.ts
1867
1838
  //------------------------------------------------------------------------------
1868
- /** Adds matching `:exit` selectors for all properties of a `RuleVisitor`. */
1869
- type WithExit<RuleVisitorType extends RuleVisitor> = { [Key in keyof RuleVisitorType as Key | `${Key & string}:exit`]: RuleVisitorType[Key] }; //------------------------------------------------------------------------------
1870
1839
  // Exports
1871
1840
  //------------------------------------------------------------------------------
1872
1841
  declare namespace AST {
@@ -1881,7 +1850,7 @@ declare namespace AST {
1881
1850
  start: Position$1;
1882
1851
  end: Position$1;
1883
1852
  }
1884
- type Range = [number, number];
1853
+ type Range = SourceRange;
1885
1854
  interface Program extends Program {
1886
1855
  comments: Comment[];
1887
1856
  tokens: Token[];
@@ -1889,15 +1858,20 @@ declare namespace AST {
1889
1858
  range: Range;
1890
1859
  }
1891
1860
  }
1861
+ interface JSXIdentifier extends BaseNode {
1862
+ type: "JSXIdentifier";
1863
+ name: string;
1864
+ }
1892
1865
  declare namespace Scope {
1893
1866
  interface ScopeManager {
1894
1867
  scopes: Scope[];
1895
1868
  globalScope: Scope | null;
1896
1869
  acquire(node: Node$1, inner?: boolean): Scope | null;
1897
1870
  getDeclaredVariables(node: Node$1): Variable[];
1871
+ addGlobals(names: ReadonlyArray<string>): void;
1898
1872
  }
1899
1873
  interface Scope {
1900
- type: "block" | "catch" | "class" | "class-field-initializer" | "class-static-block" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with" | "TDZ";
1874
+ type: "block" | "catch" | "class" | "class-field-initializer" | "class-static-block" | "for" | "function" | "function-expression-name" | "global" | "module" | "switch" | "with";
1901
1875
  isStrict: boolean;
1902
1876
  upper: Scope | null;
1903
1877
  childScopes: Scope[];
@@ -1921,11 +1895,11 @@ declare namespace Scope {
1921
1895
  defs: Definition[];
1922
1896
  }
1923
1897
  interface Reference {
1924
- identifier: Identifier;
1898
+ identifier: Identifier | JSXIdentifier;
1925
1899
  from: Scope;
1926
1900
  resolved: Variable | null;
1927
- writeExpr: Node$1 | null;
1928
- init: boolean;
1901
+ writeExpr?: Expression | null;
1902
+ init?: boolean;
1929
1903
  isWrite(): boolean;
1930
1904
  isRead(): boolean;
1931
1905
  isWriteOnly(): boolean;
@@ -1956,10 +1930,6 @@ declare namespace Scope {
1956
1930
  type: "Parameter";
1957
1931
  node: FunctionDeclaration | FunctionExpression | ArrowFunctionExpression;
1958
1932
  parent: null;
1959
- } | {
1960
- type: "TDZ";
1961
- node: any;
1962
- parent: null;
1963
1933
  } | {
1964
1934
  type: "Variable";
1965
1935
  node: VariableDeclarator;
@@ -1993,11 +1963,7 @@ declare class SourceCode implements TextSourceCode<{
1993
1963
  getAllComments(): Comment[];
1994
1964
  getAncestors(node: Node$1): Node$1[];
1995
1965
  getDeclaredVariables(node: Node$1): Scope.Variable[];
1996
- /** @deprecated */
1997
- getJSDocComment(node: Node$1): Comment | null;
1998
1966
  getNodeByRangeIndex(index: number): Node$1 | null;
1999
- /** @deprecated Use `isSpaceBetween()` instead. */
2000
- isSpaceBetweenTokens(first: Node$1 | AST.Token, second: Node$1 | AST.Token): boolean;
2001
1967
  getLocFromIndex(index: number): Position$1;
2002
1968
  getIndexFromLoc(location: Position$1): number; // Inherited methods from TokenStore
2003
1969
  // ---------------------------------
@@ -2015,10 +1981,6 @@ declare class SourceCode implements TextSourceCode<{
2015
1981
  getTokensBefore: SourceCode.UnaryCursorWithCountOptions;
2016
1982
  getTokenAfter: SourceCode.UnaryCursorWithSkipOptions;
2017
1983
  getTokensAfter: SourceCode.UnaryCursorWithCountOptions;
2018
- /** @deprecated Use `getTokenBefore()` instead. */
2019
- getTokenOrCommentBefore(node: Node$1 | AST.Token | Comment, skip?: number | undefined): AST.Token | Comment | null;
2020
- /** @deprecated Use `getTokenAfter()` instead. */
2021
- getTokenOrCommentAfter(node: Node$1 | AST.Token | Comment, skip?: number | undefined): AST.Token | Comment | null;
2022
1984
  getFirstTokenBetween: SourceCode.BinaryCursorWithSkipOptions;
2023
1985
  getFirstTokensBetween: SourceCode.BinaryCursorWithCountOptions;
2024
1986
  getLastTokenBetween: SourceCode.BinaryCursorWithSkipOptions;
@@ -2199,7 +2161,7 @@ declare namespace Rule {
2199
2161
  create(context: RuleContext): RuleListener;
2200
2162
  }
2201
2163
  type NodeTypes = Node$1["type"];
2202
- interface NodeListener extends WithExit<{ [Node in Rule.Node as Node["type"]]?: ((node: Node) => void) | undefined } & {
2164
+ interface NodeListener extends CustomRuleVisitorWithExit<{ [Node in Rule.Node as Node["type"]]?: ((node: Node) => void) | undefined } & {
2203
2165
  // A `Program` visitor's node type has no `parent` property.
2204
2166
  Program?: ((node: AST.Program) => void) | undefined;
2205
2167
  }> {}
@@ -2246,14 +2208,14 @@ declare namespace Rule {
2246
2208
  }> {}
2247
2209
  type ReportFixer = RuleFixer;
2248
2210
  /** @deprecated Use `ReportDescriptorOptions` instead. */
2249
- type ReportDescriptorOptionsBase = ViolationReportBase;
2211
+ type ReportDescriptorOptionsBase = Omit<ViolationReportBase, "suggest">;
2250
2212
  type SuggestionReportOptions = SuggestedEditBase;
2251
2213
  type SuggestionDescriptorMessage = SuggestionMessage;
2252
2214
  type SuggestionReportDescriptor = SuggestedEdit; // redundant with ReportDescriptorOptionsBase but kept for clarity
2253
2215
  type ReportDescriptorOptions = ViolationReportBase;
2254
- type ReportDescriptor = ViolationReport<Node$1>;
2216
+ type ReportDescriptor = ViolationReport<JSSyntaxElement>;
2255
2217
  type ReportDescriptorMessage = ViolationMessage;
2256
- type ReportDescriptorLocation = ViolationLocation<Node$1>;
2218
+ type ReportDescriptorLocation = ViolationLocation<JSSyntaxElement>;
2257
2219
  type RuleFixer = RuleTextEditor<Node$1 | AST.Token>;
2258
2220
  type Fix = RuleTextEdit;
2259
2221
  }
@@ -2263,19 +2225,13 @@ declare class Linter {
2263
2225
  version: string;
2264
2226
  constructor(options?: {
2265
2227
  cwd?: string | undefined;
2266
- configType?: "flat" | "eslintrc";
2228
+ configType?: "flat";
2267
2229
  });
2268
- verify(code: SourceCode | string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], filename?: string): Linter.LintMessage[];
2269
- verify(code: SourceCode | string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], options: Linter.LintOptions): Linter.LintMessage[];
2270
- verifyAndFix(code: string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], filename?: string): Linter.FixReport;
2271
- verifyAndFix(code: string, config: Linter.LegacyConfig | Linter.Config | Linter.Config[], options: Linter.FixOptions): Linter.FixReport;
2230
+ verify(code: SourceCode | string, config: Linter.Config | Linter.Config[], filename?: string): Linter.LintMessage[];
2231
+ verify(code: SourceCode | string, config: Linter.Config | Linter.Config[], options: Linter.LintOptions): Linter.LintMessage[];
2232
+ verifyAndFix(code: string, config: Linter.Config | Linter.Config[], filename?: string): Linter.FixReport;
2233
+ verifyAndFix(code: string, config: Linter.Config | Linter.Config[], options: Linter.FixOptions): Linter.FixReport;
2272
2234
  getSourceCode(): SourceCode;
2273
- defineRule(name: string, rule: Rule.RuleModule): void;
2274
- defineRules(rules: {
2275
- [name: string]: Rule.RuleModule;
2276
- }): void;
2277
- getRules(): Map<string, Rule.RuleModule>;
2278
- defineParser(name: string, parser: Linter.Parser): void;
2279
2235
  getTimes(): Linter.Stats["times"];
2280
2236
  getFixPassCount(): Linter.Stats["fixPasses"];
2281
2237
  }
@@ -2352,7 +2308,41 @@ declare namespace Linter {
2352
2308
  *
2353
2309
  * @see [Specifying Parser Options](https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options)
2354
2310
  */
2355
- type ParserOptions = JavaScriptParserOptionsConfig;
2311
+ interface ParserOptions {
2312
+ /**
2313
+ * Allow the use of reserved words as identifiers (if `ecmaVersion` is 3).
2314
+ *
2315
+ * @default false
2316
+ */
2317
+ allowReserved?: boolean | undefined;
2318
+ /**
2319
+ * An object indicating which additional language features you'd like to use.
2320
+ *
2321
+ * @see https://eslint.org/docs/latest/use/configure/language-options#specifying-parser-options
2322
+ */
2323
+ ecmaFeatures?: {
2324
+ /**
2325
+ * Allow `return` statements in the global scope.
2326
+ *
2327
+ * @default false
2328
+ */
2329
+ globalReturn?: boolean | undefined;
2330
+ /**
2331
+ * Enable global [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) (if `ecmaVersion` is 5 or greater).
2332
+ *
2333
+ * @default false
2334
+ */
2335
+ impliedStrict?: boolean | undefined;
2336
+ /**
2337
+ * Enable [JSX](https://facebook.github.io/jsx/).
2338
+ *
2339
+ * @default false
2340
+ */
2341
+ jsx?: boolean | undefined;
2342
+ [key: string]: any;
2343
+ } | undefined;
2344
+ [key: string]: any;
2345
+ }
2356
2346
  /**
2357
2347
  * Options used for linting code with `Linter#verify` and `Linter#verifyAndFix`.
2358
2348
  */
@@ -2547,30 +2537,6 @@ declare namespace ESLint {
2547
2537
  concurrency?: number | "auto" | "off" | undefined;
2548
2538
  flags?: string[] | undefined;
2549
2539
  }
2550
- interface LegacyOptions {
2551
- // File enumeration
2552
- cwd?: string | undefined;
2553
- errorOnUnmatchedPattern?: boolean | undefined;
2554
- extensions?: string[] | undefined;
2555
- globInputPaths?: boolean | undefined;
2556
- ignore?: boolean | undefined;
2557
- ignorePath?: string | undefined; // Linting
2558
- allowInlineConfig?: boolean | undefined;
2559
- baseConfig?: Linter.LegacyConfig | undefined;
2560
- overrideConfig?: Linter.LegacyConfig | undefined;
2561
- overrideConfigFile?: string | undefined;
2562
- plugins?: Record<string, Plugin> | undefined;
2563
- reportUnusedDisableDirectives?: Linter.StringSeverity | undefined;
2564
- resolvePluginsRelativeTo?: string | undefined;
2565
- rulePaths?: string[] | undefined;
2566
- useEslintrc?: boolean | undefined; // Autofix
2567
- fix?: boolean | ((message: Linter.LintMessage) => boolean) | undefined;
2568
- fixTypes?: FixType[] | null | undefined; // Cache-related
2569
- cache?: boolean | undefined;
2570
- cacheLocation?: string | undefined;
2571
- cacheStrategy?: CacheStrategy | undefined; // Other Options
2572
- flags?: string[] | undefined;
2573
- }
2574
2540
  /** A linting result. */
2575
2541
  interface LintResult {
2576
2542
  /** The path to the file that was linted. */
@@ -2611,9 +2577,8 @@ declare namespace ESLint {
2611
2577
  */
2612
2578
  foundWarnings: number;
2613
2579
  }
2614
- interface LintResultData {
2580
+ interface LintResultData extends ResultsMeta {
2615
2581
  cwd: string;
2616
- maxWarningsExceeded?: MaxWarningsExceeded | undefined;
2617
2582
  rulesMeta: {
2618
2583
  [ruleId: string]: Rule.RuleMetaData;
2619
2584
  };
@@ -2641,6 +2606,13 @@ declare namespace ESLint {
2641
2606
  * Metadata about results for formatters.
2642
2607
  */
2643
2608
  interface ResultsMeta {
2609
+ /**
2610
+ * Whether or not to use color in the formatter output.
2611
+ * - If `--color` was set, this property is `true`.
2612
+ * - If `--no-color` was set, it is `false`.
2613
+ * - If neither option was provided, the property is omitted.
2614
+ */
2615
+ color?: boolean | undefined;
2644
2616
  /**
2645
2617
  * Present if the maxWarnings threshold was exceeded.
2646
2618
  */
@@ -2651,9 +2623,9 @@ declare namespace ESLint {
2651
2623
  /**
2652
2624
  * Used to call the underlying formatter.
2653
2625
  * @param results An array of lint results to format.
2654
- * @param resultsMeta An object with an optional `maxWarningsExceeded` property that will be
2626
+ * @param resultsMeta An object with optional `color` and `maxWarningsExceeded` properties that will be
2655
2627
  * passed to the underlying formatter function along with other properties set by ESLint.
2656
- * This argument can be omitted if `maxWarningsExceeded` is not needed.
2628
+ * This argument can be omitted if `color` and `maxWarningsExceeded` are not needed.
2657
2629
  * @return The formatter output.
2658
2630
  */
2659
2631
  format(results: LintResult[], resultsMeta?: ResultsMeta): string | Promise<string>;
@@ -5815,7 +5787,7 @@ interface RuleOptions {
5815
5787
  */
5816
5788
  'quotes'?: Linter.RuleEntry<Quotes>;
5817
5789
  /**
5818
- * Enforce the consistent use of the radix argument when using `parseInt()`
5790
+ * Enforce the use of the radix argument when using `parseInt()`
5819
5791
  * @see https://eslint.org/docs/latest/rules/radix
5820
5792
  */
5821
5793
  'radix'?: Linter.RuleEntry<Radix>;
@@ -7048,11 +7020,6 @@ interface RuleOptions {
7048
7020
  * @see https://sonarsource.github.io/rspec/#/rspec/S3525/javascript
7049
7021
  */
7050
7022
  'sonar/class-prototype'?: Linter.RuleEntry<[]>;
7051
- /**
7052
- * Dynamically executing code is security-sensitive
7053
- * @see https://sonarsource.github.io/rspec/#/rspec/S1523/javascript
7054
- */
7055
- 'sonar/code-eval'?: Linter.RuleEntry<[]>;
7056
7023
  /**
7057
7024
  * Cognitive Complexity of functions should not be too high
7058
7025
  * @see https://sonarsource.github.io/rspec/#/rspec/S3776/javascript
@@ -7197,12 +7164,6 @@ interface RuleOptions {
7197
7164
  * @see https://sonarsource.github.io/rspec/#/rspec/S5542/javascript
7198
7165
  */
7199
7166
  'sonar/encryption-secure-mode'?: Linter.RuleEntry<[]>;
7200
- /**
7201
- * Trailing commas should be used
7202
- * @see https://sonarsource.github.io/rspec/#/rspec/S3723/javascript
7203
- * @deprecated
7204
- */
7205
- 'sonar/enforce-trailing-comma'?: Linter.RuleEntry<SonarEnforceTrailingComma>;
7206
7167
  /**
7207
7168
  * Replacement strings should reference existing regular expression groups
7208
7169
  * @see https://sonarsource.github.io/rspec/#/rspec/S6328/javascript
@@ -7794,6 +7755,11 @@ interface RuleOptions {
7794
7755
  * @see https://sonarsource.github.io/rspec/#/rspec/S2301/javascript
7795
7756
  */
7796
7757
  'sonar/no-selector-parameter'?: Linter.RuleEntry<[]>;
7758
+ /**
7759
+ * Static Assets should not serve session cookies
7760
+ * @see https://sonarsource.github.io/rspec/#/rspec/S8441/javascript
7761
+ */
7762
+ 'sonar/no-session-cookies-on-static-assets'?: Linter.RuleEntry<[]>;
7797
7763
  /**
7798
7764
  * Tests should not be skipped without providing a reason
7799
7765
  * @see https://sonarsource.github.io/rspec/#/rspec/S1607/javascript
@@ -8115,11 +8081,6 @@ interface RuleOptions {
8115
8081
  * @see https://sonarsource.github.io/rspec/#/rspec/S3003/javascript
8116
8082
  */
8117
8083
  'sonar/strings-comparison'?: Linter.RuleEntry<[]>;
8118
- /**
8119
- * "super()" should be invoked appropriately
8120
- * @see https://sonarsource.github.io/rspec/#/rspec/S3854/javascript
8121
- */
8122
- 'sonar/super-invocation'?: Linter.RuleEntry<[]>;
8123
8084
  /**
8124
8085
  * Tables should have headers
8125
8086
  * @see https://sonarsource.github.io/rspec/#/rspec/S5256/javascript
@@ -12002,6 +11963,7 @@ type JsdocTagLines = [] | [("always" | "any" | "never")] | [("always" | "any" |
12002
11963
  endLines?: (number | null);
12003
11964
  maxBlockLines?: (number | null);
12004
11965
  startLines?: (number | null);
11966
+ startLinesWithNoTags?: number;
12005
11967
  tags?: {
12006
11968
  [k: string]: {
12007
11969
  count?: number;
@@ -12821,6 +12783,7 @@ type MaxParams = [] | [(number | {
12821
12783
  maximum?: number;
12822
12784
  max?: number;
12823
12785
  countVoidThis?: boolean;
12786
+ countThis?: ("never" | "except-void" | "always");
12824
12787
  })]; // ----- max-statements -----
12825
12788
  type MaxStatements = [] | [(number | {
12826
12789
  maximum?: number;
@@ -13848,16 +13811,7 @@ type SonarContentLength = [] | [{
13848
13811
  }]; // ----- sonar/cyclomatic-complexity -----
13849
13812
  type SonarCyclomaticComplexity = [] | [{
13850
13813
  threshold?: number;
13851
- }]; // ----- sonar/enforce-trailing-comma -----
13852
- type SonarEnforceTrailingComma = [] | [(_SonarEnforceTrailingCommaValue | {
13853
- arrays?: _SonarEnforceTrailingCommaValueWithIgnore;
13854
- objects?: _SonarEnforceTrailingCommaValueWithIgnore;
13855
- imports?: _SonarEnforceTrailingCommaValueWithIgnore;
13856
- exports?: _SonarEnforceTrailingCommaValueWithIgnore;
13857
- functions?: _SonarEnforceTrailingCommaValueWithIgnore;
13858
- })];
13859
- type _SonarEnforceTrailingCommaValue = ("always-multiline" | "always" | "never" | "only-multiline");
13860
- type _SonarEnforceTrailingCommaValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline"); // ----- sonar/expression-complexity -----
13814
+ }]; // ----- sonar/expression-complexity -----
13861
13815
  type SonarExpressionComplexity = [] | [{
13862
13816
  max?: number;
13863
13817
  }]; // ----- sonar/file-header -----
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DM4wYaYk.mjs";import{FlatConfigComposer as t,renamePluginsInConfigs as n,renamePluginsInRules as r}from"eslint-flat-config-utils";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import{findWorkspaceDir as o}from"pkg-types";import s from"eslint-plugin-antfu";import c from"eslint-plugin-de-morgan";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"@eslint-community/eslint-plugin-eslint-comments/configs";import d from"@eslint/css";import{tailwind3 as f,tailwind4 as p}from"tailwind-csstree";import m from"eslint-plugin-depend";import{fixupPluginRules as h}from"@eslint/compat";import g from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import v from"eslint-config-flat-gitignore";import ee from"@eslint/js";import te from"@stylistic/eslint-plugin";import y from"globals";import ne from"eslint-plugin-jsdoc";import re,{configs as b}from"eslint-plugin-jsonc";import ie from"jsonc-eslint-parser";import x from"@eslint/markdown";import{mergeProcessors as ae,processorPassThrough as oe}from"eslint-merge-processors";import se from"eslint-plugin-n";import S from"eslint-plugin-regexp";import C from"eslint-plugin-sonarjs";import*as w from"empathic/find";import T from"eslint-plugin-toml";import E from"eslint-plugin-unicorn";import ce from"eslint-plugin-yml";const D=`**/*.?([cm])[jt]s?(x)`,O=`**/*.?([cm])ts`,k=`**/*.?([cm])tsx`,A=`.github/workflows/*.y?(a)ml`,j=`**/*.md`,M=`${j}/${D}`,N=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function P(){return[{files:[D],name:`2digits:antfu`,plugins:{antfu:s},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[D],name:`2digits:boolean`,plugins:{boolean:c},rules:{...c.configs.recommended.rules}}]}const I={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react/rsc":`react-rsc`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},L=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],R=r(u.recommended.rules,I);function z(){return[{files:[D],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function B(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function V(e={}){let t=await B(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:d},languageOptions:{tolerant:!0,customSyntax:t},rules:{...d.configs.recommended.rules,...e.overrides}}]}function H(){return[{files:[D],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function U(e){let t=await e;return t.default||t}async function W(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await U(import(`eslint-plugin-drizzle`));return[{files:[D],name:`2digits:drizzle`,plugins:{drizzle:h(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const G=Object.fromEntries(g.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function le(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[A],ignores:[`!**/${A}`],languageOptions:{parser:_},rules:{...G}}]}async function ue(e={}){let{overrides:t={},files:n=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([U(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=r(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:n,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function de(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},v({strict:!1,...t,name:`2digits:gitignore`})]}function fe(e={}){let{overrides:t={}}=e;return[{files:[D],name:`2digits:javascript`,plugins:{stylistic:te},languageOptions:{ecmaVersion:2022,globals:{...y.browser,...y.es2021,...y.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...ee.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function pe(){return[{files:[D],name:`2digits:jsdoc`,plugins:{jsdoc:ne},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function me(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(b[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...b[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:ie},plugins:{jsonc:re}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[j];function he(){return[{name:`2digits:markdown/setup`,plugins:{markdown:x}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ae([x.processors.markdown,oe])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:_e}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}}]}async function ge(){let e=await U(import(`typescript-eslint`)),t=await U(import(`@eslint-react/eslint-plugin`)),n=r({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[M],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...n,"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const _e={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function ve(e={}){let{files:t=[O,k],overrides:n={},parserOptions:i}=e,[a,o]=await Promise.all([U(import(`@next/eslint-plugin-next`)),U(import(`@typescript-eslint/parser`))]),s=r({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:h(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...n}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ye={node:`24.13.1`};function be(){return[{files:[D],name:`2digits:node`,settings:{node:{version:ye.node}},plugins:{node:se},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function xe(){let e=await U(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:await U(import(`jsonc-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await U(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function Se(){let[e,t]=await Promise.all([U(import(`eslint-config-prettier`)),U(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function Ce(t={}){let{files:n=[O,k],overrides:i={},parserOptions:a,tsconfigRootDir:o,reactCompiler:s=!0}=t,[c,l,u,d,f]=await Promise.all([U(import(`@eslint-react/eslint-plugin`)),U(import(`./eslint-plugin-react-hooks-21xKLr_l.mjs`).then(t=>e(t.default,1))),U(import(`@typescript-eslint/parser`)),s?U(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),U(import(`@stylistic/eslint-plugin`))]),p=c.configs.all.plugins,m=r({...c.configs[`disable-conflict-eslint-plugin-react`].rules,...c.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:f,"react-dom":p[`@eslint-react/dom`],"react-web-api":p[`@eslint-react/web-api`],"react-extra":p[`@eslint-react`],"react-hooks":l,"react-hooks-extra":p[`@eslint-react/hooks-extra`],"react-naming-convention":p[`@eslint-react/naming-convention`],"react-rsc":p[`@eslint-react/rsc`],...s?{"react-compiler":d}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:n,languageOptions:{parser:u,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:o,projectService:!0,...a},sourceType:`module`},rules:{...m,...s?{"react-compiler/react-compiler":`error`}:{},"react-extra/no-unnecessary-use-callback":`error`,"react-extra/prefer-use-state-lazy-initialization":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/no-unnecessary-use-ref":`error`,"react-hooks-extra/no-direct-set-state-in-use-effect":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,"react-hooks/rules-of-hooks":`error`,"react-hooks/exhaustive-deps":`warn`,...i}}]}function we(){return[{files:[D],name:`2digits:regexp`,plugins:{regexp:S},rules:{...S.configs[`flat/recommended`].rules}}]}function Te(){return[{files:[D],name:`2digits:sonar`,plugins:{sonar:C},rules:{"sonar/code-eval":`error`,"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Ee(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([U(import(`eslint-plugin-storybook`)),U(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:a}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,"storybook/no-renderer-packages":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function De(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([U(import(`eslint-plugin-tailwindcss`)),U(import(`@2digits/constants`)),o().catch(()=>void 0)]),a=w.file(`tailwind.config.ts`,{last:i})??w.file(`tailwind.config.js`,{last:i});return[{files:[D],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-query`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-query`,plugins:{"tanstack-query":n},rules:{...i,...t}}]}async function ke(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-router`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[D],name:`2digits:tanstack-router`,plugins:{"tanstack-router":n},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Ae=Object.fromEntries(T.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function je(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:T},rules:{...Ae,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Y(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-turbo`));return[{files:[D],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Me(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([U(import(`typescript-eslint`)),U(import(`@2digits/eslint-plugin`))]),c=n(a.strictTypeChecked,I),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[D],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...t}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Ne(){return[{files:[D],name:`2digits:unicorn`,plugins:{unicorn:E},rules:{...E.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"unicorn/filename-case":`off`,"unicorn/prefer-module":`off`,"unicorn/prevent-abbreviations":`off`,"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":`off`}}]}function Pe(){return[{name:`2digits:yaml/setup`,plugins:{yml:ce}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:_}};async function Fe(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-zod`));return[{files:[D],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(e={},...n){let r;e.pnpm===void 0&&(r=o());let i=new t(de(e.ignores),fe(e.js),F(),be(),z(),pe(),Ne(),Te(),we(),P(),me(),je(),Pe(),he(),le());Z(e.css)&&(i=i.append(V(Q(e.css)))),Z(e.depend,!0)&&(i=i.append(H())),Z(e.turbo,a(`turbo`))&&(i=i.append(Y(Q(e.turbo))));let{overrides:s,...c}=Q(e.ts);return Z(e.ts,a(`typescript`))&&(i=i.append(Me(Q(e.ts)))),Z(e.react,a(`react`))&&(i=i.append(Ce({...Q(e.react),...c}))),Z(e.next,a(`next`))&&(i=i.append(ve({...Q(e.next),...c}))),Z(e.storybook,L.some(e=>a(e)))&&(i=i.append(Ee({...Q(e.storybook),...c}))),Z(e.tailwind,a(`tailwindcss`))&&(i=i.append(De(Q(e.tailwind)))),Z(e.tanstackQuery,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(i=i.append(Oe(Q(e.tanstackQuery)))),Z(e.tanstackRouter,a(`@tanstack/react-router`))&&(i=i.append(ke(Q(e.tanstackRouter)))),Z(e.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(i=i.append(W(Q(e.drizzle)))),Z(e.zod,a(`zod`))&&(i=i.append(Fe(Q(e.zod)))),Z(e.graphql,a(`graphql`))&&(i=i.append(ue(Q(e.graphql)))),Z(e.pnpm,!!await r)&&(i=i.append(xe())),i=i.append(...n),a(`prettier`)&&(i=i.append(Se())),i=i.append(ge()),i.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
1
+ import{i as e}from"./chunk-DM4wYaYk.mjs";import{FlatConfigComposer as t,renamePluginsInConfigs as n,renamePluginsInRules as r}from"eslint-flat-config-utils";import{getPackageInfo as i,isPackageExists as a}from"local-pkg";import{findWorkspaceDir as o}from"pkg-types";import s from"eslint-plugin-antfu";import c from"eslint-plugin-de-morgan";import l from"@eslint-community/eslint-plugin-eslint-comments";import u from"@eslint-community/eslint-plugin-eslint-comments/configs";import d from"@eslint/css";import{tailwind3 as f,tailwind4 as p}from"tailwind-csstree";import m from"eslint-plugin-depend";import{fixupPluginRules as h}from"@eslint/compat";import g from"eslint-plugin-github-action";import*as _ from"yaml-eslint-parser";import ee from"eslint-config-flat-gitignore";import te from"@eslint/js";import ne from"@stylistic/eslint-plugin";import v from"globals";import re from"eslint-plugin-jsdoc";import y,{configs as b}from"eslint-plugin-jsonc";import*as x from"jsonc-eslint-parser";import S from"@eslint/markdown";import{mergeProcessors as ie,processorPassThrough as ae}from"eslint-merge-processors";import oe from"eslint-plugin-n";import C from"eslint-plugin-regexp";import w from"eslint-plugin-sonarjs";import*as T from"empathic/find";import E from"eslint-plugin-toml";import D from"eslint-plugin-unicorn";import se from"eslint-plugin-yml";const O=`**/*.?([cm])[jt]s?(x)`,k=`**/*.?([cm])ts`,A=`**/*.?([cm])tsx`,j=`.github/workflows/*.y?(a)ml`,M=`**/*.md`,ce=`${M}/${O}`,N=`**/node_modules,**/dist,**/package-lock.json,**/yarn.lock,**/pnpm-lock.yaml,**/bun.lockb,**/bun.lock,**/output,**/coverage,**/temp,**/.temp,**/tmp,**/.tmp,**/.history,**/.vitepress/cache,**/.nuxt,**/.next,**/.vercel,**/.changeset,**/.idea,**/.cache,**/.output,**/.vite-inspect,**/.yarn,**/CHANGELOG*.md,**/*.min.*,**/LICENSE*,**/__snapshots__,**/auto-import?(s).d.ts,**/components.d.ts`.split(`,`);function P(){return[{files:[O],name:`2digits:antfu`,plugins:{antfu:s},rules:{"antfu/top-level-function":`error`}}]}function F(){return[{files:[O],name:`2digits:boolean`,plugins:{boolean:c},rules:{...c.configs.recommended.rules}}]}const I={"@next/next":`next`,"@eslint-react/naming-convention":`react-naming-convention`,"@eslint-react/hooks-extra":`react-hooks-extra`,"@eslint-react/dom":`react-dom`,"@eslint-react/web-api":`react-web-api`,"@eslint-react/rsc":`react-rsc`,"@eslint-react":`react-extra`,"react-hooks":`react-hooks`,"react-compiler":`react-compiler`,"@stylistic/eslint-plugin":`stylistic`,"@typescript-eslint":`ts`,node:`node`,"@eslint-community/eslint-comments":`comments`,storybook:`storybook`,turbo:`turbo`,jsdoc:`jsdoc`,unicorn:`unicorn`,tailwindcss:`tailwindcss`,"@tanstack/query":`tanstack-query`,"@tanstack/router":`tanstack-router`,"@2digits":`@2digits`,"@graphql-eslint":`gql`,sonarjs:`sonar`,drizzle:`drizzle`,"de-morgan":`boolean`,antfu:`antfu`,css:`css`,depend:`depend`,"github-action":`github-action`,jsonc:`jsonc`,markdown:`markdown`,pnpm:`pnpm`,regexp:`regexp`,yml:`yml`,zod:`zod`,toml:`toml`},L=[`storybook`,`@storybook/nextjs`,`@storybook/nextjs-vite`,`@storybook/react-vite`,`@storybook/react-webpack5`,`@storybook/react-native-web-vite`],R=r(u.recommended.rules,I);function z(){return[{files:[O],name:`2digits:comments`,plugins:{comments:l},rules:{...R,"comments/no-unused-disable":`error`,"comments/disable-enable-pair":[`error`,{allowWholeFile:!0}]}}]}async function B(e){if(e?.customSyntax)return e.customSyntax;if(e?.tailwindMajor===3)return f;if(e?.tailwindMajor===4)return p;try{let e=(await i(`tailwindcss`))?.version??``,t=Number.parseInt(e.split(`.`)[0]||`0`,10);if(Number.isFinite(t)&&t>=4)return p}catch{}return f}async function V(e={}){let t=await B(e);return[{name:`2digits:css`,files:[`**/*.css`],language:`css/css`,plugins:{css:d},languageOptions:{tolerant:!0,customSyntax:t},rules:{...d.configs.recommended.rules,...e.overrides}}]}function H(){return[{files:[O],name:`2digits:depend`,plugins:{depend:m},rules:{"depend/ban-dependencies":`warn`}}]}async function U(e){let t=await e;return t.default||t}async function W(e={}){let{overrides:t={},drizzleObjectName:n=[`drizzle`,`db`]}=e,r=await U(import(`eslint-plugin-drizzle`));return[{files:[O],name:`2digits:drizzle`,plugins:{drizzle:h(r)},rules:{"drizzle/enforce-update-with-where":[`error`,{drizzleObjectName:n}],"drizzle/enforce-delete-with-where":[`error`,{drizzleObjectName:n}],...t}}]}const G=Object.fromEntries(g.configs.recommended.flatMap(({rules:e})=>Object.entries({...e})));function le(){return[{name:`2digits:github-actions/setup`,plugins:{"github-action":g}},{name:`2digits:github-actions/recommended`,files:[j],ignores:[`!**/${j}`],languageOptions:{parser:_},rules:{...G}}]}async function ue(e={}){let{overrides:t={},files:n=[`**/*.graphql`,`**/*.gql`]}=e,[i,a]=await Promise.all([U(import(`@graphql-eslint/eslint-plugin`)),import(`graphql-config`).then(({loadConfig:e})=>e({throwOnEmpty:!1,throwOnMissing:!1}).then(e=>e?.getDefault().schema))]),o=i.configs[`flat/operations-recommended`].rules,s={};if(a)s=o;else for(let e of Object.keys(o)){let t=e.replace(`@graphql-eslint/`,``);t in i.rules&&(i.rules[t].meta.docs?.requiresSchema||i.rules[t].meta.docs?.requiresSiblings)||(s[e]=o[e])}let c=r(s,I);return[{name:`2digits:graphql`,plugins:{gql:i},languageOptions:{parser:i.parser},files:n,rules:{...c,"gql/naming-convention":[`error`,{allowLeadingUnderscore:!0}],...t}}]}function de(e={}){let{gitIgnore:t,ignores:n=[]}=e;return[{ignores:[N,n].flat(),name:`2digits:ignores`},ee({strict:!1,...t,name:`2digits:gitignore`})]}function fe(e={}){let{overrides:t={}}=e;return[{files:[O],name:`2digits:javascript`,plugins:{stylistic:ne},languageOptions:{ecmaVersion:2022,globals:{...v.browser,...v.es2021,...v.node,document:`readonly`,navigator:`readonly`,window:`readonly`},parserOptions:{ecmaFeatures:{jsx:!0},ecmaVersion:2022,sourceType:`module`},sourceType:`module`},linterOptions:{reportUnusedDisableDirectives:!0},rules:{...te.configs.recommended.rules,"accessor-pairs":[`error`,{enforceForClassMembers:!0,setWithoutGet:!0}],"array-callback-return":`error`,"block-scoped-var":`error`,"constructor-super":`error`,"default-case-last":`error`,"dot-notation":[`error`,{allowKeywords:!0}],eqeqeq:[`error`,`smart`],"new-cap":[`error`,{capIsNew:!1,newIsCap:!0,properties:!0}],"no-alert":`error`,"no-array-constructor":`error`,"no-async-promise-executor":`error`,"no-caller":`error`,"no-case-declarations":`error`,"no-class-assign":`error`,"no-compare-neg-zero":`error`,"no-cond-assign":[`error`,`always`],"no-const-assign":`error`,"no-control-regex":`error`,"no-debugger":`error`,"no-delete-var":`error`,"no-dupe-args":`error`,"no-dupe-class-members":`error`,"no-dupe-keys":`error`,"no-duplicate-case":`error`,"no-empty":[`error`,{allowEmptyCatch:!0}],"no-empty-character-class":`error`,"no-empty-pattern":`error`,"no-eval":`error`,"no-ex-assign":`error`,"no-extend-native":`error`,"no-extra-bind":`error`,"no-extra-boolean-cast":`error`,"no-fallthrough":`error`,"no-func-assign":`error`,"no-global-assign":`error`,"no-implied-eval":`error`,"no-import-assign":`error`,"no-invalid-regexp":`error`,"no-irregular-whitespace":`error`,"no-iterator":`error`,"no-labels":[`error`,{allowLoop:!1,allowSwitch:!1}],"no-lone-blocks":`error`,"no-loss-of-precision":`error`,"no-misleading-character-class":`error`,"no-multi-str":`error`,"no-new":`error`,"no-new-func":`error`,"no-new-native-nonconstructor":`error`,"no-new-wrappers":`error`,"no-obj-calls":`error`,"no-octal":`error`,"no-octal-escape":`error`,"no-proto":`error`,"no-prototype-builtins":`error`,"no-redeclare":[`error`,{builtinGlobals:!1}],"no-regex-spaces":`error`,"no-restricted-globals":[`error`,{message:"Use `globalThis` instead.",name:`global`},{message:"Use `globalThis` instead.",name:`self`}],"no-restricted-properties":[`error`,{message:"Use `Object.getPrototypeOf` or `Object.setPrototypeOf` instead.",property:`__proto__`},{message:"Use `Object.defineProperty` instead.",property:`__defineGetter__`},{message:"Use `Object.defineProperty` instead.",property:`__defineSetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupGetter__`},{message:"Use `Object.getOwnPropertyDescriptor` instead.",property:`__lookupSetter__`}],"no-restricted-syntax":[`error`,`DebuggerStatement`,`LabeledStatement`,`WithStatement`,`TSEnumDeclaration`,`TSExportAssignment`],"no-self-assign":[`error`,{props:!0}],"no-self-compare":`error`,"no-sequences":`error`,"no-shadow-restricted-names":`error`,"no-sparse-arrays":`error`,"no-template-curly-in-string":`error`,"no-this-before-super":`error`,"no-throw-literal":`error`,"no-undef":`error`,"no-undef-init":`error`,"no-unexpected-multiline":`error`,"no-unmodified-loop-condition":`error`,"no-unneeded-ternary":[`error`,{defaultAssignment:!1}],"no-unreachable":`error`,"no-unreachable-loop":`error`,"no-unsafe-finally":`error`,"no-unsafe-negation":`error`,"no-unused-expressions":[`error`,{allowShortCircuit:!0,allowTaggedTemplates:!0,allowTernary:!0}],"no-unused-vars":[`error`,{args:`none`,caughtErrors:`none`,ignoreRestSiblings:!0,vars:`all`}],"no-useless-assignment":`off`,"no-useless-backreference":`error`,"no-useless-call":`error`,"no-useless-catch":`error`,"no-useless-computed-key":`error`,"no-useless-constructor":`error`,"no-useless-rename":`error`,"no-var":`error`,"no-with":`error`,"object-shorthand":[`error`,`always`,{avoidQuotes:!0,ignoreConstructors:!1}],"one-var":[`error`,{initialized:`never`}],"prefer-arrow-callback":[`error`,{allowNamedFunctions:!0,allowUnboundThis:!0}],"prefer-const":[`error`,{destructuring:`all`,ignoreReadBeforeAssign:!0}],"prefer-exponentiation-operator":`error`,"prefer-promise-reject-errors":`error`,"prefer-regex-literals":[`error`,{disallowRedundantWrapping:!0}],"prefer-rest-params":`error`,"prefer-spread":`error`,"prefer-template":`error`,"symbol-description":`error`,"unicode-bom":[`error`,`never`],"use-isnan":[`error`,{enforceForIndexOf:!0,enforceForSwitchCase:!0}],"valid-typeof":[`error`,{requireStringLiterals:!0}],"vars-on-top":`error`,yoda:[`error`,`never`],"stylistic/padding-line-between-statements":[`error`,{blankLine:`always`,prev:[`const`,`let`],next:`*`},{blankLine:`any`,prev:[`const`,`let`],next:[`const`,`let`]},{blankLine:`always`,prev:`*`,next:`return`}],...t}}]}function pe(){return[{files:[O],name:`2digits:jsdoc`,plugins:{jsdoc:re},rules:{"jsdoc/check-access":`error`,"jsdoc/check-param-names":`error`,"jsdoc/check-property-names":`error`,"jsdoc/check-types":`error`,"jsdoc/empty-tags":`error`,"jsdoc/implements-on-classes":`error`,"jsdoc/no-defaults":`error`,"jsdoc/no-multi-asterisks":`error`,"jsdoc/require-param-name":`error`,"jsdoc/require-property":`error`,"jsdoc/require-property-description":`error`,"jsdoc/require-property-name":`error`,"jsdoc/require-returns-check":`error`,"jsdoc/require-returns-description":`error`,"jsdoc/require-yields-check":`error`}}]}function me(){return[...b[`flat/base`].map(e=>({...e,name:`2digits:jsonc/base`})),{name:`2digits:jsonc/json`,files:[`**/*.json`],...K,rules:{...q(b[`flat/recommended-with-json`])}},{name:`2digits:jsonc/jsonc`,files:[`**/*.jsonc`],...K,rules:{...q(b[`flat/recommended-with-jsonc`])}},{name:`2digits:jsonc/json5`,files:[`**/*.json5`],...K,rules:{...q(b[`flat/recommended-with-json5`])}},{name:`2digits:jsonc/package.json`,...K,files:[`**/package.json`],rules:{"jsonc/sort-array-values":[`error`,{order:{type:`asc`},pathPattern:`^files$`}],"jsonc/sort-keys":[`error`,{order:`$schema.publisher.name.displayName.version.private.description.funding.homepage.repository.bugs.categories.type.main.module.types.typesVersions.bin.files.exports.icon.unpkg.jsdelivr.sideEffects.activationEvents.contributes.scripts.keywords.author.license.workspaces.dependencies.devDependencies.peerDependencies.peerDependenciesMeta.optionalDependencies.packageManager.engines.pnpm.overrides.resolutions.husky.simple-git-hooks.lint-staged.eslintConfig.prettier`.split(`.`),pathPattern:`^$`},{order:{type:`asc`},pathPattern:`^(?:dev|peer|optional|bundled)?[Dd]ependencies(Meta)?$`},{order:[`types`,`import`,`module`,`require`,`default`],pathPattern:`^exports.*$`}]}},{name:`2digits:jsonc/tsconfig.json`,...K,files:[`**/tsconfig.json`,`**/tsconfig.*.json`,`**/tsconfig-*.json`,`**/jsconfig.json`,`**/jsconfig.*.json`,`**/jsconfig-*.json`],rules:{"jsonc/sort-keys":[`error`,{order:[`$schema`,`extends`,`compilerOptions`,`references`,`files`,`include`,`exclude`],pathPattern:`^$`},{order:`incremental.composite.tsBuildInfoFile.disableSourceOfProjectReferenceRedirect.disableSolutionSearching.disableReferencedProjectLoad.target.lib.jsx.experimentalDecorators.emitDecoratorMetadata.jsxFactory.jsxFragmentFactory.jsxImportSource.reactNamespace.noLib.useDefineForClassFields.moduleDetection.module.rootDir.moduleResolution.baseUrl.paths.rootDirs.typeRoots.types.allowUmdGlobalAccess.moduleSuffixes.allowImportingTsExtensions.resolvePackageJsonExports.resolvePackageJsonImports.customConditions.resolveJsonModule.allowArbitraryExtensions.noResolve.allowJs.checkJs.maxNodeModuleJsDepth.declaration.declarationMap.emitDeclarationOnly.sourceMap.inlineSourceMap.outFile.outDir.removeComments.noEmit.importHelpers.importsNotUsedAsValues.downlevelIteration.sourceRoot.mapRoot.inlineSources.emitBOM.newLine.stripInternal.noEmitHelpers.noEmitOnError.preserveConstEnums.declarationDir.preserveValueImports.isolatedModules.verbatimModuleSyntax.allowSyntheticDefaultImports.esModuleInterop.preserveSymlinks.forceConsistentCasingInFileNames.strict.strictBindCallApply.strictFunctionTypes.strictNullChecks.strictPropertyInitialization.allowUnreachableCode.allowUnusedLabels.alwaysStrict.exactOptionalPropertyTypes.noFallthroughCasesInSwitch.noImplicitAny.noImplicitOverride.noImplicitReturns.noImplicitThis.noPropertyAccessFromIndexSignature.noUncheckedIndexedAccess.noUnusedLocals.noUnusedParameters.useUnknownInCatchVariables.skipDefaultLibCheck.skipLibCheck`.split(`.`),pathPattern:`^compilerOptions$`}]}},...b[`flat/prettier`].map(e=>({...e,name:`2digits:jsonc/prettier`}))]}const K={languageOptions:{parser:x},plugins:{jsonc:y}};function q(e){return Object.fromEntries(e.flatMap(({rules:e})=>Object.entries(e??{})))}const J=[M];function he(){return[{name:`2digits:markdown/setup`,plugins:{markdown:S}},{name:`2digits:markdown/processor`,files:J,language:`markdown/gfm`,ignores:[`**/*.md/*.md`],processor:ie([S.processors.markdown,ae])},{name:`2digits:markdown/parser`,files:J,language:`markdown/gfm`,languageOptions:{parser:_e}},{name:`2digits:markdown/rules`,files:J,language:`markdown/gfm`,rules:{"markdown/fenced-code-language":`error`,"markdown/heading-increment":`error`,"markdown/no-empty-links":`error`,"markdown/no-invalid-label-refs":`error`,"markdown/no-missing-label-refs":`error`}}]}async function ge(){let e=await U(import(`typescript-eslint`)),t=await U(import(`@eslint-react/eslint-plugin`)),n=r({...e.configs.disableTypeChecked.rules,...t.configs[`disable-type-checked`].rules},I);return[{name:`2digits:markdown/disables`,files:[ce],languageOptions:{parser:e.parser,parserOptions:{project:!1,projectService:!1,ecmaFeatures:{impliedStrict:!0}}},rules:{...n,"no-alert":`off`,"no-console":`off`,"no-labels":`off`,"no-lone-blocks":`off`,"no-restricted-syntax":`off`,"no-undef":`off`,"no-unused-expressions":`off`,"no-unused-labels":`off`,"no-unused-vars":`off`,"node/prefer-global/process":`off`,"ts/consistent-type-imports":`off`,"ts/explicit-function-return-type":`off`,"ts/no-namespace":`off`,"ts/no-redeclare":`off`,"ts/no-require-imports":`off`,"ts/no-unused-expressions":`off`,"ts/no-unused-vars":`off`,"ts/no-use-before-define":`off`,"unicode-bom":`off`}}]}const _e={meta:{name:`parser-plain`},parseForESLint:e=>({ast:{body:[],comments:[],loc:{end:e.length,start:0},range:[0,e.length],tokens:[],type:`Program`},scopeManager:null,services:{isPlain:!0},visitorKeys:{Program:[]}})};async function ve(e={}){let{files:t=[k,A],overrides:n={},parserOptions:i}=e,[a,o]=await Promise.all([U(import(`@next/eslint-plugin-next`)),U(import(`@typescript-eslint/parser`))]),s=r({...a.configs.recommended.rules,...a.configs[`core-web-vitals`].rules},I);return[{name:`2digits:next/setup`,plugins:{next:h(a)}},{name:`2digits:next/rules`,files:t,languageOptions:{parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...i},sourceType:`module`},rules:{...s,"next/no-html-link-for-pages":`off`,...n}},{files:[`**/middleware.ts`,`**/proxy.ts`],name:`2digits:next/proxy`,rules:{"unicorn/prefer-string-raw":`off`}}]}var ye={node:`24.13.1`};function be(){return[{files:[O],name:`2digits:node`,settings:{node:{version:ye.node}},plugins:{node:oe},rules:{"node/handle-callback-err":[`error`,`^(err|error)$`],"node/no-deprecated-api":`error`,"node/no-exports-assign":`error`,"node/no-new-require":`error`,"node/no-path-concat":`error`,"node/no-unsupported-features/node-builtins":[`error`,{allowExperimental:!0}],"node/prefer-global/buffer":`error`,"node/prefer-global/process":`error`,"node/prefer-global/text-encoder":`error`,"node/prefer-global/url":`error`,"node/prefer-global/console":`error`,"node/prefer-global/url-search-params":`error`,"node/prefer-global/text-decoder":`error`,"node/process-exit-as-throw":`error`}}]}async function xe(){let e=await U(import(`eslint-plugin-pnpm`));return[{name:`2digits:pnpm/package-json`,files:[`package.json`,`**/package.json`],languageOptions:{parser:x},plugins:{pnpm:e},rules:{"pnpm/json-enforce-catalog":`error`,"pnpm/json-prefer-workspace-settings":`error`,"pnpm/json-valid-catalog":`error`}},{name:`2digits:pnpm/pnpm-workspace-yaml`,files:[`pnpm-workspace.yaml`],languageOptions:{parser:await U(import(`yaml-eslint-parser`))},plugins:{pnpm:e},rules:{"pnpm/yaml-no-duplicate-catalog-item":`error`,"pnpm/yaml-no-unused-catalog-item":`error`,"pnpm/yaml-valid-packages":`error`,"pnpm/yaml-enforce-settings":[`error`,{autofix:!0,settings:{catalogMode:`strict`,savePrefix:``,preferWorkspacePackages:!0,cleanupUnusedCatalogs:!0}}]}}]}async function Se(){let[e,t]=await Promise.all([U(import(`eslint-config-prettier`)),U(import(`@stylistic/eslint-plugin`))]);return[{name:`2digits:prettier`,plugins:{stylistic:t},rules:{...e.rules,"tailwindcss/classnames-order":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}]}}]}async function Ce(t={}){let{files:n=[k,A],overrides:i={},parserOptions:a,tsconfigRootDir:o,reactCompiler:s=!0}=t,[c,l,u,d,f]=await Promise.all([U(import(`@eslint-react/eslint-plugin`)),U(import(`./eslint-plugin-react-hooks-21xKLr_l.mjs`).then(t=>e(t.default,1))),U(import(`@typescript-eslint/parser`)),s?U(import(`eslint-plugin-react-compiler`)):Promise.resolve(void 0),U(import(`@stylistic/eslint-plugin`))]),p=c.configs.all.plugins,m=r({...c.configs[`disable-conflict-eslint-plugin-react`].rules,...c.configs[`recommended-type-checked`].rules},I);return[{name:`2digits:react/setup`,plugins:{stylistic:f,"react-dom":p[`@eslint-react/dom`],"react-web-api":p[`@eslint-react/web-api`],"react-extra":p[`@eslint-react`],"react-hooks":l,"react-hooks-extra":p[`@eslint-react/hooks-extra`],"react-naming-convention":p[`@eslint-react/naming-convention`],"react-rsc":p[`@eslint-react/rsc`],...s?{"react-compiler":d}:{}},settings:{react:{version:`detect`}}},{name:`2digits:react/rules`,files:n,languageOptions:{parser:u,parserOptions:{ecmaFeatures:{jsx:!0},tsconfigRootDir:o,projectService:!0,...a},sourceType:`module`},rules:{...m,...s?{"react-compiler/react-compiler":`error`}:{},"react-extra/no-unnecessary-use-callback":`error`,"react-extra/prefer-use-state-lazy-initialization":`error`,"react-extra/no-unnecessary-use-prefix":`error`,"react-extra/no-unnecessary-use-memo":`error`,"react-extra/no-unnecessary-use-ref":`error`,"react-hooks-extra/no-direct-set-state-in-use-effect":`error`,"react-extra/no-useless-fragment":`off`,"react-extra/prefer-read-only-props":`off`,"react-extra/jsx-shorthand-boolean":`error`,"react-extra/jsx-shorthand-fragment":`error`,"react-extra/prefer-namespace-import":`error`,"react-naming-convention/use-state":`error`,"stylistic/jsx-curly-newline":`off`,"stylistic/jsx-newline":[`error`,{prevent:!1}],"stylistic/jsx-self-closing-comp":`error`,"react-hooks/rules-of-hooks":`error`,"react-hooks/exhaustive-deps":`warn`,...i}}]}function we(){return[{files:[O],name:`2digits:regexp`,plugins:{regexp:C},rules:{...C.configs[`flat/recommended`].rules}}]}function Te(){return[{files:[O],name:`2digits:sonar`,plugins:{sonar:w},rules:{"sonar/cognitive-complexity":`error`,"sonar/comma-or-logical-or-case":`error`,"sonar/concise-regex":`error`,"sonar/confidential-information-logging":`error`,"sonar/constructor-for-side-effects":`error`,"sonar/content-length":`error`,"sonar/content-security-policy":`error`,"sonar/cookie-no-httponly":`error`,"sonar/cors":`error`,"sonar/csrf":`error`,"sonar/max-switch-cases":`error`,"sonar/no-all-duplicated-branches":`error`,"sonar/no-collapsible-if":`error`,"sonar/no-collection-size-mischeck":`error`,"sonar/no-duplicate-string":[`error`,{threshold:5}],"sonar/no-duplicated-branches":`error`,"sonar/no-element-overwrite":`error`,"sonar/no-empty-collection":`error`,"sonar/no-extra-arguments":`error`,"sonar/no-for-in-iterable":`error`,"sonar/no-gratuitous-expressions":`error`,"sonar/no-identical-conditions":`error`,"sonar/no-identical-expressions":`error`,"sonar/no-identical-functions":`error`,"sonar/no-ignored-return":`error`,"sonar/no-inverted-boolean-check":`error`,"sonar/no-nested-switch":`error`,"sonar/no-nested-template-literals":`error`,"sonar/no-redundant-boolean":`error`,"sonar/no-same-line-conditional":`error`,"sonar/no-small-switch":`error`,"sonar/no-unused-collection":`error`,"sonar/no-use-of-empty-return-value":`error`,"sonar/no-useless-catch":`error`,"sonar/non-existent-operator":`error`,"sonar/prefer-immediate-return":`error`,"sonar/prefer-object-literal":`error`,"sonar/prefer-single-boolean-return":`error`,"sonar/prefer-while":`error`,"sonar/elseif-without-else":`off`,"sonar/no-redundant-jump":`off`}}]}async function Ee(e={}){let{files:t=[`**/*.stories.tsx`],overrides:n={},parserOptions:r,storybookDirectory:i=`.storybook`}=e,[a,o]=await Promise.all([U(import(`eslint-plugin-storybook`)),U(import(`@typescript-eslint/parser`))]),s={parser:o,parserOptions:{ecmaFeatures:{jsx:!0},projectService:!0,...r},sourceType:`module`};return[{name:`2digits:storybook/setup`,plugins:{storybook:a}},{name:`2digits:storybook/rules`,files:t,languageOptions:s,rules:{"storybook/await-interactions":`error`,"storybook/context-in-play-function":`error`,"storybook/csf-component":`error`,"storybook/default-exports":`error`,"storybook/hierarchy-separator":`error`,"storybook/meta-inline-properties":`error`,"storybook/no-redundant-story-name":`error`,"storybook/no-stories-of":`error`,"storybook/no-title-property-in-meta":`error`,"storybook/no-uninstalled-addons":`error`,"storybook/prefer-pascal-case":`error`,"storybook/story-exports":`error`,"storybook/use-storybook-expect":`error`,"storybook/use-storybook-testing-library":`error`,"storybook/meta-satisfies-type":`error`,"storybook/no-renderer-packages":`error`,...n}},{name:`2digits:storybook/disables`,files:t,rules:{"react-hooks/rules-of-hooks":`off`,"react/display-name":`off`,"sonar/no-duplicate-string":`off`}},{name:`2digits:storybook/config`,files:[`${i}/main.@(js|cjs|mjs|ts)`],languageOptions:s,rules:{"storybook/no-uninstalled-addons":`error`}}]}async function De(e={}){let{overrides:t={}}=e,[n,{tailwindFunctions:r},i]=await Promise.all([U(import(`eslint-plugin-tailwindcss`)),U(import(`@2digits/constants`)),o().catch(()=>void 0)]),a=T.file(`tailwind.config.ts`,{last:i})??T.file(`tailwind.config.js`,{last:i});return[{files:[O],name:`2digits:tailwind`,plugins:{tailwindcss:n},settings:{tailwindcss:{callees:r,config:a}},rules:{...n.configs.recommended.rules,...t}}]}async function Oe(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-query`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[O],name:`2digits:tanstack-query`,plugins:{"tanstack-query":n},rules:{...i,...t}}]}async function ke(e={}){let{overrides:t={}}=e,n=await U(import(`@tanstack/eslint-plugin-router`)),i=r(n.configs[`flat/recommended`].at(0)?.rules??{},I);return[{files:[O],name:`2digits:tanstack-router`,plugins:{"tanstack-router":n},rules:{...i,"ts/only-throw-error":[`error`,{allow:[{from:`package`,package:`@tanstack/router-core`,name:`Redirect`}]}],...t}}]}const Ae=Object.fromEntries(E.configs.standard.flatMap(({rules:e})=>Object.entries({...e})));function je(){return[{name:`2digits:toml`,files:[`**/*.toml`],language:`toml/toml`,plugins:{toml:E},rules:{...Ae,"toml/array-bracket-spacing":[`error`,`never`],"toml/indent":[`error`,2,{keyValuePairs:1,subTables:1}]}}]}async function Y(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-turbo`));return[{files:[O],name:`2digits:turbo`,plugins:{turbo:n},rules:{"turbo/no-undeclared-env-vars":`error`,...t}}]}async function Me(e={}){let{overrides:t={},parserOptions:r={}}=e,[{plugin:i,configs:a,parser:o},s]=await Promise.all([U(import(`typescript-eslint`)),U(import(`@2digits/eslint-plugin`))]),c=n(a.strictTypeChecked,I),l=Object.fromEntries(c.flatMap(({rules:e})=>Object.entries(e??{})));return[{name:`2digits:typescript/setup`,plugins:{ts:i,"@2digits":s}},{name:`2digits:typescript/rules`,files:[O],languageOptions:{parser:o,parserOptions:{tsconfigRootDir:process.cwd(),projectService:!0,warnOnUnsupportedTypeScriptVersion:!1,...r},sourceType:`module`},rules:{...l,"ts/array-type":[`error`,{default:`generic`,readonly:`generic`}],"ts/restrict-template-expressions":[`error`,{allowNumber:!0}],"ts/ban-ts-comment":[`error`,{"ts-ignore":`allow-with-description`}],"ts/consistent-type-exports":[`error`],"ts/consistent-type-imports":[`error`,{prefer:`type-imports`,disallowTypeAnnotations:!1,fixStyle:`inline-type-imports`}],"ts/no-empty-object-type":[`error`,{allowInterfaces:`with-single-extends`,allowObjectTypes:`never`}],"ts/no-explicit-any":[`error`],"ts/no-import-type-side-effects":[`error`],"ts/no-misused-promises":`off`,"ts/no-confusing-void-expression":`off`,"ts/no-unused-vars":[`error`,{ignoreRestSiblings:!0,argsIgnorePattern:`^_`,varsIgnorePattern:`^_`}],"ts/unbound-method":`off`,...s.configs.recommended.rules,...t}},{name:`2digits:typescript/disables/dts`,files:[`**/*.d.ts`],rules:{"unicorn/no-abusive-eslint-disable":`off`,"no-duplicate-imports":`off`,"no-restricted-syntax":`off`,"ts/no-unused-vars":`off`}},{name:`2digits:typescript/disables/test`,files:[`**/*.{test,spec}.ts?(x)`],rules:{"no-unused-expressions":`off`}},{name:`2digits:typescript/disables/cjs`,files:[`**/*.js`,`**/*.cjs`,`**/*.cts`],rules:{"ts/no-require-imports":`off`,"ts/no-var-requires":`off`}}]}function Ne(){return[{files:[O],name:`2digits:unicorn`,plugins:{unicorn:D},rules:{...D.configs.recommended.rules,"unicorn/no-array-callback-reference":`off`,"unicorn/filename-case":`off`,"unicorn/prefer-module":`off`,"unicorn/prevent-abbreviations":`off`,"unicorn/prefer-ternary":[`error`,`only-single-line`],"unicorn/no-useless-undefined":[`error`,{checkArguments:!1,checkArrowFunctionBody:!1}],"unicorn/prefer-top-level-await":`off`}}]}function Pe(){return[{name:`2digits:yaml/setup`,plugins:{yml:se}},{name:`2digits:yaml/base`,...X,rules:{"no-irregular-whitespace":`off`,"no-unused-vars":`off`,"spaced-comment":`off`}},{name:`2digits:yaml/recommended`,...X,rules:{"yml/no-empty-document":`error`,"yml/no-empty-key":`error`,"yml/no-empty-mapping-value":`error`,"yml/no-empty-sequence-entry":`error`,"yml/no-irregular-whitespace":`error`,"yml/no-tab-indent":`error`,"yml/vue-custom-block/no-parsing-error":`error`}},{name:`2digits:yaml/standard`,...X,rules:{"yml/block-mapping":`error`,"yml/block-sequence":`error`,"yml/plain-scalar":`error`,"yml/spaced-comment":`error`}},{name:`2digits:yaml/prettier`,...X,rules:{"yml/block-mapping-colon-indicator-newline":`off`,"yml/block-mapping-question-indicator-newline":`off`,"yml/block-sequence-hyphen-indicator-newline":`off`,"yml/flow-mapping-curly-newline":`off`,"yml/flow-mapping-curly-spacing":`off`,"yml/flow-sequence-bracket-newline":`off`,"yml/flow-sequence-bracket-spacing":`off`,"yml/indent":`off`,"yml/key-spacing":`off`,"yml/no-multiple-empty-lines":`off`,"yml/no-trailing-zeros":`off`,"yml/quotes":`off`}}]}const X={files:[`**/*.y?(a)ml`],languageOptions:{parser:_}};async function Fe(e={}){let{overrides:t={}}=e,n=await U(import(`eslint-plugin-zod`));return[{files:[O],name:`2digits:zod`,plugins:{zod:n},rules:{"zod/array-style":[`error`,{style:`function`}],"zod/no-any-schema":`error`,"zod/no-empty-custom-schema":`error`,"zod/no-number-schema-with-int":`error`,"zod/no-optional-and-default-together":[`warn`,{preferredMethod:`default`}],"zod/no-throw-in-refine":`error`,"zod/prefer-enum-over-literal-union":`error`,"zod/prefer-meta":`error`,"zod/prefer-meta-last":`error`,"zod/consistent-import":[`error`,{syntax:`namespace`}],"zod/require-brand-type-parameter":`error`,"zod/require-schema-suffix":[`warn`,{suffix:`Schema`}],"zod/schema-error-property-style":[`error`,{selector:`Literal,TemplateLiteral`,example:`"This is an error message"`}],...t}}]}function Z(e,t){return typeof e==`boolean`?e:e?.enable??t??!1}function Q(e){if(typeof e==`boolean`||e===void 0)return{};let{enable:t,...n}=e;return n}async function $(e={},...n){let r;e.pnpm===void 0&&(r=o());let i=new t(de(e.ignores),fe(e.js),F(),be(),z(),pe(),Ne(),Te(),we(),P(),me(),je(),Pe(),he(),le());Z(e.css)&&(i=i.append(V(Q(e.css)))),Z(e.depend,!0)&&(i=i.append(H())),Z(e.turbo,a(`turbo`))&&(i=i.append(Y(Q(e.turbo))));let{overrides:s,...c}=Q(e.ts);return Z(e.ts,a(`typescript`))&&(i=i.append(Me(Q(e.ts)))),Z(e.react,a(`react`))&&(i=i.append(Ce({...Q(e.react),...c}))),Z(e.next,a(`next`))&&(i=i.append(ve({...Q(e.next),...c}))),Z(e.storybook,L.some(e=>a(e)))&&(i=i.append(Ee({...Q(e.storybook),...c}))),Z(e.tailwind,a(`tailwindcss`))&&(i=i.append(De(Q(e.tailwind)))),Z(e.tanstackQuery,a(`react-query`)||a(`@tanstack/react-query`)||a(`@tanstack/react-query-devtools`))&&(i=i.append(Oe(Q(e.tanstackQuery)))),Z(e.tanstackRouter,a(`@tanstack/react-router`))&&(i=i.append(ke(Q(e.tanstackRouter)))),Z(e.drizzle,a(`drizzle-kit`)||a(`drizzle-orm`))&&(i=i.append(W(Q(e.drizzle)))),Z(e.zod,a(`zod`))&&(i=i.append(Fe(Q(e.zod)))),Z(e.graphql,a(`graphql`))&&(i=i.append(ue(Q(e.graphql)))),Z(e.pnpm,!!await r)&&(i=i.append(xe())),i=i.append(...n),a(`prettier`)&&(i=i.append(Se())),i=i.append(ge()),i.renamePlugins(I).toConfigs()}export{$ as default,$ as twoDigits};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "5.1.9",
3
+ "version": "5.1.11",
4
4
  "description": "Effortlessly enforce best practices and catch errors with this comprehensive ESLint configuration for TypeScript, featuring popular plugins like @typescript-eslint, eslint-plugin-react, and eslint-plugin-unicorn.",
5
5
  "homepage": "https://2d-configs.vercel.app/",
6
6
  "repository": {
@@ -28,15 +28,15 @@
28
28
  "@eslint-react/eslint-plugin": "2.13.0",
29
29
  "@eslint/compat": "2.0.2",
30
30
  "@eslint/css": "0.14.1",
31
- "@eslint/js": "9.39.2",
31
+ "@eslint/js": "10.0.1",
32
32
  "@eslint/markdown": "7.5.1",
33
33
  "@graphql-eslint/eslint-plugin": "4.4.0",
34
34
  "@next/eslint-plugin-next": "16.1.6",
35
35
  "@stylistic/eslint-plugin": "5.8.0",
36
36
  "@tanstack/eslint-plugin-query": "5.91.4",
37
- "@tanstack/eslint-plugin-router": "1.155.0",
38
- "@typescript-eslint/parser": "8.55.0",
39
- "@typescript-eslint/utils": "8.55.0",
37
+ "@tanstack/eslint-plugin-router": "1.161.2",
38
+ "@typescript-eslint/parser": "8.56.0",
39
+ "@typescript-eslint/utils": "8.56.0",
40
40
  "empathic": "2.0.0",
41
41
  "eslint-config-flat-gitignore": "2.1.0",
42
42
  "eslint-config-prettier": "10.1.8",
@@ -47,38 +47,38 @@
47
47
  "eslint-plugin-depend": "1.4.0",
48
48
  "eslint-plugin-drizzle": "0.2.3",
49
49
  "eslint-plugin-github-action": "0.1.0",
50
- "eslint-plugin-jsdoc": "62.5.5",
50
+ "eslint-plugin-jsdoc": "62.6.0",
51
51
  "eslint-plugin-jsonc": "2.21.1",
52
52
  "eslint-plugin-n": "17.24.0",
53
53
  "eslint-plugin-pnpm": "1.5.0",
54
54
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
55
55
  "eslint-plugin-regexp": "3.0.0",
56
- "eslint-plugin-sonarjs": "3.0.7",
57
- "eslint-plugin-storybook": "10.2.8",
56
+ "eslint-plugin-sonarjs": "4.0.0",
57
+ "eslint-plugin-storybook": "10.2.10",
58
58
  "eslint-plugin-tailwindcss": "3.18.2",
59
- "eslint-plugin-toml": "1.0.4",
60
- "eslint-plugin-turbo": "2.8.9",
59
+ "eslint-plugin-toml": "1.1.1",
60
+ "eslint-plugin-turbo": "2.8.10",
61
61
  "eslint-plugin-unicorn": "63.0.0",
62
- "eslint-plugin-yml": "3.1.2",
62
+ "eslint-plugin-yml": "3.2.1",
63
63
  "eslint-plugin-zod": "3.1.0",
64
64
  "globals": "17.3.0",
65
65
  "graphql-config": "5.1.5",
66
- "jsonc-eslint-parser": "2.4.2",
66
+ "jsonc-eslint-parser": "3.0.0",
67
67
  "local-pkg": "1.1.2",
68
68
  "pkg-types": "2.3.0",
69
69
  "tailwind-csstree": "0.1.4",
70
- "typescript-eslint": "8.55.0",
70
+ "typescript-eslint": "8.56.0",
71
71
  "yaml-eslint-parser": "2.0.0",
72
- "@2digits/eslint-plugin": "4.0.4",
73
- "@2digits/constants": "1.1.16"
72
+ "@2digits/constants": "1.1.16",
73
+ "@2digits/eslint-plugin": "4.0.4"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@arethetypeswrong/core": "0.18.2",
77
77
  "@eslint/config-inspector": "1.4.2",
78
78
  "@types/react": "19.2.14",
79
- "@typescript/native-preview": "7.0.0-dev.20260215.1",
79
+ "@typescript/native-preview": "7.0.0-dev.20260219.1",
80
80
  "dedent": "1.7.1",
81
- "eslint": "9.39.2",
81
+ "eslint": "10.0.0",
82
82
  "eslint-plugin-react-hooks": "7.0.1",
83
83
  "eslint-typegen": "2.3.0",
84
84
  "publint": "0.3.17",