mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:31:43 +00:00
* disable slow eslint rules, remove unused disable directives Disabling these eslint rules makes saving significantly faster. These rules are not worthless, but they are usually ignored anyway, and I can't recall a specific instance when they would have caught a bug. I am proposing we disable them and then set a checkpoint in 14 days to rerun eslint with the rules enabled and see if they would have caught any bad practices. In the meantime, we will all benefit from instant saves (with eslint fixes) instead of waiting 3-5 seconds or more after each save in VS Code, which is destructive to productivity. * upgrade eslint
18 lines
727 B
TypeScript
18 lines
727 B
TypeScript
import childProcess from 'child_process'
|
|
import fs from 'fs'
|
|
|
|
const originalPackageJson = fs.readFileSync('package.json').toString()
|
|
|
|
try {
|
|
childProcess.execSync('pnpm build-inline-extensions && pnpm build', { stdio: 'inherit' })
|
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
const packageJson: any = JSON.parse(originalPackageJson)
|
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
packageJson.name = 'sourcegraph'
|
|
fs.writeFileSync('package.json', JSON.stringify(packageJson))
|
|
|
|
childProcess.execSync('vsce package --no-dependencies --allow-star-activation -o dist', { stdio: 'inherit' })
|
|
} finally {
|
|
fs.writeFileSync('package.json', originalPackageJson)
|
|
}
|