WordPress-Coding-Standards / stylelint-config-wordpress

WordPress shareable config for stylelint Note: Migrating to Gutenberg repo:

Home Page:https://github.com/WordPress/gutenberg/pull/22777

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Audit, document, and test all the new lines

ntwb opened this issue · comments

  • Create example CSS showing new line standards:
    • At rules
    • Blocks
    • Comments
    • Declarations
    • Functions
    • Media Queries
    • Rules - Nested
    • Rules - Non-nested
    • Selectors
    • Strings
    • Values
  • Create a new-lines.js test file in /__tests__
  • Add example CSS docs to the WordPress CSS Coding Standards Handbook

Related rule documentation:

"... *-newline-* rules check for one or more newlines, as it's the responsibility of the *-empty-line-before* and *-max-empty-lines rules to control empty lines."

At Rules:
https://github.com/stylelint/stylelint/tree/master/src/rules/at-rule-empty-line-before
https://github.com/stylelint/stylelint/tree/master/src/rules/at-rule-name-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/at-rule-semicolon-newline-after

Block:
https://github.com/stylelint/stylelint/tree/master/src/rules/block-closing-brace-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/block-closing-brace-newline-before
https://github.com/stylelint/stylelint/tree/master/src/rules/block-no-single-line
https://github.com/stylelint/stylelint/tree/master/src/rules/block-opening-brace-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/block-opening-brace-newline-before

Comments:
https://github.com/stylelint/stylelint/tree/master/src/rules/comment-empty-line-before

Declarations:
https://github.com/stylelint/stylelint/tree/master/src/rules/declaration-block-semicolon-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/declaration-block-semicolon-newline-before
https://github.com/stylelint/stylelint/tree/master/src/rules/declaration-colon-newline-after

Functions:
https://github.com/stylelint/stylelint/tree/master/src/rules/function-comma-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/function-comma-newline-before

Media Queries:
https://github.com/stylelint/stylelint/tree/master/src/rules/media-query-list-comma-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/media-query-list-comma-newline-before

Rules
https://github.com/stylelint/stylelint/tree/master/src/rules/rule-nested-empty-line-before
https://github.com/stylelint/stylelint/tree/master/src/rules/rule-non-nested-empty-line-before

Selectors:
https://github.com/stylelint/stylelint/tree/master/src/rules/selector-list-comma-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/selector-list-comma-newline-before

Strings:
https://github.com/stylelint/stylelint/tree/master/src/rules/string-no-newline

Values:
https://github.com/stylelint/stylelint/tree/master/src/rules/value-list-comma-newline-after
https://github.com/stylelint/stylelint/tree/master/src/rules/value-list-comma-newline-before

Here's a neat stylelint config for reference https://github.com/Skyscanner/stylelint-config-skyscanner/blob/master/index.js

When updating this config for Gutenberg it's got some neat ideas 👌