sourcegraph/client/vscode/scripts/package.ts
Quinn Slack 7e7de5ffb1
looser eslint rules (#63511)
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.
2024-06-27 08:42:51 +00:00

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)
}