Last active
April 14, 2016 21:44
-
-
Save zpao/f7013c13715e666f0855bd706e4754c5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Finds rules that are supported by ESLint but not defined in our config. | |
*/ | |
var ourRules = new Set(Object.keys(require('./.eslintrc.js').rules)) | |
var supportedRules = new Set(Object.keys(require('./node_modules/eslint/lib/load-rules')())); | |
var missing = new Set(); | |
var extra = new Set(); | |
ourRules.forEach((rule) => { | |
if (!supportedRules.has(rule)) { | |
extra.add(rule); | |
} | |
}); | |
supportedRules.forEach((rule) => { | |
if (!ourRules.has(rule)) { | |
missing.add(rule); | |
} | |
}); | |
console.log('missing', missing); | |
console.log('extra', extra); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment