Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Svelte 3 Up and Running

You're reading from   Svelte 3 Up and Running A fast-paced introductory guide to building high-performance web applications with SvelteJS

Arrow left icon
Product type Paperback
Published in Aug 2020
Publisher Packt
ISBN-13 9781839213625
Length 168 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Alessandro Segala Alessandro Segala
Author Profile Icon Alessandro Segala
Alessandro Segala
Arrow right icon
View More author details
Toc

Linting and enforcing style conventions

Lastly, there's one more tool we will set up: ESLint. This is a linter, or in other words, a static code analyzer (that is, it inspects the code without running it) that is used for enforcing style conventions.

Tabs or spaces? Use semicolons or not? These are just two of the many style options developers have opinions about, sometimes really strong ones too! Regardless of what your preferences are, when you work in a team it's important to ensure that everyone writes code following the same styling conventions to keep the code base clean and readable.

ESLint is another open source tool that's almost ubiquitous among JavaScript developers, and it's a highly customizable linter. It allows you and your team to define rules for how the code should be written, and it can be used as part of your CI pipeline to enforce them. Even better, in many cases, ESLint can fix issues automatically, with the --fix switch!

Adding ESLint...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime