@2digits/eslint-config 4.10.1 → 4.10.3

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.
Files changed (2) hide show
  1. package/dist/index.d.mts +78 -0
  2. package/package.json +6 -6
package/dist/index.d.mts CHANGED
@@ -339,6 +339,11 @@ interface RuleOptions {
339
339
  * @see https://github.com/eslint/css/blob/main/docs/rules/relative-font-units.md
340
340
  */
341
341
  'css/relative-font-units'?: Linter.RuleEntry<CssRelativeFontUnits>;
342
+ /**
343
+ * Disallow and limit CSS selectors
344
+ * @see https://github.com/eslint/css/blob/main/docs/rules/selector-complexity.md
345
+ */
346
+ 'css/selector-complexity'?: Linter.RuleEntry<CssSelectorComplexity>;
342
347
  /**
343
348
  * Enforce the use of baseline features
344
349
  * @see https://github.com/eslint/css/blob/main/docs/rules/use-baseline.md
@@ -1311,6 +1316,26 @@ interface RuleOptions {
1311
1316
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/text-escaping.md#repos-sticky-header
1312
1317
  */
1313
1318
  'jsdoc/text-escaping'?: Linter.RuleEntry<JsdocTextEscaping>;
1319
+ /**
1320
+ * Prefers either function properties or method signatures
1321
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-method-signature-style.md#repos-sticky-header
1322
+ */
1323
+ 'jsdoc/ts-method-signature-style'?: Linter.RuleEntry<JsdocTsMethodSignatureStyle>;
1324
+ /**
1325
+ * Warns against use of the empty object type
1326
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-empty-object-type.md#repos-sticky-header
1327
+ */
1328
+ 'jsdoc/ts-no-empty-object-type'?: Linter.RuleEntry<[]>;
1329
+ /**
1330
+ * Catches unnecessary template expressions such as string expressions within a template literal.
1331
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-no-unnecessary-template-expression.md#repos-sticky-header
1332
+ */
1333
+ 'jsdoc/ts-no-unnecessary-template-expression'?: Linter.RuleEntry<JsdocTsNoUnnecessaryTemplateExpression>;
1334
+ /**
1335
+ * Prefers function types over call signatures when there are no other properties.
1336
+ * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/ts-prefer-function-type.md#repos-sticky-header
1337
+ */
1338
+ 'jsdoc/ts-prefer-function-type'?: Linter.RuleEntry<JsdocTsPreferFunctionType>;
1314
1339
  /**
1315
1340
  * Formats JSDoc type values.
1316
1341
  * @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/type-formatting.md#repos-sticky-header
@@ -3608,6 +3633,10 @@ interface RuleOptions {
3608
3633
  * Validates usage of the useMemo() hook against common mistakes. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
3609
3634
  */
3610
3635
  'react-hooks/use-memo'?: Linter.RuleEntry<ReactHooksUseMemo>;
3636
+ /**
3637
+ * Validates that useMemos always return a value. See [`useMemo()` docs](https://react.dev/reference/react/useMemo) for more information.
3638
+ */
3639
+ 'react-hooks/void-use-memo'?: Linter.RuleEntry<ReactHooksVoidUseMemo>;
3611
3640
  /**
3612
3641
  * Enforces naming conventions for components.
3613
3642
  * @see https://eslint-react.xyz/docs/rules/naming-convention-component-name
@@ -7912,6 +7941,23 @@ type CssPreferLogicalProperties = [] | [{
7912
7941
  type CssRelativeFontUnits = [] | [{
7913
7942
  allowUnits?: ("%" | "cap" | "ch" | "em" | "ex" | "ic" | "lh" | "rcap" | "rch" | "rem" | "rex" | "ric" | "rlh")[];
7914
7943
  }];
7944
+ // ----- css/selector-complexity -----
7945
+ type CssSelectorComplexity = [] | [{
7946
+ maxIds?: number;
7947
+ maxClasses?: number;
7948
+ maxTypes?: number;
7949
+ maxAttributes?: number;
7950
+ maxPseudoClasses?: number;
7951
+ maxUniversals?: number;
7952
+ maxCompounds?: number;
7953
+ maxCombinators?: number;
7954
+ disallowCombinators?: string[];
7955
+ disallowPseudoClasses?: string[];
7956
+ disallowPseudoElements?: string[];
7957
+ disallowAttributes?: string[];
7958
+ disallowAttributeMatchers?: string[];
7959
+ [k: string]: unknown | undefined;
7960
+ }];
7915
7961
  // ----- css/use-baseline -----
7916
7962
  type CssUseBaseline = [] | [{
7917
7963
  available?: (("widely" | "newly") | number);
@@ -8782,16 +8828,44 @@ type JsdocTextEscaping = [] | [{
8782
8828
  escapeHTML?: boolean;
8783
8829
  escapeMarkdown?: boolean;
8784
8830
  }];
8831
+ // ----- jsdoc/ts-method-signature-style -----
8832
+ type JsdocTsMethodSignatureStyle = [] | [("method" | "property")] | [("method" | "property"), {
8833
+ enableFixer?: boolean;
8834
+ }];
8835
+ // ----- jsdoc/ts-no-unnecessary-template-expression -----
8836
+ type JsdocTsNoUnnecessaryTemplateExpression = [] | [{
8837
+ enableFixer?: boolean;
8838
+ }];
8839
+ // ----- jsdoc/ts-prefer-function-type -----
8840
+ type JsdocTsPreferFunctionType = [] | [{
8841
+ enableFixer?: boolean;
8842
+ }];
8785
8843
  // ----- jsdoc/type-formatting -----
8786
8844
  type JsdocTypeFormatting = [] | [{
8787
8845
  arrayBrackets?: ("angle" | "square");
8846
+ arrowFunctionPostReturnMarkerSpacing?: string;
8847
+ arrowFunctionPreReturnMarkerSpacing?: string;
8788
8848
  enableFixer?: boolean;
8849
+ functionOrClassParameterSpacing?: string;
8850
+ functionOrClassPostGenericSpacing?: string;
8851
+ functionOrClassPostReturnMarkerSpacing?: string;
8852
+ functionOrClassPreReturnMarkerSpacing?: string;
8853
+ functionOrClassTypeParameterSpacing?: string;
8854
+ genericAndTupleElementSpacing?: string;
8789
8855
  genericDot?: boolean;
8856
+ keyValuePostColonSpacing?: string;
8857
+ keyValuePostKeySpacing?: string;
8858
+ keyValuePostOptionalSpacing?: string;
8859
+ keyValuePostVariadicSpacing?: string;
8860
+ methodQuotes?: ("double" | "single");
8790
8861
  objectFieldIndent?: string;
8791
8862
  objectFieldQuote?: ("double" | "single" | null);
8792
8863
  objectFieldSeparator?: ("comma" | "comma-and-linebreak" | "linebreak" | "semicolon" | "semicolon-and-linebreak");
8793
8864
  objectFieldSeparatorOptionalLinebreak?: boolean;
8794
8865
  objectFieldSeparatorTrailingPunctuation?: boolean;
8866
+ parameterDefaultValueSpacing?: string;
8867
+ postMethodNameSpacing?: string;
8868
+ postNewSpacing?: string;
8795
8869
  separatorForSingleObjectField?: boolean;
8796
8870
  stringQuotes?: ("double" | "single");
8797
8871
  typeBracketSpacing?: string;
@@ -10637,6 +10711,10 @@ type ReactHooksUnsupportedSyntax = [] | [{
10637
10711
  type ReactHooksUseMemo = [] | [{
10638
10712
  [k: string]: unknown | undefined;
10639
10713
  }];
10714
+ // ----- react-hooks/void-use-memo -----
10715
+ type ReactHooksVoidUseMemo = [] | [{
10716
+ [k: string]: unknown | undefined;
10717
+ }];
10640
10718
  // ----- react-naming-convention/component-name -----
10641
10719
  type ReactNamingConventionComponentName = [] | [(("PascalCase" | "CONSTANT_CASE") | {
10642
10720
  allowAllCaps?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "4.10.1",
3
+ "version": "4.10.3",
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": {
@@ -29,7 +29,7 @@
29
29
  "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
30
30
  "@eslint-react/eslint-plugin": "2.0.6",
31
31
  "@eslint/compat": "1.4.0",
32
- "@eslint/css": "0.12.0",
32
+ "@eslint/css": "0.13.0",
33
33
  "@eslint/js": "9.37.0",
34
34
  "@eslint/markdown": "7.4.0",
35
35
  "@graphql-eslint/eslint-plugin": "4.4.0",
@@ -49,12 +49,12 @@
49
49
  "eslint-plugin-depend": "1.3.1",
50
50
  "eslint-plugin-drizzle": "0.2.3",
51
51
  "eslint-plugin-github-action": "0.0.16",
52
- "eslint-plugin-jsdoc": "60.8.3",
52
+ "eslint-plugin-jsdoc": "61.1.0",
53
53
  "eslint-plugin-jsonc": "2.21.0",
54
54
  "eslint-plugin-n": "17.23.1",
55
55
  "eslint-plugin-pnpm": "1.2.0",
56
56
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
57
- "eslint-plugin-react-hooks": "6.1.1",
57
+ "eslint-plugin-react-hooks": "7.0.0",
58
58
  "eslint-plugin-regexp": "2.10.0",
59
59
  "eslint-plugin-sonarjs": "3.0.5",
60
60
  "eslint-plugin-storybook": "9.1.10",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@eslint/config-inspector": "1.3.0",
78
- "@types/react": "19.2.0",
78
+ "@types/react": "19.2.2",
79
79
  "dedent": "1.7.0",
80
80
  "eslint": "9.37.0",
81
81
  "eslint-typegen": "2.3.0",
@@ -85,7 +85,7 @@
85
85
  "tsdown": "0.15.6",
86
86
  "typescript": "5.9.3",
87
87
  "vitest": "3.2.4",
88
- "@2digits/tsconfig": "0.8.3"
88
+ "@2digits/tsconfig": "0.8.4"
89
89
  },
90
90
  "scripts": {
91
91
  "build": "tsdown --minify --config-loader unconfig",