-
Notifications
You must be signed in to change notification settings - Fork 30
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(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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
case BpmnStyleIdentifier.IS_INITIATING: // message flow icon | ||
} | ||
case BpmnStyleIdentifier.IS_INITIATING: { | ||
// message flow icon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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! 0 Bugs No Coverage information |
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