@2digits/eslint-config 4.6.0 → 4.6.2

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 +86 -2
  2. package/package.json +16 -16
package/dist/index.d.mts CHANGED
@@ -1397,11 +1397,26 @@ interface RuleOptions {
1397
1397
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/heading-increment.md
1398
1398
  */
1399
1399
  'markdown/heading-increment'?: Linter.RuleEntry<[]>;
1400
+ /**
1401
+ * Disallow duplicate definitions
1402
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-definitions.md
1403
+ */
1404
+ 'markdown/no-duplicate-definitions'?: Linter.RuleEntry<MarkdownNoDuplicateDefinitions>;
1400
1405
  /**
1401
1406
  * Disallow duplicate headings in the same document
1402
1407
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-duplicate-headings.md
1403
1408
  */
1404
1409
  'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>;
1410
+ /**
1411
+ * Disallow empty definitions
1412
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
1413
+ */
1414
+ 'markdown/no-empty-definitions'?: Linter.RuleEntry<[]>;
1415
+ /**
1416
+ * Disallow empty images
1417
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md
1418
+ */
1419
+ 'markdown/no-empty-images'?: Linter.RuleEntry<[]>;
1405
1420
  /**
1406
1421
  * Disallow empty links
1407
1422
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-links.md
@@ -1417,11 +1432,31 @@ interface RuleOptions {
1417
1432
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-invalid-label-refs.md
1418
1433
  */
1419
1434
  'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>;
1435
+ /**
1436
+ * Disallow headings without a space after the hash characters
1437
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-atx-heading-space.md
1438
+ */
1439
+ 'markdown/no-missing-atx-heading-space'?: Linter.RuleEntry<[]>;
1420
1440
  /**
1421
1441
  * Disallow missing label references
1422
1442
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-missing-label-refs.md
1423
1443
  */
1424
1444
  'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>;
1445
+ /**
1446
+ * Disallow multiple H1 headings in the same document
1447
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-multiple-h1.md
1448
+ */
1449
+ 'markdown/no-multiple-h1'?: Linter.RuleEntry<MarkdownNoMultipleH1>;
1450
+ /**
1451
+ * Require alternative text for images
1452
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
1453
+ */
1454
+ 'markdown/require-alt-text'?: Linter.RuleEntry<[]>;
1455
+ /**
1456
+ * Disallow data rows in a GitHub Flavored Markdown table from having more cells than the header row
1457
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/table-column-count.md
1458
+ */
1459
+ 'markdown/table-column-count'?: Linter.RuleEntry<[]>;
1425
1460
  /**
1426
1461
  * Enforce a maximum number of classes per file
1427
1462
  * @see https://eslint.org/docs/latest/rules/max-classes-per-file
@@ -2531,6 +2566,11 @@ interface RuleOptions {
2531
2566
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-sync.md
2532
2567
  */
2533
2568
  'node/no-sync'?: Linter.RuleEntry<NodeNoSync>;
2569
+ /**
2570
+ * disallow top-level `await` in published modules
2571
+ * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-top-level-await.md
2572
+ */
2573
+ 'node/no-top-level-await'?: Linter.RuleEntry<NodeNoTopLevelAwait>;
2534
2574
  /**
2535
2575
  * disallow `bin` files that npm ignores
2536
2576
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-unpublished-bin.md
@@ -2912,6 +2952,11 @@ interface RuleOptions {
2912
2952
  * @see https://eslint-react.xyz/docs/rules/jsx-no-duplicate-props
2913
2953
  */
2914
2954
  'react-extra/jsx-no-duplicate-props'?: Linter.RuleEntry<[]>;
2955
+ /**
2956
+ * Disallows 'IIFE' in JSX elements.
2957
+ * @see https://eslint-react.xyz/docs/rules/jsx-no-iife
2958
+ */
2959
+ 'react-extra/jsx-no-iife'?: Linter.RuleEntry<[]>;
2915
2960
  /**
2916
2961
  * Disallow undefined variables in JSX.
2917
2962
  * @see https://eslint-react.xyz/docs/rules/jsx-no-undef
@@ -3621,7 +3666,7 @@ interface RuleOptions {
3621
3666
  * enforce using quantifier
3622
3667
  * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html
3623
3668
  */
3624
- 'regexp/prefer-quantifier'?: Linter.RuleEntry<[]>;
3669
+ 'regexp/prefer-quantifier'?: Linter.RuleEntry<RegexpPreferQuantifier>;
3625
3670
  /**
3626
3671
  * enforce using `?` quantifier
3627
3672
  * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-question-quantifier.html
@@ -8964,10 +9009,19 @@ type LogicalAssignmentOperators = (([] | ["always"] | ["always", {
8964
9009
  type MarkdownFencedCodeLanguage = [] | [{
8965
9010
  required?: string[];
8966
9011
  }];
9012
+ // ----- markdown/no-duplicate-definitions -----
9013
+ type MarkdownNoDuplicateDefinitions = [] | [{
9014
+ allowDefinitions?: string[];
9015
+ allowFootnoteDefinitions?: string[];
9016
+ }];
8967
9017
  // ----- markdown/no-html -----
8968
9018
  type MarkdownNoHtml = [] | [{
8969
9019
  allowed?: string[];
8970
9020
  }];
9021
+ // ----- markdown/no-multiple-h1 -----
9022
+ type MarkdownNoMultipleH1 = [] | [{
9023
+ frontmatterTitle?: string;
9024
+ }];
8971
9025
  // ----- max-classes-per-file -----
8972
9026
  type MaxClassesPerFile = [] | [(number | {
8973
9027
  ignoreExpressions?: boolean;
@@ -9610,7 +9664,33 @@ type NodeNoRestrictedRequire = [] | [(string | {
9610
9664
  // ----- node/no-sync -----
9611
9665
  type NodeNoSync = [] | [{
9612
9666
  allowAtRootLevel?: boolean;
9613
- ignores?: string[];
9667
+ ignores?: (string | {
9668
+ from?: "file";
9669
+ path?: string;
9670
+ name?: string[];
9671
+ } | {
9672
+ from?: "lib";
9673
+ name?: string[];
9674
+ } | {
9675
+ from?: "package";
9676
+ package?: string;
9677
+ name?: string[];
9678
+ })[];
9679
+ }];
9680
+ // ----- node/no-top-level-await -----
9681
+ type NodeNoTopLevelAwait = [] | [{
9682
+ ignoreBin?: boolean;
9683
+ convertPath?: ({
9684
+ [k: string]: [string, string];
9685
+ } | [{
9686
+ include: [string, ...(string)[]];
9687
+ exclude?: string[];
9688
+ replace: [string, string];
9689
+ }, ...({
9690
+ include: [string, ...(string)[]];
9691
+ exclude?: string[];
9692
+ replace: [string, string];
9693
+ })[]]);
9614
9694
  }];
9615
9695
  // ----- node/no-unpublished-bin -----
9616
9696
  type NodeNoUnpublishedBin = [] | [{
@@ -10038,6 +10118,10 @@ type RegexpPreferLookaround = [] | [{
10038
10118
  type RegexpPreferNamedReplacement = [] | [{
10039
10119
  strictTypes?: boolean;
10040
10120
  }];
10121
+ // ----- regexp/prefer-quantifier -----
10122
+ type RegexpPreferQuantifier = [] | [{
10123
+ allows?: string[];
10124
+ }];
10041
10125
  // ----- regexp/prefer-range -----
10042
10126
  type RegexpPreferRange = [] | [{
10043
10127
  target?: (("all" | "alphanumeric") | [("all" | "alphanumeric")] | [("alphanumeric" | string), ...(("alphanumeric" | string))[]]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2digits/eslint-config",
3
- "version": "4.6.0",
3
+ "version": "4.6.2",
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": {
@@ -27,17 +27,17 @@
27
27
  "public": true,
28
28
  "dependencies": {
29
29
  "@eslint-community/eslint-plugin-eslint-comments": "4.5.0",
30
- "@eslint-react/eslint-plugin": "1.50.0",
30
+ "@eslint-react/eslint-plugin": "1.51.0",
31
31
  "@eslint/compat": "1.2.9",
32
32
  "@eslint/css": "0.8.1",
33
33
  "@eslint/js": "9.28.0",
34
- "@eslint/markdown": "6.4.0",
34
+ "@eslint/markdown": "6.5.0",
35
35
  "@graphql-eslint/eslint-plugin": "4.4.0",
36
36
  "@next/eslint-plugin-next": "15.3.3",
37
- "@stylistic/eslint-plugin": "4.4.0",
37
+ "@stylistic/eslint-plugin": "4.4.1",
38
38
  "@tanstack/eslint-plugin-query": "5.78.0",
39
- "@typescript-eslint/parser": "8.33.0",
40
- "@typescript-eslint/utils": "8.33.0",
39
+ "@typescript-eslint/parser": "8.33.1",
40
+ "@typescript-eslint/utils": "8.33.1",
41
41
  "eslint-config-flat-gitignore": "2.1.0",
42
42
  "eslint-config-prettier": "10.1.5",
43
43
  "eslint-flat-config-utils": "2.1.0",
@@ -45,15 +45,15 @@
45
45
  "eslint-plugin-antfu": "3.1.1",
46
46
  "eslint-plugin-de-morgan": "1.2.1",
47
47
  "eslint-plugin-drizzle": "0.2.3",
48
- "eslint-plugin-jsdoc": "50.7.0",
48
+ "eslint-plugin-jsdoc": "50.7.1",
49
49
  "eslint-plugin-jsonc": "2.20.1",
50
- "eslint-plugin-n": "17.18.0",
50
+ "eslint-plugin-n": "17.19.0",
51
51
  "eslint-plugin-pnpm": "0.3.1",
52
52
  "eslint-plugin-react-compiler": "19.1.0-rc.2",
53
53
  "eslint-plugin-react-hooks": "5.2.0",
54
- "eslint-plugin-regexp": "2.7.0",
54
+ "eslint-plugin-regexp": "2.8.0",
55
55
  "eslint-plugin-sonarjs": "3.0.2",
56
- "eslint-plugin-storybook": "9.0.3",
56
+ "eslint-plugin-storybook": "9.0.5",
57
57
  "eslint-plugin-tailwindcss": "3.18.0",
58
58
  "eslint-plugin-turbo": "2.5.4",
59
59
  "eslint-plugin-unicorn": "59.0.1",
@@ -63,14 +63,14 @@
63
63
  "graphql-config": "5.1.5",
64
64
  "jsonc-eslint-parser": "2.4.0",
65
65
  "local-pkg": "1.1.1",
66
- "typescript-eslint": "8.33.0",
66
+ "typescript-eslint": "8.33.1",
67
67
  "yaml-eslint-parser": "1.3.0",
68
- "@2digits/eslint-plugin": "3.1.0",
69
- "@2digits/constants": "1.1.0"
68
+ "@2digits/constants": "1.1.1",
69
+ "@2digits/eslint-plugin": "3.1.2"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@eslint/config-inspector": "1.0.2",
73
- "@types/node": "22.15.29",
73
+ "@types/node": "22.15.30",
74
74
  "@types/react": "19.1.6",
75
75
  "dedent": "1.6.0",
76
76
  "eslint": "9.28.0",
@@ -78,9 +78,9 @@
78
78
  "execa": "9.6.0",
79
79
  "react": "19.1.0",
80
80
  "tinyglobby": "0.2.14",
81
- "tsdown": "0.12.6",
81
+ "tsdown": "0.12.7",
82
82
  "typescript": "5.8.3",
83
- "vitest": "3.1.4",
83
+ "vitest": "3.2.2",
84
84
  "@2digits/tsconfig": "0.7.1"
85
85
  },
86
86
  "scripts": {