Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(dev-deps): update @typescript-eslint/* plugins to v6 (major) #4857

Conversation

aloisklink
Copy link
Member

📑 Summary

Update the @typescript-eslint/eslint-plugin and @typescript-eslint/parser plugin to v6.

This fixes the following warning when running pnpm run lint:

=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0

YOUR TYPESCRIPT VERSION: 5.1.3

Please only submit bug reports when using the officially supported version.

=============

📏 Design Decisions

Upgrading the @typescript-eslint/* packages from v5 to v6 is a major change, but luckily, there's a easy-to-read list of the big changes in the Announcing typescript-eslint v6 blog post. The ones that affect us are:

  • Dropped support for Node.JS v14. This isn't a big deal for us, since Mermaid uses a version of eslint-plugin-jsdoc that does not support Node.JS v14 either, see 1200299 (chore(deps): update dependency eslint-plugin-jsdoc to v46, 2023-06-27)
  • Changes to the plugin:@typescript-eslint/recommended configuration. I've manually changed the following two rules to match their old @typescript-eslint/parser v5 settings, to avoid turning ESLint warnings into errors:
    • @typescript-eslint/no-explicit-any to warn
    • @typescript-eslint/no-unused-vars to warn

pnpm run lint ESLint output changes ((0 errors, 110 warnings) -> (0 errors, 93 warnings))

Current (as of 8be8736)

alois@my-pc:~/Documents/mermaid (develop)$ pnpm install && pnpm exec eslint --ignore-path .gitignore .
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
Already up to date
. prepare$ husky install && pnpm build
[212 lines collapsed]
│   file: 'detector.ts'
│ }
│ vite v4.3.9 building for production...
│ transforming...
│ ✓ 5 modules transformed.
│ rendering chunks...
│ computing gzip size...
│ packages/mermaid-zenuml/dist/mermaid-zenuml.core.mjs        0.29 kB │ gzip: 0.20 kB
│ packages/mermaid-zenuml/dist/zenuml-definition-981ee032.js  2.65 kB │ gzip: 1.04 kB
│ ✓ built in 25ms
└─ Done in 41.6s
Done in 43.2s
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0

YOUR TYPESCRIPT VERSION: 5.1.3

Please only submit bug reports when using the officially supported version.

=============

/home/alois/Documents/mermaid/packages/mermaid-example-diagram/src/types/index.d.ts
  5:14  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid-zenuml/src/mermaidUtils.ts
  34:10  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  35:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  36:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  42:17  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  43:15  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  44:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  45:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/scripts/create-types-from-json-schema.mts
  122:74  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  146:65  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  163:66  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/scripts/docs.mts
  246:23  warning  '_file' is defined but never used         @typescript-eslint/no-unused-vars
  246:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/Diagram.ts
  9:81  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/config.ts
  146:35  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/defaultConfig.ts
  258:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagram-api/regexes.ts
  9:3  warning  Unsafe regular expression  unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/classDb.ts
   35:16  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  314:36  warning  Unsafe regular expression                 unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/classRenderer-v2.ts
   45:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   89:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  290:39  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  305:90  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/classRenderer.js
  12:1  warning  JSDoc @returns declaration present but return expression not available in function  jsdoc/require-returns-check

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/svgDraw.js
  321:53  warning  'diagObj' is defined but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js
   65:11  warning  'vertexNode' is defined but never used                                                             @typescript-eslint/no-unused-vars
  189:15  warning  'svgLabel' is assigned a value but never used                                                      @typescript-eslint/no-unused-vars
  396:1   warning  Expected @param names to be "edges, diagObj, graph, svg". Got "edges, g, cy, diagObj, graph, svg"  jsdoc/check-param-names
  775:1   warning  Expected @param names to be "nodeArray, parentLookupDb". Got "graph, nodeArray, parentLookupDb"    jsdoc/check-param-names

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/flowchart/flowDb.js
   56:1   warning  Expected @param names to be "_id, textObj, type, style, classes, dir, props". Got "_id, text, textObj, type, style, classes, dir, props"  jsdoc/check-param-names
  130:1   warning  @param "linkText" does not match an existing function parameter                                                                           jsdoc/check-param-names
  289:34  warning  Unsafe regular expression                                                                                                                 unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js
  196:45  warning  'diagObj' is defined but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/gantt/ganttDb.js
  335:21  warning  Unsafe regular expression  unicorn/no-unsafe-regex
  647:34  warning  Unsafe regular expression  unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/mindmap/mindmapRenderer.js
   94:1  warning  @param "cy" does not match an existing function parameter                  jsdoc/check-param-names
  137:1  warning  Expected @param names to be "cy". Got "node, cy, positionedMindmap, conf"  jsdoc/check-param-names

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/mindmap/svgDraw.js
   10:10  warning  'wrap' is defined but never used               @typescript-eslint/no-unused-vars
  189:9   warning  'shapeSvg' is assigned a value but never used  @typescript-eslint/no-unused-vars
  225:9   warning  'newEl' is assigned a value but never used     @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/quadrant-chart/parser/quadrant.jison.spec.ts
  12:35  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  12:40  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/sankey/sankeyRenderer.ts
   45:31  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   45:31  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   45:31  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   52:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   65:32  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   66:34  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   67:44  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   68:48  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   69:34  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   70:34  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   71:42  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
   98:17  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  123:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  124:37  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  127:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  128:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  130:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  133:24  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  134:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  152:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  153:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  155:30  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  175:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  177:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  178:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  183:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  188:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  191:17  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  194:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  197:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  200:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  210:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts
   240:34  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   815:27  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  1118:27  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  1119:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  1242:27  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/timeline/svgDraw.js
  261:7  warning  'xPos' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/timeline/timelineDb.js
  77:1  warning  The type 'timelineDb' is undefined  jsdoc/no-undefined-types

/home/alois/Documents/mermaid/packages/mermaid/src/docs/vite.config.ts
  94:69  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/mermaid.ts
  287:65  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  287:76  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/mermaidAPI.spec.ts
  523:24  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  526:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  529:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  535:24  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  543:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  547:19  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  551:29  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  578:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  600:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  613:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  628:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  645:14  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
  645:14  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
  645:14  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion

/home/alois/Documents/mermaid/packages/mermaid/src/mermaidAPI.ts
   63:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  393:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  412:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
  412:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
  430:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
  430:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion

/home/alois/Documents/mermaid/packages/mermaid/src/themes/theme-base.js
  1:51  warning  'toRgba' is defined but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/types.ts
  33:10  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/utils.spec.ts
  129:16  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/utils.ts
   65:3   warning  Unsafe regular expression                 unicorn/no-unsafe-regex
  534:43  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/utils/sanitizeDirective.ts
  9:41  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 110 problems (0 errors, 110 warnings)

This PR (as of d4289e8)

alois@my-pc:~/Documents/mermaid (build/update-@typescript-eslint-to-v6)$ pnpm install && pnpm exec eslint --ignore-path .gitignore .
Scope: all 6 workspace projects
Lockfile is up to date, resolution step is skipped
Packages: +17 -4
+++++++++++++++++----
Progress: resolved 17, reused 17, downloaded 0, added 0, done

devDependencies:
- @typescript-eslint/eslint-plugin 5.59.0
+ @typescript-eslint/eslint-plugin 6.7.2
- @typescript-eslint/parser 5.59.0
+ @typescript-eslint/parser 6.7.2

. prepare$ husky install && pnpm build
[212 lines collapsed]
│   file: 'detector.ts'
│ }
│ vite v4.3.9 building for production...
│ transforming...
│ ✓ 5 modules transformed.
│ rendering chunks...
│ computing gzip size...
│ packages/mermaid-zenuml/dist/mermaid-zenuml.core.mjs        0.29 kB │ gzip: 0.20 kB
│ packages/mermaid-zenuml/dist/zenuml-definition-981ee032.js  2.65 kB │ gzip: 1.04 kB
│ ✓ built in 23ms
└─ Done in 41.1s
Done in 42.8s

/home/alois/Documents/mermaid/packages/mermaid-example-diagram/src/types/index.d.ts
  5:14  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid-zenuml/src/mermaidUtils.ts
  34:10  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  35:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  36:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  42:17  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  43:15  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  44:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  45:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/scripts/create-types-from-json-schema.mts
  122:74  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  146:65  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  163:66  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/scripts/docs.mts
  246:23  warning  '_file' is defined but never used         @typescript-eslint/no-unused-vars
  246:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/Diagram.ts
  9:81  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/config.ts
  146:35  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/defaultConfig.ts
  258:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagram-api/regexes.ts
  9:3  warning  Unsafe regular expression  unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/classDb.ts
   35:16  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  314:36  warning  Unsafe regular expression                 unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/classRenderer-v2.ts
   45:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   89:12  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  290:39  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  305:90  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/classRenderer.js
  12:1  warning  JSDoc @returns declaration present but return expression not available in function  jsdoc/require-returns-check

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/class/svgDraw.js
  321:53  warning  'diagObj' is defined but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/flowchart/elk/flowRenderer-elk.js
   65:11  warning  'vertexNode' is defined but never used                                                             @typescript-eslint/no-unused-vars
  189:15  warning  'svgLabel' is assigned a value but never used                                                      @typescript-eslint/no-unused-vars
  396:1   warning  Expected @param names to be "edges, diagObj, graph, svg". Got "edges, g, cy, diagObj, graph, svg"  jsdoc/check-param-names
  775:1   warning  Expected @param names to be "nodeArray, parentLookupDb". Got "graph, nodeArray, parentLookupDb"    jsdoc/check-param-names

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/flowchart/flowDb.js
   56:1   warning  Expected @param names to be "_id, textObj, type, style, classes, dir, props". Got "_id, text, textObj, type, style, classes, dir, props"  jsdoc/check-param-names
  130:1   warning  @param "linkText" does not match an existing function parameter                                                                           jsdoc/check-param-names
  289:34  warning  Unsafe regular expression                                                                                                                 unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/flowchart/flowRenderer-v2.js
  196:45  warning  'diagObj' is defined but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/gantt/ganttDb.js
  335:21  warning  Unsafe regular expression  unicorn/no-unsafe-regex
  647:34  warning  Unsafe regular expression  unicorn/no-unsafe-regex

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/mindmap/mindmapRenderer.js
   94:1  warning  @param "cy" does not match an existing function parameter                  jsdoc/check-param-names
  137:1  warning  Expected @param names to be "cy". Got "node, cy, positionedMindmap, conf"  jsdoc/check-param-names

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/mindmap/svgDraw.js
   10:10  warning  'wrap' is defined but never used               @typescript-eslint/no-unused-vars
  189:9   warning  'shapeSvg' is assigned a value but never used  @typescript-eslint/no-unused-vars
  225:9   warning  'newEl' is assigned a value but never used     @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/quadrant-chart/parser/quadrant.jison.spec.ts
  12:35  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  12:40  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/sankey/sankeyRenderer.ts
   52:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   98:17  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  123:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  124:37  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  127:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  128:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  130:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  133:24  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  134:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  152:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  153:20  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  155:30  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  175:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  177:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  178:23  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  183:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  188:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  191:17  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  194:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  197:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  200:22  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  210:31  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/sequence/sequenceRenderer.ts
   240:34  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
   815:27  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  1118:27  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  1119:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  1242:27  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/timeline/svgDraw.js
  261:7  warning  'xPos' is assigned a value but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/diagrams/timeline/timelineDb.js
  77:1  warning  The type 'timelineDb' is undefined  jsdoc/no-undefined-types

/home/alois/Documents/mermaid/packages/mermaid/src/docs/vite.config.ts
  94:69  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/mermaid.ts
  287:65  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  287:76  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/mermaidAPI.spec.ts
  523:24  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  526:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  529:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  535:24  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  543:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  547:19  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  551:29  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  578:21  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  600:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  613:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  628:18  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/mermaidAPI.ts
   63:25  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any
  393:13  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/themes/theme-base.js
  1:51  warning  'toRgba' is defined but never used  @typescript-eslint/no-unused-vars

/home/alois/Documents/mermaid/packages/mermaid/src/types.ts
  33:10  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/utils.spec.ts
  129:16  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/utils.ts
   65:3   warning  Unsafe regular expression                 unicorn/no-unsafe-regex
  534:43  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

/home/alois/Documents/mermaid/packages/mermaid/src/utils/sanitizeDirective.ts
  9:41  warning  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 93 problems (0 errors, 93 warnings)

diff of pnpm exec eslint --ignore-path .gitignore . output

It sounds like the only change in our current warnings is that @typescript-eslint/no-non-null-assertion no longer raises a warning. This is because @typescript-eslint/no-non-null-assertion is no longer in the plugin:@typescript-eslint/recommended configuration, but it's now moved to the 'plugin:@typescript-eslint/strict' config in v6, see typescript-eslint/typescript-eslint#6014.

16,31c25,27
< │ ✓ built in 25ms
< └─ Done in 41.6s
< Done in 43.2s
< =============
< 
< WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
< 
< You may find that it works just fine, or you may not.
< 
< SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0
< 
< YOUR TYPESCRIPT VERSION: 5.1.3
< 
< Please only submit bug reports when using the officially supported version.
< 
< =============
---
> │ ✓ built in 23ms
> └─ Done in 41.1s
> Done in 42.8s
114,116d109
<    45:31  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    45:31  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    45:31  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
118,124d110
<    65:32  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    66:34  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    67:44  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    68:48  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    69:34  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    70:34  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<    71:42  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
179,181d164
<   645:14  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<   645:14  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<   645:14  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
186,189d168
<   412:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<   412:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<   430:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
<   430:21  warning  Forbidden non-null assertion              @typescript-eslint/no-non-null-assertion
207c186
< ✖ 110 problems (0 errors, 110 warnings)
---
> ✖ 93 problems (0 errors, 93 warnings)

📋 Tasks

Make sure you

As this is a development-only change, I've added the Skipped changelog label to this PR.

Update the `@typescript-eslint/eslint-plugin` and
`@typescript-eslint/parser` plugin to v6.

The full list of changes needed can be found in the
[Announcing typescript-eslint v6 blog post][1], but the ones that
affect us are:
- Dropped support for Node.JS v14.
  This isn't a big deal for us, since Mermaid uses a version of
  `eslint-plugin-jsdoc` that does not support Node.JS v14 either,
  see 1200299
  (chore(deps): update dependency eslint-plugin-jsdoc to v46, 2023-06-27)
- Changes to the `plugin:@typescript-eslint/recommended` configuration.
  I've manually changed the following two rules to match their old
  `@typescript-eslint/parser` v5 settings, to avoid turning ESLint
  warnings into errors:
  - `@typescript-eslint/no-explicit-any` to `warn`
  - `@typescript-eslint/no-unused-vars` to `warn`

[1]: https://main--typescript-eslint.netlify.app/blog/announcing-typescript-eslint-v6
@aloisklink aloisklink added the Skip changelog Don't include in the changelog label Sep 19, 2023
@netlify
Copy link

netlify bot commented Sep 19, 2023

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit d4289e8
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/650a08d9ce0c7200089f351a
😎 Deploy Preview https://deploy-preview-4857--mermaid-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Merging #4857 (d4289e8) into develop (8be8736) will increase coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4857      +/-   ##
===========================================
+ Coverage    79.70%   79.73%   +0.03%     
===========================================
  Files          148      148              
  Lines        13024    13024              
  Branches       612      612              
===========================================
+ Hits         10381    10385       +4     
+ Misses        2510     2506       -4     
  Partials       133      133              
Flag Coverage Δ
e2e 84.78% <ø> (+0.03%) ⬆️
unit 43.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 3 files with indirect coverage changes

@sidharthv96 sidharthv96 added this pull request to the merge queue Sep 21, 2023
Merged via the queue into mermaid-js:develop with commit 74c5032 Sep 21, 2023
17 checks passed
@aloisklink aloisklink deleted the build/update-@typescript-eslint-to-v6 branch September 21, 2023 14:11
fuxingloh referenced this pull request in fuxingloh/contented Nov 3, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mermaid](https://togithub.com/mermaid-js/mermaid) | [`10.5.1` ->
`10.6.0`](https://renovatebot.com/diffs/npm/mermaid/10.5.1/10.6.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/mermaid/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mermaid/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mermaid/10.5.1/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mermaid/10.5.1/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mermaid-js/mermaid (mermaid)</summary>

###
[`v10.6.0`](https://togithub.com/mermaid-js/mermaid/releases/tag/v10.6.0):
10.6.0

[Compare
Source](https://togithub.com/mermaid-js/mermaid/compare/v10.5.1...v10.6.0)

#### What's Changed

- Add new chart xychart by
[@&#8203;subhash-halder](https://togithub.com/subhash-halder) in
[https://github.com/mermaid-js/mermaid/pull/4413](https://togithub.com/mermaid-js/mermaid/pull/4413)

#### Fix

- bug/4849\_center_axis_labels by
[@&#8203;dreathed](https://togithub.com/dreathed) in
[https://github.com/mermaid-js/mermaid/pull/4860](https://togithub.com/mermaid-js/mermaid/pull/4860)
- Better handling of large flowcharts and long edges
[@&#8203;knsv](https://togithub.com/knsv)

#### Docs

- Add new Atlassian integrations by
[@&#8203;janjonas](https://togithub.com/janjonas) in
[https://github.com/mermaid-js/mermaid/pull/4862](https://togithub.com/mermaid-js/mermaid/pull/4862)
- docs: fix typo by
[@&#8203;dennis0324](https://togithub.com/dennis0324) in
[https://github.com/mermaid-js/mermaid/pull/4887](https://togithub.com/mermaid-js/mermaid/pull/4887)
- Update notes on orientation in GitGraph documentation by
[@&#8203;guypursey](https://togithub.com/guypursey) in
[https://github.com/mermaid-js/mermaid/pull/4897](https://togithub.com/mermaid-js/mermaid/pull/4897)
- Enhancment: twitter logo in doc by
[@&#8203;chaursiyasanjeet](https://togithub.com/chaursiyasanjeet) in
[https://github.com/mermaid-js/mermaid/pull/4925](https://togithub.com/mermaid-js/mermaid/pull/4925)
- Update link for the Mermaid integration in JetBrains IDEs by
[@&#8203;FirstTimeInForever](https://togithub.com/FirstTimeInForever) in
[https://github.com/mermaid-js/mermaid/pull/4883](https://togithub.com/mermaid-js/mermaid/pull/4883)

#### Chores

- Wait for `marker_unique_id.html` E2E test to render before taking a
screenshot by [@&#8203;aloi](https://togithub.com/aloi)

sklink[https://github.com/mermaid-js/mermaid/pull/4847](https://togithub.com/mermaid-js/mermaid/pull/4847)4847
- Wait for `theme-directives.html` E2E test to render before taking a
screenshot by [@&#8203;aloisklink](https://togithub.com/aloisklink) in
[https://github.com/mermaid-js/mermaid/pull/4846](https://togithub.com/mermaid-js/mermaid/pull/4846)
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/mermaid-js/mermaid/pull/4851](https://togithub.com/mermaid-js/mermaid/pull/4851)
- chore(dev-deps): update `@typescript-eslint/*` plugins to v6 (major)
by [@&#8203;aloisklink](https://togithub.com/aloisklink) in
[https://github.com/mermaid-js/mermaid/pull/4857](https://togithub.com/mermaid-js/mermaid/pull/4857)
- chore: shorten `flow-huge.spec.js` test case using `.repeat` by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[https://github.com/mermaid-js/mermaid/pull/4859](https://togithub.com/mermaid-js/mermaid/pull/4859)
- Publish Live Editor previews for the `develop` & `next` branches by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[https://github.com/mermaid-js/mermaid/pull/4841](https://togithub.com/mermaid-js/mermaid/pull/4841)
- chore(deps): update all minor dependencies (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/mermaid-js/mermaid/pull/4870](https://togithub.com/mermaid-js/mermaid/pull/4870)
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/mermaid-js/mermaid/pull/4869](https://togithub.com/mermaid-js/mermaid/pull/4869)
- Commented out broken test by
[@&#8203;nirname](https://togithub.com/nirname) in
[https://github.com/mermaid-js/mermaid/pull/4913](https://togithub.com/mermaid-js/mermaid/pull/4913)
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/mermaid-js/mermaid/pull/4891](https://togithub.com/mermaid-js/mermaid/pull/4891)
- fix(class): avoid duplicate definition of fill by
[@&#8203;Mister-Hope](https://togithub.com/Mister-Hope) in
[https://github.com/mermaid-js/mermaid/pull/4929](https://togithub.com/mermaid-js/mermaid/pull/4929)
- chore(deps): update all minor dependencies (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/mermaid-js/mermaid/pull/4892](https://togithub.com/mermaid-js/mermaid/pull/4892)
- making consitent config imports from diagramAPI by
[@&#8203;dreathed](https://togithub.com/dreathed) in
[https://github.com/mermaid-js/mermaid/pull/4889](https://togithub.com/mermaid-js/mermaid/pull/4889)
- fix(typos): Fix minor typos in the source code by
[@&#8203;mribeirodantas](https://togithub.com/mribeirodantas) in
[https://github.com/mermaid-js/mermaid/pull/4928](https://togithub.com/mermaid-js/mermaid/pull/4928)
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[https://github.com/mermaid-js/mermaid/pull/4945](https://togithub.com/mermaid-js/mermaid/pull/4945)
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.22.10 to 7.23.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/mermaid-js/mermaid/pull/4951](https://togithub.com/mermaid-js/mermaid/pull/4951)
- Replace rehype-mermaidjs with rehype-mermaid by
[@&#8203;remcohaszing](https://togithub.com/remcohaszing) in
[https://github.com/mermaid-js/mermaid/pull/4970](https://togithub.com/mermaid-js/mermaid/pull/4970)

#### New Contributors

- [@&#8203;dreathed](https://togithub.com/dreathed) made their first
contribution in
[https://github.com/mermaid-js/mermaid/pull/4860](https://togithub.com/mermaid-js/mermaid/pull/4860)
- [@&#8203;janjonas](https://togithub.com/janjonas) made their first
contribution in
[https://github.com/mermaid-js/mermaid/pull/4862](https://togithub.com/mermaid-js/mermaid/pull/4862)
- [@&#8203;dennis0324](https://togithub.com/dennis0324) made their first
contribution in
[https://github.com/mermaid-js/mermaid/pull/4887](https://togithub.com/mermaid-js/mermaid/pull/4887)
- [@&#8203;FirstTimeInForever](https://togithub.com/FirstTimeInForever)
made their first contribution in
[https://github.com/mermaid-js/mermaid/pull/4883](https://togithub.com/mermaid-js/mermaid/pull/4883)
- [@&#8203;guypursey](https://togithub.com/guypursey) made their first
contribution in
[https://github.com/mermaid-js/mermaid/pull/4897](https://togithub.com/mermaid-js/mermaid/pull/4897)
- [@&#8203;chaursiyasanjeet](https://togithub.com/chaursiyasanjeet) made
their first contribution in
[https://github.com/mermaid-js/mermaid/pull/4925](https://togithub.com/mermaid-js/mermaid/pull/4925)
- [@&#8203;mribeirodantas](https://togithub.com/mribeirodantas) made
their first contribution in
[https://github.com/mermaid-js/mermaid/pull/4928](https://togithub.com/mermaid-js/mermaid/pull/4928)

**Full Changelog**:
mermaid-js/mermaid@v10.5.1...v10.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/levaintech/contented).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip changelog Don't include in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants