From a7e9f82fd9f51f81117aa7d7397430e206c66503 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Fri, 10 Dec 2021 16:55:55 +0800 Subject: [PATCH] style: run fmt --- cli/package.json | 12 ++++++++++-- package.json | 16 ++++++++++------ triples/package.json | 14 ++++++++++++-- 3 files changed, 32 insertions(+), 10 deletions(-) diff --git a/cli/package.json b/cli/package.json index 404ff0f3..8d45c94b 100644 --- a/cli/package.json +++ b/cli/package.json @@ -2,14 +2,22 @@ "name": "@napi-rs/cli", "version": "2.0.0-beta.4", "description": "Cli tools for napi-rs", - "keywords": ["cli", "rust", "napi", "n-api", "neon"], + "keywords": [ + "cli", + "rust", + "napi", + "n-api", + "neon" + ], "author": "LongYinan ", "homepage": "https://github.com/napi-rs/napi-rs", "license": "MIT", "bin": { "napi": "./scripts/index.js" }, - "files": ["scripts"], + "files": [ + "scripts" + ], "engines": { "node": ">= 10" }, diff --git a/package.json b/package.json index c67e2573..1d9e3376 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,11 @@ "version": "0.0.0", "description": "A minimal library for building compiled Node add-ons in Rust.", "private": "true", - "workspaces": ["cli", "triples", "memory-testing"], + "workspaces": [ + "cli", + "triples", + "memory-testing" + ], "repository": { "type": "git", "url": "git@github.com:Brooooooklyn/napi-rs.git" @@ -20,7 +24,8 @@ "build:test:android:armv7": "yarn --cwd ./examples/napi-compat-mode build --target armv7-linux-androideabi && yarn --cwd ./examples/napi build --target armv7-linux-androideabi", "build:test:armv7": "yarn --cwd ./examples/napi-compat-mode build-armv7 && yarn --cwd ./examples/napi build-armv7", "bundle": "rollup -c rollup.config.js", - "format": "prettier . -w && yarn format:rs", + "format": "run-p format:prettier format:rs", + "format:prettier": "prettier . -w", "format:rs": "cargo fmt", "lint": "eslint -c .eslintrc.yml .", "prepublishOnly": "npm run build && pinst --disable", @@ -41,10 +46,9 @@ "arrowParens": "always" }, "lint-staged": { - "*.js": ["prettier --write"], - "*.@(yml|yaml)": ["prettier --parser yaml --write"], - "*.json": ["prettier --parser json --write"], - "*.md": ["prettier --parser markdown --write"] + "*.@(js|json|md|yml|yaml)": [ + "prettier --write" + ] }, "husky": { "hooks": { diff --git a/triples/package.json b/triples/package.json index 5070a303..42f8ba97 100644 --- a/triples/package.json +++ b/triples/package.json @@ -2,7 +2,14 @@ "name": "@napi-rs/triples", "version": "1.1.0", "description": "Rust target triples objects", - "keywords": ["Rust", "cross-compile", "napi", "n-api", "node-rs", "napi-rs"], + "keywords": [ + "Rust", + "cross-compile", + "napi", + "n-api", + "node-rs", + "napi-rs" + ], "author": "LongYinan ", "homepage": "https://github.com/napi-rs/napi-rs/tree/main/triples#readme", "license": "MIT", @@ -12,7 +19,10 @@ "registry": "https://registry.npmjs.org/", "access": "public" }, - "files": ["index.js", "index.d.ts"], + "files": [ + "index.js", + "index.d.ts" + ], "repository": { "type": "git", "url": "git+https://github.com/napi-rs/napi-rs.git"