18F / frontend

18F's Front End Guild –  content has been moved to https://github.com/18F/development-guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add linting config for node based CSS/SCSS linter

el-mapache opened this issue · comments

We currently have a dependency on ruby to handle css linting in most of our front end apps. Ideally we should move to a node based solution. @shawnbot mentioned a tool called 'stylelint' that seems like a good fit. Most of the keys in our scss_lint.yml file map directly to rules in the stylelint library, hooray!

Rules that will require a custom plugin:

  • ElsePlacement
  • ImportPath
  • NameFormat
  • PropertyCount
  • UnnecessaryParentReference ( don't have the scss foo to write this one without help )
  • UrlFormat

We've broken out the stylelint configs into a separate module (here: https://github.com/18F/18F-stylelint) which will eventually be available via npm.

Acceptance Critera:

  • Add a helpful description of the new linter
  • Link the new css linting config file on the front-end guide

Should we deprecate the scss-lint suggestions and config?

@shawnbot that's what I want to do; we might want to fix the ignore config issue on stylelint-rules soon though.