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

Add (basic) support for Stylelint, to allow linting of CSS files #12301

Merged
merged 2 commits into from
Aug 31, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Aug 29, 2020

Add (basic) support for Stylelint, to allow linting of CSS files

This is similar to the existing linting for JavaScript files, but covers CSS files instead.
While there's a lot of rules that could potentially be used, the main advantage of using Stylelint is that it has Prettier integration which means that we can automatically enforce a consistent style for our CSS files as well.

As a proof of concept, this patch is purposely limited to:

Please find additional information at https://stylelint.io/

@Snuffleupagus Snuffleupagus force-pushed the stylelint branch 7 times, most recently from e0cc673 to 23a04de Compare August 29, 2020 16:00
@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/0bf60b222c53b70/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/294b4b6ff1fe079/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/0bf60b222c53b70/output.txt

Total script time: 2.03 mins

  • Lint: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/294b4b6ff1fe079/output.txt

Total script time: 2.76 mins

  • Lint: FAILED

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/ff46557933997c0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/75ffb6fdbb5361f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/75ffb6fdbb5361f/output.txt

Total script time: 2.13 mins

  • Lint: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/ff46557933997c0/output.txt

Total script time: 2.74 mins

  • Lint: Passed

@Snuffleupagus Snuffleupagus force-pushed the stylelint branch 2 times, most recently from f237f39 to 23db21d Compare August 30, 2020 19:44
This is *similar* to the existing linting for JavaScript files, but covers CSS files instead.
While there's a lot of rules that could potentially be used, the main advantage of using Stylelint is that it has Prettier integration which means that we can automatically enforce a *consistent* style for our CSS files as well.

As a proof of concept, this patch is purposely limited to:
 - Adding a simple rule, here `block-no-empty` is chosen; see https://stylelint.io/user-guide/rules/block-no-empty
 - Adding Prettier integration, to unify the style of our CSS files.

Please find additional information at https://stylelint.io/
This was done automatically, using `gulp lint --fix`.
@Snuffleupagus
Copy link
Collaborator Author

/botio lint

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/516ebe6d0e81754/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/3de35f4ddfe51c0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/3de35f4ddfe51c0/output.txt

Total script time: 2.08 mins

  • Lint: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/516ebe6d0e81754/output.txt

Total script time: 2.79 mins

  • Lint: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/45d07791e6d0bb7/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/45d07791e6d0bb7/output.txt

Total script time: 3.43 mins

Published

@timvandermeij timvandermeij merged commit c48fe10 into mozilla:master Aug 31, 2020
@timvandermeij
Copy link
Contributor

This is a nice idea. Thanks!

@Snuffleupagus Snuffleupagus deleted the stylelint branch September 1, 2020 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants