Giter Site home page Giter Site logo

eslint-config-andyet's People

Contributors

latentflip avatar nlf avatar pdehaan avatar wraithgar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

eslint-config-andyet's Issues

Plugin dependencies

In npm3 there is a flatter dependency tree which means when eslint-plugin-hapi is installed as a dependency of eslint-config-andyet it gets installed at the top level, and is therefore requireable by eslint...most of the time.

But if we already have eslint-plugin-hapi@1 installed and then install eslint-config-andyet, then eslint will use v1 of the plugin.

Eslint is aware of this issue and it looks like v2 might solve it next month.

Example

package.json

"devDependencies": {
  "eslint": "^1.10.3",
  "eslint-config-andyet": "^1.0.0",
  "eslint-plugin-hapi": "^1.2.2"
}

.eslintrc

{
  "extends": "andyet"
}

Running eslint . on some otherwise error free code then produces this output:

> eslint .


/Users/lukekarrys/Desktop/test/index.js
  1:1  error  Definition for rule 'hapi/no-arrowception' was not found  hapi/no-arrowception

โœ– 1 problem (1 error, 0 warnings)

Possible Solutions

  • Use peerDependencies. This would be annoying if we use this repo as a source for multiple configs (frontend, backend, es6, es5, etc). If you only want to lint frontend on a project you will still need to install all the peer dependency plugins for the other config types.
  • Use peerDependencies and split up the configs to separate repos/packages. This would solve the above issue, but may be be more difficult to maintain.
  • Don't specify plugin dependencies and use documentation instead for which plugins you'll need
## For backend
npm install eslint-config-andyet eslint-config-hapi ... --save-dev
# For frontend
npm install eslint-config-andyet babel-eslint eslint-plugin-react ... --save-dev
  • Not worry about it, and instead document that you shoudn't install any conflicting eslint-plugins or configs.

Breaks under eslint@2

  1:1  error  Rule 'space-after-keywords' was removed and replaced by: keyword-spacing     space-after-keywords
  1:1  error  Rule 'space-return-throw-case' was removed and replaced by: keyword-spacing  space-return-throw-case

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.