|
@@ -19,17 +19,35 @@
|
|
"scripts": {
|
|
"scripts": {
|
|
"build": "cargo build --release && napi build --platform --release ./index",
|
|
"build": "cargo build --release && napi build --platform --release ./index",
|
|
"build:debug": "cargo build && napi --platform ./index",
|
|
"build:debug": "cargo build && napi --platform ./index",
|
|
|
|
+ "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: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 './**/*.{ts,tsx,js}'",
|
|
"prepublishOnly": "node ./scripts/publish.js",
|
|
"prepublishOnly": "node ./scripts/publish.js",
|
|
"test": "ava",
|
|
"test": "ava",
|
|
"version": "node ./scripts/version.js"
|
|
"version": "node ./scripts/version.js"
|
|
},
|
|
},
|
|
"devDependencies": {
|
|
"devDependencies": {
|
|
"@octokit/rest": "^18.0.4",
|
|
"@octokit/rest": "^18.0.4",
|
|
|
|
+ "@swc-node/register": "^0.4.3",
|
|
|
|
+ "@typescript-eslint/eslint-plugin": "^3.10.1",
|
|
|
|
+ "@typescript-eslint/parser": "^3.10.1",
|
|
"ava": "^3.12.1",
|
|
"ava": "^3.12.1",
|
|
"chalk": "^4.1.0",
|
|
"chalk": "^4.1.0",
|
|
|
|
+ "eslint": "^7.7.0",
|
|
|
|
+ "eslint-config-prettier": "^6.11.0",
|
|
|
|
+ "eslint-plugin-import": "^2.22.0",
|
|
|
|
+ "eslint-plugin-prettier": "^3.1.4",
|
|
|
|
+ "eslint-plugin-react": "^7.20.6",
|
|
|
|
+ "eslint-plugin-react-hooks": "^4.1.0",
|
|
|
|
+ "eslint-plugin-sonarjs": "^0.5.0",
|
|
"husky": "^4.2.5",
|
|
"husky": "^4.2.5",
|
|
"lint-staged": "^10.2.13",
|
|
"lint-staged": "^10.2.13",
|
|
"napi-rs": "^0.2.6",
|
|
"napi-rs": "^0.2.6",
|
|
|
|
+ "npm-run-all": "^4.1.5",
|
|
"prettier": "^2.1.1",
|
|
"prettier": "^2.1.1",
|
|
"putasset": "^5.0.3",
|
|
"putasset": "^5.0.3",
|
|
"typescript": "^4.0.2"
|
|
"typescript": "^4.0.2"
|
|
@@ -38,11 +56,15 @@
|
|
"@node-rs/helper": "^0.3.1"
|
|
"@node-rs/helper": "^0.3.1"
|
|
},
|
|
},
|
|
"lint-staged": {
|
|
"lint-staged": {
|
|
- "*.@(js|ts|tsx)": ["prettier --write"],
|
|
|
|
|
|
+ "*.@(js|ts|tsx)": ["prettier --write", "eslint -c .eslintrc.yml --fix"],
|
|
"*.@(yml|yaml)": ["prettier --parser yaml --write"],
|
|
"*.@(yml|yaml)": ["prettier --parser yaml --write"],
|
|
"*.md": ["prettier --parser markdown --write"],
|
|
"*.md": ["prettier --parser markdown --write"],
|
|
"*.json": ["prettier --parser json --write"]
|
|
"*.json": ["prettier --parser json --write"]
|
|
},
|
|
},
|
|
|
|
+ "ava": {
|
|
|
|
+ "require": ["@swc-node/register"],
|
|
|
|
+ "extensions": ["ts"]
|
|
|
|
+ },
|
|
"prettier": {
|
|
"prettier": {
|
|
"printWidth": 120,
|
|
"printWidth": 120,
|
|
"semi": false,
|
|
"semi": false,
|