-
Notifications
You must be signed in to change notification settings - Fork 8
Code Linting Tools
We use ESLint to help with formatting and fixing up JavaScript in our repos.
We maintain an extensible ESLint config – eslint-config-pie – which is then used in the PIE and PIE Aperture repos. This config can be used in any application and can be extended as much (or as little) as you like; think of it as a starting point for your application's ESLint usage.
You can set up your code editor to automatically fix your JavaScript as you write it, based on the ESLint config. This set-up varies based on your code editor.
If you use VSCode, you should install the official ESLint VSCode extension. You can then configure how and when you want ESLint to fix any code issues (or just warn) while you are developing locally.
If you would like to have ESLint autofix your code run when you save JS files, you can set the following in your VSCode user config JSON:
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},