We ask developers to follow coding conventions across all our projects.
WebStorm code style and inspections + ESLint work hand-in-hand with each other.
Be sure to Fix ESLint Problems
, and Reformat code
with WebStorm before commit!
- Latest versions of WebStorm
-
npm i https://github.com/paperllc/eslint-config-paper.git{{#semver:^x.x.x|#commithash}} -D
-
In
.eslintrc.json
{
"extends": ["paper"]
}
You will extend only the rules.
You need to configure other options by yourself, as well as installing all the dependencies, unless you are working in an existing project with this setup.
Specific files in .idea
folder are committed, that is why coding conventions are scoped to the project and should already be applied.
-
Add generated
.gitignore
using TopTal generator -
- Import
webstorm-code-style.xml
scheme; - Then Copy to Project (this option to store the selected scheme in a project level. The selected code style is saved in the .idea directory in the file codeStyleSettings.xml);
- Select the project level scheme.
- Import
-
- Import
webstorm-inspections.xml
profile; - Select imported profile and copy it to project level;
- Select the project level Paper Inspections n profile.
- Import
-
Ensure that WebStorm listens to LOCAL (project level) settings.