File tree Expand file tree Collapse file tree 6 files changed +13
-9
lines changed Expand file tree Collapse file tree 6 files changed +13
-9
lines changed Original file line number Diff line number Diff line change
1
+ node_modules /
2
+ coverage /
3
+ .nyc_output /
4
+
Original file line number Diff line number Diff line change @@ -7,10 +7,6 @@ notifications:
7
7
email : false
8
8
node_js :
9
9
- ' 4'
10
- - iojs-v3
11
- - iojs-v2
12
- - iojs-v1
13
- - ' 0.12'
14
10
- ' 0.10'
15
11
before_install :
16
12
- npm i -g npm@^3.0.0
Original file line number Diff line number Diff line change 5
5
// Prints rules recognized by ESLint that don't appear in the given config
6
6
// preset. It helps with upgrading the preset when new ESLint gets released.
7
7
var path = require ( 'path' )
8
- var findNewRules = require ( '.' )
8
+ var isAbsolute = require ( 'path-is-absolute' )
9
+ var findNewRules = require ( './index' )
9
10
10
11
var currentRules = Object . keys ( getConfig ( ) . rules )
11
12
var newRules = findNewRules ( currentRules )
@@ -19,7 +20,7 @@ function getConfig() {
19
20
var specifiedFile = process . argv [ 2 ]
20
21
if ( specifiedFile ) {
21
22
// this is being called like: eslint-find-new-rules eslint-config-mgol
22
- if ( path . isAbsolute ( specifiedFile ) ) {
23
+ if ( isAbsolute ( specifiedFile ) ) {
23
24
return require ( specifiedFile )
24
25
} else {
25
26
return require ( path . join ( process . cwd ( ) , specifiedFile ) )
Original file line number Diff line number Diff line change @@ -6,7 +6,9 @@ module.exports = findNewRules
6
6
function findNewRules ( currentRules ) {
7
7
var allRules = fs
8
8
. readdirSync ( './node_modules/eslint/lib/rules' )
9
- . map ( filename => filename . replace ( / \. j s $ / , '' ) )
9
+ . map ( function removeJsFromFilename ( filename ) {
10
+ return filename . replace ( / \. j s $ / , '' )
11
+ } )
10
12
11
13
return difference ( allRules , currentRules )
12
14
}
Original file line number Diff line number Diff line change 24
24
],
25
25
"license" : " MIT" ,
26
26
"dependencies" : {
27
- "lodash.difference" : " 4.1.1"
27
+ "lodash.difference" : " 4.1.1" ,
28
+ "path-is-absolute" : " 1.0.0"
28
29
},
29
30
"devDependencies" : {
30
31
"ava" : " 0.13.0" ,
Original file line number Diff line number Diff line change 1
1
import mock from 'mock-fs'
2
2
import test from 'ava'
3
- import findNewRules from '.'
3
+ import findNewRules from './index '
4
4
5
5
try {
6
6
require ( './bin' ) // requiring now for coverage until this is tested
You can’t perform that action at this time.
0 commit comments