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 55 "mocha": true
66 },
77 "rules": {
8+ "key-spacing": [2, {"align": "value"}],
89 "no-use-before-define": [2, "nofunc"]
910 }
1011}
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ export default function extractor({
2727 use,
2828 rootDir : context = process . cwd ( ) ,
2929} = { } , 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 ;
3333
3434 const plugins = ( use || [
3535 ...prepend ,
@@ -40,7 +40,7 @@ export default function extractor({
4040 createImportedName
4141 ? new ExtractImports ( { createImportedName} )
4242 : ExtractImports ,
43- new Scope ( { generateScopedName} ) ,
43+ new Scope ( { generateScopedName : scopedName } ) ,
4444 ...append ,
4545 ] ) . concat ( new Parser ( { fetch} ) ) ; // no pushing in order to avoid the possible mutations
4646
Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ import isFunction from 'lodash.isfunction';
33import isString from 'lodash.isstring' ;
44
55const check = {
6- 'array' : isArray ,
6+ 'array' : isArray ,
77 'function' : isFunction ,
8- 'string' : isString ,
8+ 'string' : isString ,
99} ;
1010
1111/**
Original file line number Diff line number Diff line change @@ -26,6 +26,6 @@ export default function validate(options = {}) {
2626
2727 if ( ! types . split ( '|' ) . some ( type => is ( type , options [ rule ] ) ) ) {
2828 throw new Error ( format ( 'should specify %s for the %s' , types , rule ) ) ;
29- } ;
29+ }
3030 } ) ;
3131}
Original file line number Diff line number Diff line change 1- import { ok , equal , throws } from 'assert' ;
1+ import { ok , equal } from 'assert' ;
22import { is , removeQuotes } from '../src/utility' ;
33
44describe ( 'utility' , ( ) => {
You can’t perform that action at this time.
0 commit comments