Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-config-vizzuality

Package Overview
Dependencies
Maintainers
7
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 1.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
7
Created
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

Package last updated on 09 Jan 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc