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
|
const pkgJsonDir = config
|
||||||
debug(`Read content from [${chalk.yellowBright(pkgJsonDir)}]`)
|
debug(`Read content from [${chalk.yellowBright(pkgJsonDir)}]`)
|
||||||
const {
|
const { platforms, packageName, version, binaryName, content } =
|
||||||
platforms,
|
getNapiConfig(pkgJsonDir, cwd)
|
||||||
packageName,
|
|
||||||
version,
|
|
||||||
binaryName,
|
|
||||||
content,
|
|
||||||
} = getNapiConfig(pkgJsonDir, cwd)
|
|
||||||
|
|
||||||
for (const platformDetail of platforms) {
|
for (const platformDetail of platforms) {
|
||||||
const targetDir = join(
|
const targetDir = join(
|
||||||
|
|
|
@ -39,13 +39,8 @@ export class PrePublishCommand extends Command {
|
||||||
|
|
||||||
@Command.Path('prepublish')
|
@Command.Path('prepublish')
|
||||||
async execute() {
|
async execute() {
|
||||||
const {
|
const { packageJsonPath, platforms, version, packageName, binaryName } =
|
||||||
packageJsonPath,
|
getNapiConfig(this.configFileName)
|
||||||
platforms,
|
|
||||||
version,
|
|
||||||
packageName,
|
|
||||||
binaryName,
|
|
||||||
} = getNapiConfig(this.configFileName)
|
|
||||||
debug(`Update optionalDependencies in [${packageJsonPath}]`)
|
debug(`Update optionalDependencies in [${packageJsonPath}]`)
|
||||||
if (!this.isDryRun) {
|
if (!this.isDryRun) {
|
||||||
await VersionCommand.updatePackageJson(this.prefix, this.configFileName)
|
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:android": "yarn --cwd ./test_module build --target aarch64-linux-android",
|
||||||
"build:test:armv7": "yarn --cwd ./test_module build-armv7",
|
"build:test:armv7": "yarn --cwd ./test_module build-armv7",
|
||||||
"format": "run-p format:md format:json format:yaml format:source format:rs",
|
"format": "run-p format:md format:json format:yaml format:source format:rs",
|
||||||
"format:md": "prettier --parser markdown --write './**/*.md'",
|
"format:md": "prettier --parser markdown --write ./**/*.md",
|
||||||
"format:json": "prettier --parser json --write './**/*.json'",
|
"format:json": "prettier --parser json --write ./**/*.json",
|
||||||
"format:rs": "cargo fmt",
|
"format:rs": "cargo fmt",
|
||||||
"format:source": "prettier --config ./package.json --write './**/*.{js,ts}'",
|
"format:source": "prettier --config ./package.json --write ./**/*.{js,ts}",
|
||||||
"format:yaml": "prettier --parser yaml --write './**/*.{yml,yaml}'",
|
"format:yaml": "prettier --parser yaml --write ./**/*.{yml,yaml}",
|
||||||
"lint": "eslint -c .eslintrc.yml './cli/**/*.ts' './test_module/**/*.{ts,js}'",
|
"lint": "eslint -c .eslintrc.yml ./cli/**/*.ts ./test_module/**/*.{ts,js}",
|
||||||
"prepublishOnly": "npm run build && pinst --disable",
|
"prepublishOnly": "npm run build && pinst --disable",
|
||||||
"test": "ava",
|
"test": "ava",
|
||||||
"postinstall": "husky install",
|
"postinstall": "husky install",
|
||||||
|
|
Loading…
Reference in a new issue