1.3.0 • Published 6 years ago

eslint-config-pavo v1.3.0

Weekly downloads
12
License
ISC
Repository
github
Last release
6 years ago

Pavo eslint configuration

Greenkeeper badge Status

Linting and Formatting with Prettier :nail_care:, built on top of Airbnb linting config.

1. Install

npm install eslint-config-pavo --save-dev

2. Usage

Create a .eslintrc file.

Add this configuration to extend:

{
  "extends": "eslint-config-pavo"
  "rules": {
    // Your projects overrides.
  }
}

You can layer multiple configurations depending upon your projects type:

{
  "extends": ["eslint-config-pavo", "eslint-config-pavo/<config-name>"]
}

Additional configs available are:

  • react
  • jest

Scripts

Running the linter via scripts defined in package.json

"scripts": {
  "lint": "./node_modules/.bin/eslint src",
  "lint:fix": "npm run lint -- --fix",
}

Then on the command line:

npm run lint
npm run lint:fix

Prettier integration

Visual Studio Code

Extensions:

Sample .vscode/settings.json config:

{
  "eslint.options": {
    "configFile": ".eslintrc",
    "parserOptions": {
      "ecmaVersion": 6,
      "sourceType": "module"
    }
  },
  "eslint.enable": true,
  "prettier.eslintIntegration": true,
  "editor.renderWhitespace": "all",
  "editor.trimAutoWhitespace": true,
  "editor.formatOnSave": true,
  "prettier.singleQuote": true,
  "prettier.stylelintIntegration": true,
  "prettier.trailingComma": "all"
}