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

Missing rules #3

Open
tdmalone opened this issue Nov 6, 2017 · 1 comment
Open

Missing rules #3

tdmalone opened this issue Nov 6, 2017 · 1 comment

Comments

@tdmalone
Copy link
Contributor

tdmalone commented Nov 6, 2017

This issue will collect rules that we’ve noticed are missing from this config. Generally these will be rules that need more investigation, testing, or possibly even custom rules written. If a missing rule is easy to add, skip this issue and just add it!

Feel free to change the priority label on this issue if important missing rules are added.

Please add checkboxes so rules can be ticked off when they’re included. This issue can be closed when we think we’ve covered everything!

@tdmalone
Copy link
Contributor Author

tdmalone commented Nov 6, 2017

  • Require explanation comment when using !important
  • Disallow single line block comments /**/, i.e. require //
  • Require comments to start with a capital letter, and end with punctuation (matching rules from phpcs-config-chromatix
  • Detect commented out code
  • Require comment after closing brace for large (> 35 line?) block
  • Space between math operators in eg. nth-child declarations
  • Require nesting rather than continually repeating the same selectors
  • Allow strings and URLs to exceed the max line length
  • Require colours and fonts to use a master variable
  • Multiple settings of the same property
  • Put includes (other than media query) at the top
  • Use min-width media queries and put them in order from smallest to largest
  • Warn on including a class name that isn't kebab-case (as per WP HTML standards)
  • Warn or error on images being included from src/ (they should be from dist/ instead)
  • Detect double declaration of mixins? (i.e. would have prevented https://github.com/ChromatixAU/base-theme-ipx/issues/24) - note that _ and - are treated the same in mixin names too
  • Require empty line before line comment
  • Warn on TODO comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant