forked from sarbbottam/eslint-find-rules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sarbbottam#200 from sarbbottam/es-next
refactor(convention): using es-next conventions
- Loading branch information
Showing
20 changed files
with
636 additions
and
686 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,10 @@ cache: | |
notifications: | ||
email: false | ||
node_js: | ||
- stable | ||
- '0.10' | ||
before_install: | ||
- npm i -g npm@^3.0.0 | ||
- 'node' | ||
- '6' | ||
before_script: | ||
- npm prune | ||
- if [[ `node -v | sed 's/[^0-9\.]//g'` < 1 ]]; then npm i [email protected]; fi | ||
script: | ||
- npm run validate | ||
after_success: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,24 @@ | |
"name": "eslint-find-rules", | ||
"version": "0.0.0-semantically-released", | ||
"description": "Find built-in ESLint rules you don't have in your custom config.", | ||
"main": "src/lib/rule-finder.js", | ||
"main": "dist/lib/rule-finder.js", | ||
"scripts": { | ||
"cover": "nyc --reporter=lcov --reporter=text npm test", | ||
"lint": "xo", | ||
"test": "mocha --recursive", | ||
"lint": "eslint --ignore-pattern test/fixtures .", | ||
"update-contributors": "all-contributors generate", | ||
"commit": "git-cz", | ||
"validate": "npm-run-all --parallel lint cover --sequential check-coverage", | ||
"check-coverage": "nyc check-coverage --statements 100 --branches 100 --functions 100 --lines 100", | ||
"prebuild": "rimraf dist", | ||
"build": "babel src -d dist --presets es2015", | ||
"report-coverage": "cat ./coverage/lcov.info | node_modules/.bin/codecov", | ||
"semantic-release": "semantic-release pre && npm publish && semantic-release post", | ||
"travis-after-all": "travis-after-all && npm run report-coverage && npm run semantic-release" | ||
}, | ||
"bin": { | ||
"eslint-find-rules": "src/bin/find.js", | ||
"eslint-diff-rules": "src/bin/diff.js" | ||
"eslint-find-rules": "dist/bin/find.js", | ||
"eslint-diff-rules": "dist/bin/diff.js" | ||
}, | ||
"keywords": [], | ||
"author": "Michał Gołębiowski <[email protected]>", | ||
|
@@ -37,39 +39,29 @@ | |
}, | ||
"devDependencies": { | ||
"all-contributors-cli": "3.0.6", | ||
"babel-cli": "6.18.0", | ||
"babel-core": "6.18.0", | ||
"babel-preset-es2015": "6.18.0", | ||
"codecov": "1.0.1", | ||
"commitizen": "2.8.6", | ||
"cz-conventional-changelog": "1.2.0", | ||
"eslint": "3.5.0", | ||
"eslint-config-kentcdodds": "6.2.0", | ||
"ghooks": "1.3.2", | ||
"mocha": "^3.0.1", | ||
"npm-run-all": "3.1.0", | ||
"nyc": "6.6.1", | ||
"opt-cli": "^1.1.1", | ||
"proxyquire": "1.7.10", | ||
"rimraf": "^2.6.0", | ||
"semantic-release": "4.3.5", | ||
"sinon": "^1.17.3", | ||
"travis-after-all": "^1.4.4", | ||
"validate-commit-msg": "2.8.0" | ||
"validate-commit-msg": "2.8.0", | ||
"xo": "^0.17.0" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^2.0.0 || ^3.0.0" | ||
}, | ||
"eslintConfig": { | ||
"extends": "kentcdodds", | ||
"parserOptions": { | ||
"ecmaVersion": 5 | ||
}, | ||
"env": { | ||
"mocha": true | ||
}, | ||
"rules": { | ||
"no-var": 0, | ||
"func-names": 0, | ||
"object-shorthand": 0 | ||
} | ||
}, | ||
"nyc": { | ||
"exclude": [ | ||
"test/**/*" | ||
|
@@ -91,5 +83,12 @@ | |
"bugs": { | ||
"url": "https://github.com/sarbbottam/eslint-find-rules/issues" | ||
}, | ||
"homepage": "https://github.com/sarbbottam/eslint-find-rules#readme" | ||
"homepage": "https://github.com/sarbbottam/eslint-find-rules#readme", | ||
"xo": { | ||
"envs": [ | ||
"mocha" | ||
], | ||
"esnext": true, | ||
"space": true | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
function difference(a, b) { | ||
var hash = {} | ||
var diff = {} | ||
|
||
b.forEach(function createHash(item) { | ||
hash[item] = true | ||
}) | ||
|
||
a.forEach(function findDiff(item) { | ||
if (!hash[item] && !diff[item]) { | ||
diff[item] = true | ||
} | ||
}) | ||
|
||
return Object.keys(diff) | ||
|
||
return a.filter(item => !b.includes(item)).sort((a, b) => a > b); | ||
} | ||
|
||
module.exports = difference | ||
module.exports = difference; |
Oops, something went wrong.