Skip to content

Commit 17554ec

Browse files
committed
lint:fix
1 parent b223978 commit 17554ec

File tree

3 files changed

+35
-34
lines changed

3 files changed

+35
-34
lines changed

internals/webpack/webpack.config.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ var config = { // eslint-disable-line
3838
if (env === 'production') {
3939
config.output.filename = filename + '.min.js'; // eslint-disable-line
4040
config.plugins
41-
.push(new webpack.optimize.UglifyJsPlugin({
42-
compressor: {
43-
pure_getters: true,
44-
unsafe: true,
45-
unsafe_comps: true,
46-
warnings: false,
47-
screw_ie8: false,
48-
},
49-
mangle: {
50-
screw_ie8: false,
51-
},
52-
output: {
53-
screw_ie8: false,
54-
},
55-
}));
41+
.push(new webpack.optimize.UglifyJsPlugin({
42+
compressor: {
43+
pure_getters: true,
44+
unsafe: true,
45+
unsafe_comps: true,
46+
warnings: false,
47+
screw_ie8: false,
48+
},
49+
mangle: {
50+
screw_ie8: false,
51+
},
52+
output: {
53+
screw_ie8: false,
54+
},
55+
}));
5656
}
5757

5858
module.exports = config;

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ function getKeys(params, key, allowEmpty) {
159159
var value = params[i][key]; // eslint-disable-line
160160
if (allowEmpty && !value) {
161161
value = '';
162-
} else if (typeof(value) !== 'string') {
162+
} else if (typeof (value) !== 'string') {
163163
throw new Error('invalid abi');
164164
}
165165
result.push(value);
@@ -177,7 +177,7 @@ function getKeys(params, key, allowEmpty) {
177177
* @returns {Boolean} output the string is a hex string
178178
*/
179179
function isHexString(value, length) {
180-
if (typeof(value) !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) {
180+
if (typeof (value) !== 'string' || !value.match(/^0x[0-9A-Fa-f]*$/)) {
181181
return false;
182182
}
183183

src/tests/test.index.js

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
const util = require('../index.js');
1+
/* eslint-disable import/no-extraneous-dependencies */
22
const assert = require('chai').assert;
33
const BN = require('bn.js');
4+
const util = require('../index.js');
45

56
describe('check all exports', () => {
67
it('should have all exports available', () => {
78
const expected = ['arrayContainsArray',
8-
'toBuffer',
9-
'intToBuffer',
10-
'getBinarySize',
11-
'stripHexPrefix',
12-
'isHexPrefixed',
13-
'padToEven',
14-
'intToHex',
15-
'fromAscii',
16-
'fromUtf8',
17-
'toAscii',
18-
'getKeys',
19-
'isHexString',
20-
'toUtf8'];
9+
'toBuffer',
10+
'intToBuffer',
11+
'getBinarySize',
12+
'stripHexPrefix',
13+
'isHexPrefixed',
14+
'padToEven',
15+
'intToHex',
16+
'fromAscii',
17+
'fromUtf8',
18+
'toAscii',
19+
'getKeys',
20+
'isHexString',
21+
'toUtf8'];
2122

2223
Object.keys(util).forEach((utilKey) => {
2324
assert.equal(expected.includes(utilKey), true, utilKey);
@@ -330,9 +331,9 @@ describe('check all exports', () => {
330331
});
331332

332333
const toUtf8Tests = [
333-
{ value: '0x6d79537472696e67', expected: 'myString' },
334-
{ value: '0x6d79537472696e6700', expected: 'myString' },
335-
{ value: '0x65787065637465642076616c7565000000000000000000000000000000000000', expected: 'expected value' },
334+
{ value: '0x6d79537472696e67', expected: 'myString' },
335+
{ value: '0x6d79537472696e6700', expected: 'myString' },
336+
{ value: '0x65787065637465642076616c7565000000000000000000000000000000000000', expected: 'expected value' },
336337
];
337338

338339
describe('toUtf8', () => {

0 commit comments

Comments
 (0)