mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 17:11:49 +00:00
Turn off 2 low-value eslint rules that add a lot of noise: - `@typescript-eslint/no-explicit-any` because if you mean to use `any` then you probably mean to. We still have eslint warnings for `any` member access, which is indeed riskier. - `@typescript-eslint/no-non-null-assertion` because if you type `!` then you mean it. Both of these have hundreds of warnings in our current codebase, so this significantly reduces the eslint noise and makes it so that the higher-value eslint rules are more noticeable.
17 lines
660 B
TypeScript
17 lines
660 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' })
|
|
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)
|
|
}
|