Skip to content

Latest commit

 

History

History
95 lines (78 loc) · 3.48 KB

README.md

File metadata and controls

95 lines (78 loc) · 3.48 KB

ESLint config Namics

Build Status Build Status Dependencies npm Codestyle

Installation

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

Usage ES8 (ES2017)

  • @namics/eslint-config/configurations/es8-browser - ES8 + browser
  • @namics/eslint-config/configurations/es8-react - ES8 + react
  • @namics/eslint-config/configurations/es8-node - ES8 + node

Usage ES7 (ES2016)

  • @namics/eslint-config/configurations/es7-browser - ES7 + browser (deprecated)
  • @namics/eslint-config/configurations/es7-react - ES7 + react (deprecated)
  • @namics/eslint-config/configurations/es7-node - ES7 + node

Usage ES6 (ES2015) - deprecated

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

Usage with Flow

Usage with Prettier

.eslintrc.js (add globals here if needed)

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

.eslintignore

/.idea/
/node_modules/

package.json

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

then run npm run lint

Example usage in project tree

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

Documentation

Thanks to

License

MIT License

Changelog

Please see the Releases