Coder Social home page Coder Social logo

eslint-rules-mapper's People

Contributors

adborden avatar avdg avatar pdehaan avatar valorkin avatar

Stargazers

 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

Watchers

 avatar  avatar  avatar  avatar  avatar

eslint-rules-mapper's Issues

Still in development?

Is this project still in development? I have plenty of JSHint based projects I would like to migrate to ESLint โ€“ without dealing with one-to-one mapping work. The current script throws an error.

Update ESLint version

Hi, this looks like a very useful package, if it works correctly. Is there a reason that the ESLint dependency is so old (0.12.0, current is 0.18.0)? Have you been keeping up with any rules changes since then? Ideally, it would be cool to find a way to automatically detect changes in ESLint rules and either update this tool or at least flag them for manual intervention. Any thoughts about that?

Move `globals` into root .eslintrc object

Currently, it seems like globals are converted from the .jshintrc file, but left in the rules object. The globals object should be at the same level as the rules and envs.

Instructions in README result in permissions error in ZSH

This can be fixed by running node index ./path/to/.jshintrc > ./.eslintrc instead. > instead of |.

Running node index ./path/to/.jshintrc | ./.eslintrc results in:

zsh: no such file or directory: ./.eslintrc
module.js:338
    throw err;

and then

zsh: permission denied: ./.eslintrc
events.js:85
      throw er; // Unhandled 'error' event

Make this a CLI package

Are you interested in making this package user-friendly and pushing it as a jshint-switcher tool?

I could work meow into it to use it like:

    eslint-rules-mapper .jshintrc
    #or
    eslint-rules-mapper /path/to/paradise/
    #or
    eslint-rules-mapper

And it will automatically read the current .jshintrc file and spit out an .eslintrc file

Publish to npm?

Hey, I'm just looking for options on how I can use this code as I have to maintain eslintrc as rclintrc files. I could copy the code, but its way easier to maintain for everybody I guess if the code is simply on npm though I would understand that setting it up and maintaining it can be a bit too much.

Add max-* and complexity

Current version doesn't support (perhaps it's possible to add):

  • "max-depth": [1, 6],
  • "max-params": [2, 6],
  • "complexity": [1, 6],
  • "max-len": [2, 100, 4, {"ignoreUrls": true}],
  • 'global-strict' converts but has been replaced with 'strict' in latest eslint version

Version

$ npm --version eslint-rules-mapper 
3.6.0

.jshintrc

"maxlen": 100,

.eslintrc

"max-len": [2, 100, 4, {"ignoreUrls": true}],

Great job on this ๐Ÿ‘

Though JSHint supports comments, this tools doesn't

I recommend using strip-json-comments to fix this.

I temporarily hacked this by running strip-json-comments .jshintrc > jshint.json

Output of this tool:

  /*
  ^
SyntaxError: Unexpected token /
    at Object.parse (native)
    at Object.<anonymous> (/Users/jwomack/Projects/github/valorkin/eslint-rules-mapper/index.js:23:24)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)
    at startup (node.js:129:16)
    at node.js:814:3

File it's not handling:

{
  /*
   * ENVIRONMENTS
   * =================
   */

  // Define globals exposed by modern browsers.
  "browser": true,

  // Define globals exposed by Node.js.
  "node": true,

  "mocha": true,

  "esnext": true,

  /*
   * ENFORCING OPTIONS
   * =================
   */

  // Prohibit use of == and != in favor of === and !==.
  "eqeqeq": true,

  // Require capitalized names for constructor functions.
  "newcap": true,

  // Prohibit use of explicitly undeclared variables.
  "undef": true,

  // Warn when variables are defined but never used.
  "unused": true,

  "newcap": false,

  "quotmark": "single",

  /*
   * RELAXING OPTIONS
   * =================
   */

  // Suppress warnings about == null comparisons.
  "asi": true,
  "eqnull": true,
  "expr": true
}

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.