feat(lint): unify LESS files whitespaces and string quotes#2610
Merged
Conversation
mvorisek
commented
Dec 14, 2022
((\w|-)+) +(:)
(^ *(?:\w|-)+: )(\\[0-9a-f]+)(;$)
mvorisek
commented
Dec 14, 2022
mvorisek
commented
Dec 14, 2022
| in_cart: \f218; | ||
| log_out: \f2f5; | ||
| sign_out: \f2f5; | ||
| zoom_in: '\f00e'; |
Contributor
Author
There was a problem hiding this comment.
fixes #2594 (comment)
the mentioned export/generator lib should be fixed to export the data with single quotes and no space before colon and one space after
Member
There was a problem hiding this comment.
mvorisek
commented
Dec 14, 2022
(?<!\w|\.)0(cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%|deg)(?!\w)
lubber-de
added a commit
to fomantic/create-fomantic-icons
that referenced
this pull request
Dec 15, 2022
This PR reflects the changes of fomantic/Fomantic-UI#2610
This was referenced Dec 15, 2022
lubber-de
pushed a commit
that referenced
this pull request
Dec 16, 2022
This PR fixes whitespaces unfixed/undetected in GH-2610 and major whitespace changes required for future Prettier integration. Double quotes and lowecased hex colors are required by Prettier - prettier/prettier#5158 - and there is no config to change it. As long as we want to use Prettier, we must accept opinionated formatting by Prettier.
lubber-de
pushed a commit
that referenced
this pull request
Dec 21, 2022
Compared to Stylelint, Prettier is very simple tool and I am quite supprised Stylelint is deprecating the whitespace rules in favor of Prettier. For LESS it seems ok, for JS, we should never enable Prettier as formatting is part of a code and improves readability. As Prettier is an opinionated formatter instead of an linter, we need to satisfy it everywhere without exceptions. When I was crafting this PR, I found several Prettier issues and proposed changes to Prettier: Fix semicolon duplicated at the end of LESS file prettier/prettier#14007 Fix no space after unary minus when followed by opening parenthesis in LESS prettier/prettier#14008 Do not change case of property name if inside a variable declaration in LESS prettier/prettier#14034 In this PR, these changes are contained and Prettier is patched before it is run. Once the changes are merged in prettier and stable release is made, they can be removed. This PR fixes minor whitespaces unfixed/undetected in GH-2610. And also asserts: PHP port of the LESS fails to compile colors.less #1832 feat(lint): add stylelint overrides and variation files #2593 (comment) Prettier has no built in support to dump the diff - prettier/prettier#6885 - so we dump it in the CI using git.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is part of GH-2594 but separated to integrate many whitespace changes (and other non functional changes) separately.