Category: linting

Prettier + Stylelint: Writing Very Clean CSS (Or, Keeping Clean Code is a Two-Tool Game)

It sure is nice having a whole codebase that is perfectly compliant to a set of code style guidelines. All the files use the same indentation, the same quote style, the same spacing and line-break rules, heck, tiny things like the way zero’s in values are handled and how keyframes are named. It seems like a tall ...

Enforcing CSS Syntax Style (and more!)

I bet you have a style that you write CSS in, for the most part. You like 4-spaces, say. You always have a space after braces and colons. You always put a space after rulesets. You only ever put one declaration on a line, and the only declarations that can be multi-line are when they are big blocks like a gradient or a...

Sourcehunt September – Hacktoberfest Edition

It’s that time of year again – DigitalOcean’s Hacktoberfest is starting! It’s a month-long open source effort when people are encouraged to contribute to various open source projects (not their own!). Anyone who opens 4 pull requests (even documentation fixes count!) gets a T-shirt at the end of...

Stylelint

The following is a guest post by David Clark. David is the creator of a thing called Stylelint, a tool for keeping your CSS in shape. He does a great intro as to why you might need it himself, so take it away David… You write CSS. Probably a lot of CSS. And you make mistakes. Probably a lot of mistakes. Somebody...