1.1.0 • Published 5 years ago

eslint-config-sr v1.1.0

Weekly downloads
7
License
-
Repository
github
Last release
5 years ago

Usage

Note

  1. eslint-config- is the prefix convention from eslint
  2. npm version <[patch, major, minor]> will update package.json npm publish will publish it

Install

# sh
npm install babel-eslint eslint \
  eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react \
  eslint-config-airbnb \
  --save-dev
npm install eslint-config-sr --save-dev

Please visit rules for more detail.

Config

Create a file called .eslintrc.yml and add code as below to get it work:

# .eslintrc.yml
extends:
  - 'sr/browser' # for browser uses
  - 'sr/node' # for node uses
  - 'sr' # whatever

If you need only partial configuration, you can do following below:

# .eslintrc.yml
extends:
  - "sr/rules/es2015"
  - "sr/rules/style"

Install IDE/editor plugin

You should install plugin for your IDE or editor.

Please visit http://eslint.org/docs/user-guide/integrations.html for more detail.