Skip to content

Commit 726132f

Browse files
committed
fixing linting for remixd
1 parent d0dd8a2 commit 726132f

File tree

5 files changed

+10
-13
lines changed

5 files changed

+10
-13
lines changed

libs/remixd/src/bin/remixd.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function errorHandler (error: any, service: string) {
7777
const options = program.opts();
7878
await warnLatestVersion()
7979

80-
if(options.install && !options.readOnly) {
80+
if (options.install && !options.readOnly) {
8181
if (options.install.toLowerCase() === 'slither') require('./../scripts/installSlither')
8282
process.exit(0)
8383
}
@@ -128,7 +128,7 @@ function errorHandler (error: any, service: string) {
128128
}
129129
// Run hardhat service if a hardhat project is shared as folder
130130
const hardhatConfigFilePath = absolutePath('./', options.sharedFolder)
131-
const isHardhatProject = existsSync(hardhatConfigFilePath + '/hardhat.config.js') || existsSync(hardhatConfigFilePath + '/hardhat.config.ts')
131+
const isHardhatProject = existsSync(hardhatConfigFilePath + '/hardhat.config.js') || existsSync(hardhatConfigFilePath + '/hardhat.config.ts')
132132
if (isHardhatProject) {
133133
startService('hardhat', (ws: WS, sharedFolderClient: servicesList.Sharedfolder, error: Error) => {
134134
if (error) {
@@ -141,7 +141,7 @@ function errorHandler (error: any, service: string) {
141141
}
142142
// Run foundry service if a founndry project is shared as folder
143143
const foundryConfigFilePath = absolutePath('./', options.sharedFolder)
144-
const isFoundryProject = existsSync(foundryConfigFilePath + '/foundry.toml')
144+
const isFoundryProject = existsSync(foundryConfigFilePath + '/foundry.toml')
145145
if (isFoundryProject) {
146146
startService('foundry', (ws: WS, sharedFolderClient: servicesList.Sharedfolder, error: Error) => {
147147
if (error) {

libs/remixd/src/services/foundryClient.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class FoundryClient extends PluginClient {
5252
listenOnFoundryFolder() {
5353
console.log('Foundry out folder doesn\'t exist... waiting for the compilation.')
5454
try {
55-
if(this.watcher) this.watcher.close()
55+
if (this.watcher) this.watcher.close()
5656
this.watcher = chokidar.watch(this.currentSharedFolder, { depth: 1, ignorePermissionErrors: true, ignoreInitial: true })
5757
// watch for new folders
5858
this.watcher.on('addDir', () => {
@@ -126,7 +126,7 @@ export class FoundryClient extends PluginClient {
126126
this.logTimeout = setTimeout(() => {
127127
// @ts-ignore
128128
this.call('terminal', 'log', { type: 'log', value: `receiving compilation result from Foundry` })
129-
console.log('Syncing compilation result from Foundry')
129+
console.log('Syncing compilation result from Foundry')
130130
}, 1000)
131131

132132
} catch (e) {
@@ -142,7 +142,7 @@ export class FoundryClient extends PluginClient {
142142

143143
listenOnFoundryCompilation() {
144144
try {
145-
if(this.watcher) this.watcher.close()
145+
if (this.watcher) this.watcher.close()
146146
this.watcher = chokidar.watch(this.cachePath, { depth: 0, ignorePermissionErrors: true, ignoreInitial: true })
147147
this.watcher.on('change', async () => await this.triggerProcessArtifact())
148148
this.watcher.on('add', async () => await this.triggerProcessArtifact())
@@ -193,7 +193,6 @@ export class FoundryClient extends PluginClient {
193193
console.log('\x1b[32m%s\x1b[0m', 'sources input not found, please update Foundry to the latest version.')
194194
}
195195

196-
197196
compilationResultPart.compilationTarget = contentJSON.ast.absolutePath
198197
// extract data
199198
if (!compilationResultPart.output['sources'][contentJSON.ast.absolutePath]) compilationResultPart.output['sources'][contentJSON.ast.absolutePath] = {}

libs/remixd/src/services/hardhatClient.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,12 @@ export class HardhatClient extends PluginClient {
143143
}
144144
}, 1000)
145145

146-
147146
}
148147

149148
listenOnHardHatFolder() {
150149
console.log('Hardhat artifacts folder doesn\'t exist... waiting for the compilation.')
151150
try {
152-
if(this.watcher) this.watcher.close()
151+
if (this.watcher) this.watcher.close()
153152
this.watcher = chokidar.watch(this.currentSharedFolder, { depth: 2, ignorePermissionErrors: true, ignoreInitial: true })
154153
// watch for new folders
155154
this.watcher.on('addDir', () => {
@@ -171,7 +170,7 @@ export class HardhatClient extends PluginClient {
171170
listenOnHardhatCompilation() {
172171
try {
173172
console.log('listening on Hardhat compilation...')
174-
if(this.watcher) this.watcher.close()
173+
if (this.watcher) this.watcher.close()
175174
this.watcher = chokidar.watch(this.buildPath, { depth: 1, ignorePermissionErrors: true, ignoreInitial: true })
176175
this.watcher.on('change', async () => await this.triggerProcessArtifact())
177176
this.watcher.on('add', async () => await this.triggerProcessArtifact())

libs/remixd/src/services/remixdClient.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,12 @@ export class RemixdClient extends PluginClient {
275275
})
276276
this.watcher.on('unlink', async (f: string) => {
277277
if (this.isLoaded) {
278-
this.emit('removed', utils.relativePath(f, this.currentSharedFolder), false)
278+
this.emit('removed', utils.relativePath(f, this.currentSharedFolder), false)
279279
}
280280
})
281281
this.watcher.on('unlinkDir', async (f: string) => {
282282
if (this.isLoaded) {
283-
this.emit('removed', utils.relativePath(f, this.currentSharedFolder), true)
283+
this.emit('removed', utils.relativePath(f, this.currentSharedFolder), true)
284284
}
285285
})
286286
}

libs/remixd/src/services/truffleClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ export class TruffleClient extends PluginClient {
100100
return true
101101
}
102102

103-
104103
private async processArtifact() {
105104
if (!this.checkPath()) return
106105
const folderFiles = await fs.readdir(this.buildPath)

0 commit comments

Comments
 (0)