style: apply latest prettier and eslint rules
This commit is contained in:
parent
b01dae728b
commit
22099972d2
3 changed files with 9 additions and 19 deletions
|
@ -24,13 +24,8 @@ export class CreateNpmDirCommand extends Command {
|
|||
) => {
|
||||
const pkgJsonDir = config
|
||||
debug(`Read content from [${chalk.yellowBright(pkgJsonDir)}]`)
|
||||
const {
|
||||
platforms,
|
||||
packageName,
|
||||
version,
|
||||
binaryName,
|
||||
content,
|
||||
} = getNapiConfig(pkgJsonDir, cwd)
|
||||
const { platforms, packageName, version, binaryName, content } =
|
||||
getNapiConfig(pkgJsonDir, cwd)
|
||||
|
||||
for (const platformDetail of platforms) {
|
||||
const targetDir = join(
|
||||
|
|
|
@ -39,13 +39,8 @@ export class PrePublishCommand extends Command {
|
|||
|
||||
@Command.Path('prepublish')
|
||||
async execute() {
|
||||
const {
|
||||
packageJsonPath,
|
||||
platforms,
|
||||
version,
|
||||
packageName,
|
||||
binaryName,
|
||||
} = getNapiConfig(this.configFileName)
|
||||
const { packageJsonPath, platforms, version, packageName, binaryName } =
|
||||
getNapiConfig(this.configFileName)
|
||||
debug(`Update optionalDependencies in [${packageJsonPath}]`)
|
||||
if (!this.isDryRun) {
|
||||
await VersionCommand.updatePackageJson(this.prefix, this.configFileName)
|
||||
|
|
10
package.json
10
package.json
|
@ -18,12 +18,12 @@
|
|||
"build:test:android": "yarn --cwd ./test_module build --target aarch64-linux-android",
|
||||
"build:test:armv7": "yarn --cwd ./test_module build-armv7",
|
||||
"format": "run-p format:md format:json format:yaml format:source format:rs",
|
||||
"format:md": "prettier --parser markdown --write './**/*.md'",
|
||||
"format:json": "prettier --parser json --write './**/*.json'",
|
||||
"format:md": "prettier --parser markdown --write ./**/*.md",
|
||||
"format:json": "prettier --parser json --write ./**/*.json",
|
||||
"format:rs": "cargo fmt",
|
||||
"format:source": "prettier --config ./package.json --write './**/*.{js,ts}'",
|
||||
"format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
|
||||
"lint": "eslint -c .eslintrc.yml './cli/**/*.ts' './test_module/**/*.{ts,js}'",
|
||||
"format:source": "prettier --config ./package.json --write ./**/*.{js,ts}",
|
||||
"format:yaml": "prettier --parser yaml --write ./**/*.{yml,yaml}",
|
||||
"lint": "eslint -c .eslintrc.yml ./cli/**/*.ts ./test_module/**/*.{ts,js}",
|
||||
"prepublishOnly": "npm run build && pinst --disable",
|
||||
"test": "ava",
|
||||
"postinstall": "husky install",
|
||||
|
|
Loading…
Reference in a new issue