Skip to content

kanmu/eslint-config

Repository files navigation

eslint-config-kanmu

NPM version Build Status License

ESLint configurations for Kanmu.

Installation

npm install --save-dev eslint eslint-config-kanmu

Usage

Add .eslintrc (YAML).

Summary

  • Base
    • kanmu: ES2015
    • kanmu/es5: ES5
  • Optional
    • kanmu/browser: Browser env
    • kanmu/flow: for Flow
    • kanmu/flow-jsdoc: for JSDoc and Flow
    • kanmu/node: for Node.js env
    • kanmu/react: for React
    • kanmu/react-native: for React Native
    • kanmu/mocha: for Testing mocha

Examples

ES6 (Node.js)

extends:
  - kanmu
  - kanmu/node

ES5 (Browser)

extends:
  - kanmu/es5
  - kanmu/browser

React

extends:
  - kanmu
  - kanmu/browser
  - kanmu/react
Additional Requirements
npm install --save-dev eslint-plugin-react

React Native

extends:
  - kanmu
  - kanmu/react-native
Additional Requirements
npm install --save-dev eslint-plugin-react eslint-plugin-react-native

React Native with Flow

extends:
  - kanmu
  - kanmu/react-native
  - kanmu/flow
  - kanmu/flow-jsdoc
Additional Requirements
npm install --save-dev eslint-plugin-flowtype eslint-plugin-jsdoc eslint-plugin-react eslint-plugin-react-native eslint-plugin-import