Socket
Socket
Sign inDemoInstall

eslint-config-vizzuality

Package Overview
Dependencies
271
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eslint-config-vizzuality

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


Version published
Weekly downloads
17
decreased by-10.53%
Maintainers
7
Install size
56.6 kB
Created
Weekly downloads
 

Readme

Source

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"
    ]
  },

Keywords

FAQs

Last updated on 09 Jan 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc