Skip to content

Commit

Permalink
report these warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Forster committed May 21, 2018
1 parent 2578dc6 commit 3540ed7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions script/changelog/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ export function getChangelogEntriesSince(previousVersion: string): string[] {
const root = Path.dirname(Path.dirname(__dirname))
const changelogPath = Path.join(root, 'changelog.json')

// eslint-disable-next-line no-sync
const buffer = Fs.readFileSync(changelogPath)
const changelogText = buffer.toString()

Expand Down
2 changes: 2 additions & 0 deletions script/dist-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ export function getWindowsIdentifierName() {
}

export function getBundleSizes() {
// eslint-disable-next-line no-sync
const rendererStats = Fs.statSync(
Path.join(projectRoot, 'out', 'renderer.js')
)
// eslint-disable-next-line no-sync
const mainStats = Fs.statSync(Path.join(projectRoot, 'out', 'main.js'))
return { rendererSize: rendererStats.size, mainSize: mainStats.size }
}
Expand Down
1 change: 1 addition & 0 deletions script/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ function upload(assetName: string, assetPath: string) {
if (error) {
reject(error)
} else {
// eslint-disable-next-line no-sync
const stats = Fs.statSync(assetPath)
const hash = Crypto.createHash('sha1')
hash.setEncoding('hex')
Expand Down
5 changes: 3 additions & 2 deletions script/run.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { join } from 'path'
import { spawn, SpawnOptions } from 'child_process'
import { statSync } from 'fs'
import * as Fs from 'fs'
import { getDistPath, getExecutableName } from './dist-info'

const distPath = getDistPath()
Expand All @@ -26,7 +26,8 @@ if (process.platform === 'darwin') {

export function run(spawnOptions: SpawnOptions) {
try {
const stats = statSync(binaryPath)
// eslint-disable-next-line no-sync
const stats = Fs.statSync(binaryPath)
if (!stats.isFile()) {
return null
}
Expand Down
1 change: 1 addition & 0 deletions script/validate-changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ function formatErrors(errors: Ajv.ErrorObject[]): string {
const repositoryRoot = Path.dirname(__dirname)
const changelogPath = Path.join(repositoryRoot, 'changelog.json')

// eslint-disable-next-line no-sync
const changelog = Fs.readFileSync(changelogPath, 'utf8')

let changelogObj = null
Expand Down

0 comments on commit 3540ed7

Please sign in to comment.