Package Spotlight: Stylelint

Package Spotlight: Stylelint

TRYTN, not unlike other software companies, has various coding best-practices and standards. But why have CSS/SCSS coding standards? When you have multiple developers on a team and/or want to write code in a readable, scalable way, standards are needed. This is so that every developer on the team writes code in the same format and style. It makes onboarding new developers much easier when you can hand them a list of standards that need to be followed.

But what good is a standards and best-practices document if they aren’t enforced? You might be able to catch some during a code review but this is a manual, tedious task. It’d be better to catch these code standards violations early in the development process. That’s where Stylelint comes in – it automates the code standards adherence checks.

We implemented code standards for CSS/SCSS just like we did for JavaScript and utilize Stylelint to automatically check for issues. An example is alphabetical order for CSS properties. This is a standard we implemented here at TRYTN to make code very easy to read. It’s a pain to manually enforce this rule but Stylelint makes it easy. If properties are out of order a warning is generated any time files are re-generated to let the developer know there’s an issue with line and character number.

What’s also nice is Stylelint also checks for code standards conformity. If an invalid property or value is passed or a syntactic error is found in the CSS/SCSS it will automatically generate an error. The SCSS will then not transpile to CSS and the build will fail. Meaning if there’s a syntax issue in the CSS we aren’t putting a bad build out into production.

Package Name: Stylelint
Website: https://stylelint.io/

a person holding a flower
News
Virginia

Virginia Introduction

Traveling and experiencing new places has always been a passion for Virginia. Born in New York City and raised in Alabama, her love of travel

Read More »
a close up of a tree
Blog
Virginia

Holiday Promotions and Giveaways

Holiday season is almost here! Not only do holidays spread joy and bring family and friends together, but they can also be an excellent time to increase your website traffic.

Read More »
a man using a laptop computer sitting on top of a table
Feature Announcements
TRYTN

Custom Invoice Emails

We recently enhanced our invoicing capabilities in a big way. Each tour operator has specific business needs and so a one-size-fits-all invoice email just didn’t

Read More »

Request a Demonstration