Socket
Socket
Sign inDemoInstall

eslint-config-uport

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-config-uport

code style configs for uport projects


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

uPort Shared ESLint Configs

An ESLint shareable config based on standardjs and using prettier for formatting.

Installation

Install this module as a dev dependency.

npm i -D eslint-config-uport

Install the peer dependencies of this module as dev dependencies.

npm i -D eslint babel-eslint eslint-config-prettier eslint-config-standard eslint-plugin-prettier prettier

Install the remaining peer dependencies of eslint-config-standard as dev dependencies.

npm i -D eslint-plugin-import eslint-plugin-node eslint-plugin-promise eslint-plugin-standard

Create .eslintrc.js in the root folder of your project and extend this configuration.

module.exports = {
  extends: 'uport',
  rules: {
    // configure your own custom rules
  }
}

Add the following scripts to your package.json

"scripts": {
  "lint": "eslint ./src",
  "format": "eslint --fix ./src"
}

VSCode Support

In order to allow the formatting to be handled through eslint along with automatic fixes when saving, you should disable the Prettier extension and make sure the eslint extension is enabled. Add the following configurations to your User Settings json:

  "editor.formatOnSave": false,
  "eslint.autoFixOnSave": true,
  "eslint.alwaysShowStatus": true

FAQs

Package last updated on 24 Oct 2018

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