vs-archive / eslint-rules-mapper Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED: Allows to map existing jshint/jscs rules to eslint
License: MIT License
DEPRECATED: Allows to map existing jshint/jscs rules to eslint
License: MIT License
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
.
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?
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
.
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
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
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.
Current version doesn't support (perhaps it's possible to add):
Version
$ npm --version eslint-rules-mapper
3.6.0
.jshintrc
"maxlen": 100,
.eslintrc
"max-len": [2, 100, 4, {"ignoreUrls": true}],
Great job on this ๐
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
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.