Skip to content

Commit ebdcf4d

Browse files
committed
Fix the object-shorthand warnings that popped up after eslint update
1 parent 196f913 commit ebdcf4d

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

formatters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export function formatFatalError (message) {
55
type: 'JSONError',
66
component: 'solcjs',
77
severity: 'error',
8-
message: message,
8+
message,
99
formattedMessage: 'Error: ' + message
1010
}
1111
]

smtsolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function solve (query, solver) {
4444
encoding: 'utf8',
4545
maxBuffer: 1024 * 1024 * 1024,
4646
stdio: 'pipe',
47-
timeout: timeout // Enforce timeout on the process, since solvers can sometimes go around it.
47+
timeout // Enforce timeout on the process, since solvers can sometimes go around it.
4848
}
4949
).toString();
5050
} catch (e) {

solc.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const cliInput = {
201201
}
202202
}
203203
},
204-
sources: sources
204+
sources
205205
};
206206
if (program.verbose) { console.log('>>> Compiling:\n' + toFormattedJson(cliInput) + '\n'); }
207207
const output = JSON.parse(solc.compile(JSON.stringify(cliInput), callbacks));

test/smtcallback.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ tape('SMTCheckerCallback', function (t) {
8585
const inputJSON = JSON.stringify({
8686
language: 'Solidity',
8787
sources: input,
88-
settings: settings
88+
settings
8989
});
9090

9191
let tests;
@@ -192,7 +192,7 @@ tape('SMTCheckerCallback', function (t) {
192192
expectations: expected,
193193
solidity: { test: { content: preamble + source } },
194194
ignoreCex: source.includes('// SMTIgnoreCex: yes'),
195-
engine: engine
195+
engine
196196
};
197197
}
198198

@@ -214,7 +214,7 @@ tape('SMTCheckerCallback', function (t) {
214214
const engine = test.engine !== undefined ? test.engine : 'all';
215215
settings = {
216216
modelChecker: {
217-
engine: engine,
217+
engine,
218218
solvers: [
219219
'smtlib2'
220220
]
@@ -225,7 +225,7 @@ tape('SMTCheckerCallback', function (t) {
225225
JSON.stringify({
226226
language: 'Solidity',
227227
sources: test.solidity,
228-
settings: settings
228+
settings
229229
}),
230230
// This test needs z3 specifically.
231231
{ smtSolver: smtchecker.smtCallback(smtsolver.smtSolver, z3HornSolvers[0]) }

test/smtchecker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ tape('SMTCheckerWithSolver', function (t) {
8484
const input = {
8585
language: 'Solidity',
8686
sources: source,
87-
settings: settings
87+
settings
8888
};
8989

9090
const output = JSON.parse(solc.compile(JSON.stringify(input)));

translate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function translateErrors (ret, errors) {
3838
type = 'Error';
3939
}
4040
ret.push({
41-
type: type,
41+
type,
4242
component: 'general',
4343
severity: (type === 'Warning') ? 'warning' : 'error',
4444
message: errors[error],

wrapper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ function compileStandardWrapper (compile, inputRaw, readCallback) {
101101

102102
// Try to wrap around old versions
103103
if (!isNil(compile.compileJsonCallback)) {
104-
const inputJson = JSON.stringify({ sources: sources });
104+
const inputJson = JSON.stringify({ sources });
105105
const output = compile.compileJsonCallback(inputJson, optimize, readCallback);
106106
return translateOutput(output, libraries);
107107
}
108108

109109
if (!isNil(compile.compileJsonMulti)) {
110-
const output = compile.compileJsonMulti(JSON.stringify({ sources: sources }), optimize);
110+
const output = compile.compileJsonMulti(JSON.stringify({ sources }), optimize);
111111
return translateOutput(output, libraries);
112112
}
113113

0 commit comments

Comments
 (0)