This repository has been archived by the owner on Nov 10, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
Add stylelint integration #239
Open
westonruter
wants to merge
10
commits into
master
Choose a base branch
from
add/stylelint
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a3bd485
Add WIP for stylelint integration
westonruter 3933f30
Support all stylelint config file formats
westonruter bcdb366
Omit SCSS from CSS manifest
westonruter 2b06eed
Fix references to stylelint from eslint
westonruter 73fdbd2
Fix passing of custom-formatter
westonruter b0eff2f
Update .editorconfig with latest from core with also linter configs
westonruter a23b89b
Include *.yaml in .editorconfig
westonruter 580e388
Fix comment
westonruter 2259c48
Merge branch 'master' of https://github.com/xwp/wp-dev-lib into add/s…
westonruter c2d14a0
Revert "Update .editorconfig with latest from core with also linter c…
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# WordPress Coding Standards | ||
# https://make.wordpress.org/core/handbook/coding-standards/ | ||
|
||
root = true | ||
|
||
[*] | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "stylelint-config-wordpress" | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,7 @@ echo "## Checking files, scope $CHECK_SCOPE:" | |
cat "$TEMP_DIRECTORY/paths-scope" | ||
|
||
check_execute_bit | ||
lint_css_files | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted above, in a follow up PR we can add |
||
lint_js_files | ||
lint_php_files | ||
lint_xml_files | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ fi | |
echo | ||
|
||
check_execute_bit | ||
lint_css_files | ||
lint_js_files | ||
lint_php_files | ||
lint_xml_files | ||
|
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.
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.
Not sure about the
node_modules/stylelint-formatter-compact
part. What ifstylelint-formatter-compact
is installed globally?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.
Swap the
, i.e:
=
for a space--custom-formatter node_modules/stylelint-formatter-compact
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.
Ignore that ^^, the
=
does not matterThere 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.
It doesn't make a difference. Both
--custom-formatter node_modules/stylelint-formatter-compact
and--custom-formatter=node_modules/stylelint-formatter-compact
have the same result.Also, both
--custom-formatter stylelint-formatter-compact
and--custom-formatter=stylelint-formatter-compact
fail with: “Error: Cannot find module”.