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(eslint): use unicorn/recommended rules #2824

Merged
merged 2 commits into from
Oct 13, 2023

Conversation

csouchet
Copy link
Member

@csouchet csouchet commented Aug 25, 2023

I disabled:

  • the unicorn/prefer-keyboard-event-key; because key doesn't exist in the used ES version,
  • the unicorn/prefer-module; because we don't want to change a working configuration,
  • the unicorn/prefer-string-replace-all rule; because the replaceAll function is missing in the ES version used,
  • the unicorn/no-new-array rule, because it conflicts with unicorn/new-for-builtins (Use `new Array()` instead of `Array()` ),
  • the unicorn/no-null rule; because we don't know the impact on mxGraph code,
  • the unicorn/no-useless-undefined rule, because the "undefined" value is useful where we use it and change some mxGraph code.

ℹ️ See all the rules https://github.com/sindresorhus/eslint-plugin-unicorn/#rules

Covers #2742

@csouchet csouchet added dependencies Pull requests that update a dependency (dev or runtime) chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) refactoring Code refactoring labels Aug 25, 2023
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 2 times, most recently from 7f97f4d to 05c27c7 Compare August 28, 2023 14:20
@github-actions
Copy link

github-actions bot commented Aug 28, 2023

♻️ PR Preview 1f54001 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@github-actions
Copy link

github-actions bot commented Aug 28, 2023

🎊 PR Preview 1f54001 has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-doc_preview-pr-2824.surge.sh

🕐 Build time: 0.017s

🤖 By surge-preview

test/config/jest.image.ts Fixed Show fixed Hide fixed
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 3 times, most recently from 622adb9 to a282372 Compare August 28, 2023 16:13
@csouchet csouchet added the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Aug 28, 2023
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 2 times, most recently from 0cb4e27 to ec2464d Compare August 29, 2023 11:59
@csouchet csouchet removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Aug 31, 2023
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 4 times, most recently from 24d6c9f to 2493f2c Compare September 7, 2023 12:53
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 2 times, most recently from 65449c5 to fcea55a Compare September 18, 2023 09:30
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch from b5ecaac to 7024301 Compare September 19, 2023 12:08
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 2 times, most recently from 0166367 to 80b1e95 Compare September 20, 2023 14:30
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch 2 times, most recently from 1e27991 to 5a7a916 Compare September 21, 2023 08:59
@csouchet csouchet added depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first and removed dependencies Pull requests that update a dependency (dev or runtime) labels Sep 21, 2023
@csouchet csouchet changed the title chore(eslint): add eslint-plugin-unicorn dependency & rules chore(eslint): use unicorn/recommended rules Sep 21, 2023
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch from 5a7a916 to e656df3 Compare September 26, 2023 14:09
@csouchet csouchet removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Sep 26, 2023
@csouchet csouchet marked this pull request as ready for review September 26, 2023 15:24
@csouchet csouchet requested a review from tbouffard September 26, 2023 15:26
@tbouffard tbouffard removed the refactoring Code refactoring label Sep 27, 2023
Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ I am OK to apply all selected rules
ℹ️ pending questions and stuff that I need to check locally to understand the changes (or require new ones)
❌ Some changes require more explanations and discussions, in particular when the introduce breaking changes

.eslintrc.cjs Show resolved Hide resolved
.eslintignore Outdated Show resolved Hide resolved
dev/ts/component/SvgExporter.ts Outdated Show resolved Hide resolved
src/component/mxgraph/BpmnCellRenderer.ts Outdated Show resolved Hide resolved
src/component/mxgraph/config/ShapeConfigurator.ts Outdated Show resolved Hide resolved
dev/ts/shared/main.ts Outdated Show resolved Hide resolved
src/model/bpmn/internal/shape/utils.ts Outdated Show resolved Hide resolved
test/shared/file-helper.ts Outdated Show resolved Hide resolved
test/shared/visu/bpmn-page-utils.ts Outdated Show resolved Hide resolved
vite.config.js Outdated Show resolved Hide resolved
test/config/jest.image.ts Outdated Show resolved Hide resolved
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch from fa8f6a1 to 99703ee Compare October 13, 2023 08:53
@csouchet csouchet added the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Oct 13, 2023
@csouchet csouchet force-pushed the 2742-add_eslint-plugin-unicorn branch from 99703ee to 1f54001 Compare October 13, 2023 09:30
@csouchet csouchet removed the depends on another PR ⚠️ Pull request depending on another one. The depending must be merged first label Oct 13, 2023
@csouchet csouchet marked this pull request as ready for review October 13, 2023 09:31
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@tbouffard tbouffard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for all your hard work applying all the unicorn rules ⭐

@csouchet csouchet merged commit 5f389c2 into master Oct 13, 2023
26 checks passed
@csouchet csouchet deleted the 2742-add_eslint-plugin-unicorn branch October 13, 2023 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants