1.3.0 • Published 5 years ago

eslint-config-vizzuality v1.3.0

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

eslint-config-vizzuality

This package provides Vizzuality's .eslintrc as an extensible shared config.

## Usage

We export three ESLint configurations for your usage.

Install

Unsing npm:

npx install-peerdeps --dev eslint-config-vizzuality
npm install --save-dev eslint-config-vizzuality

Using yarn:

yarn add eslint@5.7.0 \
  eslint-config-airbnb@17.1.0 \
  eslint-plugin-import@2.14.0 \
  eslint-plugin-jsx-a11y@6.1.1 \
  eslint-plugin-react@7.11.0 \
  eslint-config-vizzuality@latest \
  --dev

Add "extends": "vizzuality" to your .eslintrc

Example of .eslintrc.json:

{
  "env": {
    "browser": true,
    "node": true,
    "es6": true
  },
  "extends": [
    "vizzuality"
  ]
}

Add script to in your package.json:

{
  "scripts": {
    ...
    "lint": "eslint --ext .js --ext .jsx ."
  }
}

And execute eslint running:

yarn lint

Recommendations

Pre-commit hooks

As a good practice running eslint only in git staged files using (lint-staged)https://github.com/okonet/lint-staged will have quicker analysis and ensure quality in each commit.

And it is as easy as install the dependency:

npm install lint-staged

or

yarn add lint-staged

And add the following code to the package.json:

  "scripts": {
    "precommit": "lint-staged"
  },
  "lint-staged": {
    "**/*.js": [
      "eslint --quiet --fix",
      "git add"
    ]
  },
1.3.0

5 years ago

1.2.0

6 years ago

1.1.7

6 years ago

1.1.6

6 years ago

1.1.5

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago