chore(eslint): add unicorn Switch rules#2881
Conversation
|
🎊 PR Preview 18e4009 has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-doc_preview-pr-2881.surge.sh 🕐 Build time: 0.021s 🤖 By surge-preview |
|
🎊 PR Preview 18e4009 has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-demo_preview-pr-2881.surge.sh 🕐 Build time: 0.016s 🤖 By surge-preview |
- unicorn/no-useless-switch-case - unicorn/prefer-switch - unicorn/switch-case-braces
f7d739e to
ee7a75c
Compare
| case BpmnStyleIdentifier.IS_INITIATING: // message flow icon | ||
| } | ||
| case BpmnStyleIdentifier.IS_INITIATING: { | ||
| // message flow icon |
There was a problem hiding this comment.
thought: may be clearer with the comment on the top of the case entry. This is what we generally do in the code.
|
Kudos, SonarCloud Quality Gate passed!
|









To avoid to have to many changes by enabling plugin:unicorn/recommended, I choose to enable some rule one-by-one.
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-switch-case.md
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-switch.md
https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/switch-case-braces.md
Part of #2824
Covers #2742