eslint-config-ericmasiello
My preferred eslint configuration
Last updated 3 years ago by ericmasiello .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install eslint-config-ericmasiello 
SYNC missed versions from official npm registry.

What you get

Out of the box, this configuration is appropriate for any ES2015 projects running in the browser or Node. There are additional configurations you can add to extend the base configuration. These include:

  • Flow: eslint-config-ericmasiello/flow
  • React: eslint-config-ericmasiello/react
  • React Native: eslint-config-ericmasiello/react-native
  • Mocha: eslint-config-ericmasiello/mocha
  • Jest: eslint-config-ericmasiello/jest

Installation

npm:

(
  export PKG=eslint-config-ericmasiello;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)

Yarn:

(
  export PKG=eslint-config-ericmasiello;
  npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs yarn add -D "$PKG@latest"
)

Configure your project

Create the eslint files

touch .eslintrc.js .eslintignore

Inside of .eslintrc.js add the following:

module.exports = {
  extends: 'eslint-config-ericmasiello'
};

Note: if you wish to use any of the other addon configurations that extend the base linting ruleset, you can add them like so:

module.exports = {
  extends: [
    'eslint-config-ericmasiello',
    'eslint-config-ericmasiello/react',
    'eslint-config-ericmasiello/react-native',
    'eslint-config-ericmasiello/flow',
    'eslint-config-ericmasiello/jest',
  ]
};

Pick and choose whichever are appropriate for your project.

If you are using the React Native configuration, add the following to your .eslintignore

android
ios

Then finally, add the following script to your package.json.

"scripts": {  
  "lint": "eslint . '**/.*.js' --cache",
  "lint:fix": "npm run lint -- --fix",
},

Note this may need to be customized for your own project. See the eslint CLI documentation http://eslint.org/docs/user-guide/command-line-interface

Current Tags

  • 1.2.0                                ...           latest (3 years ago)

14 Versions

  • 1.2.0                                ...           3 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
  • 1.0.0-beta.2                                ...           3 years ago
  • 1.0.0-beta.1                                ...           3 years ago
  • 1.0.0-alpha.2                                ...           3 years ago
  • 1.0.0-alpha.1                                ...           3 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 9
Dependencies (1)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |