Giter VIP home page Giter VIP logo

eslint-config-earnest-es7's Introduction

eslint-config-earnest-es7

Earnest's ESLint config for ES7

Usage

  1. Install the following "devDependencies" in your repo:

    npm install @earnest/eslint-config-es7@latest babel-core babel-cli babel-eslint babel-preset-es2015 babel-preset-stage-3 eslint eslint-plugin-babel --save-dev
    
  2. Add a root level .eslintrc that references this package

    echo '{"extends": "@earnest/eslint-config-es7"}' > .eslintrc
    

    Alternatively add this entry to your package.json:

    "eslintConfig": {
      "extends": "@earnest/eslint-config-es7"
    }
  3. Add another .eslintrc to your test folder that supports mocha

    npm install eslint-plugin-mocha --save-dev
    echo '{"extends": "@earnest/eslint-config-es7/mocha"}' > test/.eslintrc
    
  4. (Recommended) Add the following entries to your package.json for simplified CLI access to linting:

    "scripts": {
      "lint": "eslint .",
      "lint-changed": "git diff --name-only --cached --relative | grep '\\.js$' | xargs ./node_modules/.bin/eslint"
    }
  5. (Recommended) Setup your editor to support inline ESLint support. For Sublime Text, that means npm install --global eslint then installing SublimeLinter and SublimeLinter-contrib-eslint packages. For Vim, use ALE or Syntastic. (ALE is asynchronous and requires Vim 8.)

Linting this Repository

In order to run linting against this repository, you must create a self-referential link to this module:

npm install
npm link
npm link @earnest/eslint-config-es7
npm run lint

eslint-config-earnest-es7's People

Contributors

alockwood05 avatar bromanko avatar francis-whitesell-earnest avatar jhurliman avatar jsatk avatar niftylettuce avatar pon avatar ryanpon avatar wennergr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

wennergr2

eslint-config-earnest-es7's Issues

Clean install fails

With these steps to reproduce:

  1. rm -rf node_modules
  2. npm install

I get the following error:

npm WARN peerDependencies The peer dependency eslint@<2.0.0 included from babel-eslint will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
...
npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants eslint@>=1.0.0
npm ERR! peerinvalid Peer [email protected] wants eslint@^2.0.0
npm ERR! peerinvalid Peer [email protected] wants eslint@<2.0.0

This happens in this repo (eslint-config-earnest-es7) directly and any repo which attempts to include it. Particularly with clean installs (such as fresh Docker containers).

I'm not familiar with how peerDependencies are expected to work, so any help would be appreciated as it seems this repo explicitly uses peerDependencies.

@DeirdreHolub @ryanpon

Upgrade dependencies

npm WARN @earnest/[email protected] requires a peer of eslint-plugin-mocha@^2.0.0 but none was installed.

Can we get eslint-plugin-mocha updated so this warning will go away?

Inconsistent with original eslint config

This repo shouldn't diverge from the original eslint config except where necessary because of new language features. We'll be fragmenting the company's code style otherwise.

Transition from var to let/const

@jsatk @cusackalex

I've already been writing all of my code this way, but didn't realize there were eslint rules to enforce it.

    "no-var": 2,
    "prefer-const": 2,

These two rules will block the use of the deprecated var keyword, and require const over let when a variable is never reassigned. Change suggested by @ryanpon. If this sounds reasonable I can submit a PR.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.