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/

diagram
Blog
Virginia

Reimagining Company Logos

A company’s logo is important, whether you’re starting a business or refreshing your look. Having a timeless logo allows you to capture your customers’ attention and become memorable.

Read More »
Blog
Virginia

Responding to Reviews

Could making your company shine be as easy as responding to customer reviews? In this article you will learn why simply replying to customers’ reviews is so important in making each customer feel valued, appreciated and ultimately validated.

Read More »
a person standing on top of a mountain
Blog
Virginia

The Rise of Solo Travel

Over the past few years, solo trips have become a growing trend in the tourism industry. With more and more people deciding to travel alone, one factor has endured — tourists want to have fun!

Read More »

Request a Demonstration