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

feat(lint): remove unneeded parentheses around expressions #2589

Merged
merged 10 commits into from Dec 13, 2022

Conversation

mvorisek
Copy link
Contributor

@mvorisek mvorisek commented Dec 7, 2022

Modernize code using eslint advisory introduced in GH-2596. This PR focuses on fixing no-extra-parens rule with a help or a custom rule output filter.

@mvorisek mvorisek changed the title Add Airbnb and Unicorn linters compatible with Node 12 Add Airbnb and Unicorn linters Dec 7, 2022
@mvorisek mvorisek force-pushed the fui_2_9_airbnb_ws branch 2 times, most recently from 264b8f4 to d6d39e9 Compare December 7, 2022 03:13
@mvorisek mvorisek marked this pull request as ready for review December 7, 2022 03:20
@mvorisek
Copy link
Contributor Author

TODO: unify hex escape case - see #2607 (comment)

@lubber-de fixing stylelint for upper case colors can be done easily with 'color-hex-case': 'upper' configuration, but I have checked the most commonly used coding standards and it seems lower case is used much more. Also advised by CS guides like: https://google.github.io/styleguide/htmlcssguide.html and https://docs.ckan.org/en/2.9/contributing/css.html

so I prefer to stay with the default LC for LESS/CSS colors and UC for escapes in JS.

Unified LC is not (easily) possible, as Unicorn has no configuration for it. Also UC for escapes in the only option with PHP CS Fixer, so it seems to be well accepted casing.

So if ok with you, I prefer too keep the casing rules as they are (and as default by the recommended CS AirBnb/Unicorn/Stylelint configs).

@mvorisek mvorisek marked this pull request as ready for review December 13, 2022 16:24
@auto-assign auto-assign bot requested a review from lubber-de December 13, 2022 16:24
@mvorisek mvorisek changed the title TO BE SPLIT: Add Airbnb and Unicorn linters and fix recommended rules Remove unneeded parentheses around expressions Dec 13, 2022
Copy link
Member

@lubber-de lubber-de left a comment

Choose a reason for hiding this comment

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

LGTM

@lubber-de lubber-de changed the title Remove unneeded parentheses around expressions feat(lint): remove unneeded parentheses around expressions Dec 13, 2022
@lubber-de lubber-de merged commit 029436f into fomantic:develop Dec 13, 2022
@mvorisek mvorisek deleted the fui_2_9_airbnb_ws branch December 13, 2022 18:17
@lubber-de lubber-de added lang/javascript Anything involving JavaScript type/ci Anything related to CI/CD type/lint eslint / stylelint related changes only labels Dec 15, 2022
@lubber-de lubber-de added this to the 2.9.1 milestone Dec 15, 2022
lubber-de pushed a commit that referenced this pull request Dec 20, 2022
Modernize code using eslint advisory introduced in GH-2596. This PR focuses on fixing no-shadow-restricted-names rule.

Discussed in #2589 (comment), it fixes the rule cleanly and the impact on the total JS size is minimal (<1%).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang/javascript Anything involving JavaScript type/ci Anything related to CI/CD type/lint eslint / stylelint related changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants