Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ef58c9c

Browse files
fixed linter errors
1 parent e335520 commit ef58c9c

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

‎.eslintrc‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"mocha": true
66
},
77
"rules": {
8+
"key-spacing": [2, {"align": "value"}],
89
"no-use-before-define": [2, "nofunc"]
910
}
1011
}

‎src/extractor.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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+
constscopedName=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

‎src/utility.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import isFunction from 'lodash.isfunction';
33
import isString from 'lodash.isstring';
44

55
const check = {
6-
'array': isArray,
6+
'array': isArray,
77
'function': isFunction,
8-
'string': isString,
8+
'string': isString,
99
};
1010

1111
/**

‎src/validate.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
}

‎test/utility.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ok, equal,throws } from 'assert';
1+
import { ok, equal } from 'assert';
22
import { is, removeQuotes } from '../src/utility';
33

44
describe('utility', () => {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /