Skip to content

Latest commit

 

History

History
94 lines (80 loc) · 3.26 KB

README.md

File metadata and controls

94 lines (80 loc) · 3.26 KB

ESLint config Namics

Build Status Build Status Dependencies npm Codestyle

Installation

$ npm install --save-dev eslint eslint-plugin-import @namics/eslint-config

Usage

  • @namics/eslint-config/configurations/es6-browser - ES6 + browser
  • @namics/eslint-config/configurations/es6-react - ES6 + react
  • @namics/eslint-config/configurations/es6-node - ES6 + node
  • @namics/eslint-config/configurations/flow - flow
  • @namics/eslint-config/configurations/es5-browser - ES5 + browser (deprecated)
  • @namics/eslint-config/configurations/es5-node - ES5 + node (deprecated)

.eslintrc.js (add globals here if needed)

module.exports = {
  "extends": "@namics/eslint-config/configurations/es6-browser.js"
}

with flow

Flowtype rules will be accepted if the flow annotation was defined in first line of each file.

module.exports = {
  "extends": [
    "@namics/eslint-config/configurations/flow.js"
    "@namics/eslint-config/configurations/es6-react.js"
  ],
}

.eslintignore

/.idea/
/node_modules/

package.json

"scripts": {
  "lint": "npm run lint:js",
  "lint:js": "node_modules/.bin/eslint src/**/*.jsx src/**/*.js"
},

then run npm run lint

Example usage in project tree

  • .eslintrc.js (es6-react)
  • .eslintignore
  • src
    • app.jsx
  • test
    • .eslintrc.js (es6-node)
    • index.js
  • scripts
    • .eslintrc.js (es5-node)
    • index.js

Documentation

Thanks to

Roadmap

  • Support for ES2016 (ES7)

License

MIT License

Changelog

Please see the Releases