Eslint
warning
Eslint Is used to enforce correct syntax and code, do not overwrite the rules and do not disable Eslint when It's not needed.
During the build process an eslint check will be made and errors will block the release.
Description
The Crono-App application includes a syntax management managed with Eslint.
Using CronoApp
you will automatically have access to a series of features to format the code and to manage syntax and non-syntax errors within the code.
To execute the linting into your code use the command:
npm run lint
Code Editor configuration
Since we're using eslint
to manage (also) the code syntax, a default configuration is needed for your code editor
This is the configuration you can use with VSCode
:
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.formatOnSave": false,
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.detectIndentation": false
}
(use can install this configuration in your Workspace
or globally by going to Preferences:...
and made your choice)
With this configuration, on saving, the editor will apply all the needed fixes for eslint
, so the process will be automated by the editor Itself.