1.0.2 • Published 5 years ago

@jsonxr/eslint-config v1.0.2

Weekly downloads
33
License
MIT
Repository
github
Last release
5 years ago

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

  1. The following command will perform an npm install and create all the configuration files you need

    npx @jsonxr/eslint-config
  2. 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

  1. Install prettier plugin - To install the prettier plugin, in quick open (cmd+p), run the following command:

    ext install esbenp.prettier-vscode
  2. 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
    }