File tree Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Expand file tree Collapse file tree 5 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 5
5
"mocha": true
6
6
},
7
7
"rules": {
8
+ "key-spacing": [2, {"align": "value"}],
8
9
"no-use-before-define": [2, "nofunc"]
9
10
}
10
11
}
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ export default function extractor({
27
27
use,
28
28
rootDir : context = process . cwd ( ) ,
29
29
} = { } , fetch ) {
30
- if ( typeof generateScopedName !== 'function' ) {
31
- generateScopedName = genericNames ( generateScopedName || '[name]__[local]___[hash:base64:5]' , { context} ) ;
32
- }
30
+ const scopedName = typeof generateScopedName !== 'function'
31
+ ? genericNames ( generateScopedName || '[name]__[local]___[hash:base64:5]' , { context} )
32
+ : generateScopedName ;
33
33
34
34
const plugins = ( use || [
35
35
...prepend ,
@@ -40,7 +40,7 @@ export default function extractor({
40
40
createImportedName
41
41
? new ExtractImports ( { createImportedName} )
42
42
: ExtractImports ,
43
- new Scope ( { generateScopedName} ) ,
43
+ new Scope ( { generateScopedName : scopedName } ) ,
44
44
...append ,
45
45
] ) . concat ( new Parser ( { fetch} ) ) ; // no pushing in order to avoid the possible mutations
46
46
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ import isFunction from 'lodash.isfunction';
3
3
import isString from 'lodash.isstring' ;
4
4
5
5
const check = {
6
- 'array' : isArray ,
6
+ 'array' : isArray ,
7
7
'function' : isFunction ,
8
- 'string' : isString ,
8
+ 'string' : isString ,
9
9
} ;
10
10
11
11
/**
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ export default function validate(options = {}) {
26
26
27
27
if ( ! types . split ( '|' ) . some ( type => is ( type , options [ rule ] ) ) ) {
28
28
throw new Error ( format ( 'should specify %s for the %s' , types , rule ) ) ;
29
- } ;
29
+ }
30
30
} ) ;
31
31
}
Original file line number Diff line number Diff line change 1
- import { ok , equal , throws } from 'assert' ;
1
+ import { ok , equal } from 'assert' ;
2
2
import { is , removeQuotes } from '../src/utility' ;
3
3
4
4
describe ( 'utility' , ( ) => {
You can’t perform that action at this time.
0 commit comments