@jsonxr/eslint-config v1.0.2
eslint-config
This is a global style preference that enforces consistent formatting. If used with vscode
npm run lint
npm run lint -- --fix
Project Configuration
The following command will perform an npm install and create all the configuration files you need
npx @jsonxr/eslint-config
Add the following to your
package.json
file{ "scripts": { "lint": "eslint 'src/**/*.*' index.js" } }
Files
.eslintrc.js
module.exports = { extends: '@jsonxr' };
.prettierrc.js
module.exports = '@jsonxr/eslint-config/prettier';
vscode
Install prettier plugin - To install the prettier plugin, in quick open (
cmd+p
), run the following command:ext install esbenp.prettier-vscode
Configure project - Add .vscode/settings.json to project to ensure that every cmd+s get's prettiefied. The
npx
command creates this for you so you just need to check it in. If you already have project settings, need to add these..vscode/settings.json
{ "prettier.configPath": ".prettierrc.js", "editor.formatOnSave": true }
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago