vigetlabs / blendid

A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
MIT License
4.97k stars 683 forks source link

blendid 5 - CSS and JS linting #537

Closed benjtinsley closed 6 years ago

benjtinsley commented 6 years ago

since we frontend developers at viget use blendid on pretty much every project, having a good way to enforce our standards is desired. we spend a lot of time flagging pointless errors in PRs, and this is a step to mitigate that.

in blendid 5.0, we will ship with our standards set in .stylelint and .eslint files, making it easy for anyone to follow along with our standards, but also make it simple for people to configure it however they wish to match their own project requirements/preferences.

both stylelint and eslint will log out errors in the console when they happen. stylelint will auto fix certain errors (non-alphabetized CSS properties, incorrect indentation, etc). this also includes prettier, which, when adding the prettier plugin to your text editor, will auto fix certain errors (semicolons, incorrect indentation, etc).

example of stylelint autofix (on save):

gif

fixes displayed

example of prettier autofix (on save):

gif

fixes displayed

benjtinsley commented 6 years ago

@davist11 yea this is just a first pass so im sure we can have a better discussion on which ones we should include