eslint-config-uport

0.0.1 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-config-uport

Weekly Downloads

1

Version

0.0.1

License

MIT

Unpacked Size

2.47 kB

Total Files

3

Last publish

Collaborators

  • mike.xu