Helps to check the style of your code. Provides basic linting, prettier functionality for your js and css code, according to the Frontend Architecture Guidelines.
Use it by installing
yarn add @toptal/davinci in your project.
Important: If you've bootstrapped your projects by using
davinci CLI there is NO NEED to run
init in your project because
syntax package already set up.
But if you are using
syntax as a standalone package, before using it you have to run
davinci syntax init
Under the hood, it will prepare
.editorconfig files in your project, and set up hooks to check your code on commits.
To lint your code in the root of your project run
davinci syntax lint code .
--check- just checks your code and don't fix it. Useful for CI jobs.
Styles and styled components
To lint your styles and styled components in the root of your project run
davinci syntax lint styles .
According to the Frontend Architecture Guidelines we expect that all styled components will be at the files
In all the commands you can use
davinci-syntax directly if needed, instead of
davinci syntax. This is not a recommended way to use
davinci, but in very rare cases it might be useful.
This package can be used directly in your IDE through these extensions