From ac5ed07579c300ce711186de228ad0d8db7734f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Thu, 19 Aug 2021 12:37:09 +0200 Subject: [PATCH] :package: Add deps and commands --- package.json | 3 +++ packages/cli/package.json | 3 +++ packages/core/package.json | 3 +++ packages/editor-ui/package.json | 4 +++- packages/node-dev/package.json | 3 +++ packages/nodes-base/package.json | 3 +++ packages/workflow/package.json | 11 +++++++++++ 7 files changed, 29 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8855d43d8f..bf388ea8ed 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ "build": "lerna exec npm run build", "dev": "lerna exec npm run dev --parallel", "clean:dist": "lerna exec -- rimraf ./dist", + "format": "node_modules/prettier/bin-prettier.js packages --write", + "lint": "node_modules/eslint/bin/eslint.js packages", + "lintfix": "node_modules/eslint/bin/eslint.js packages --fix", "optimize-svg": "find ./packages -name '*.svg' ! -name 'pipedrive.svg' -print0 | xargs -0 -P16 -L20 npx svgo", "start": "run-script-os", "start:default": "cd packages/cli/bin && ./n8n", diff --git a/packages/cli/package.json b/packages/cli/package.json index 5db0f406f9..73b8c13ded 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -21,6 +21,9 @@ "scripts": { "build": "tsc", "dev": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch\" \"nodemon\"", + "format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/cli --write", + "lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/cli", + "lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/cli --fix", "postpack": "rm -f oclif.manifest.json", "prepack": "echo \"Building project...\" && rm -rf dist && tsc -b && oclif-dev manifest", "start": "run-script-os", diff --git a/packages/core/package.json b/packages/core/package.json index f5457a0d5d..fc47bf8bb2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -17,6 +17,9 @@ "scripts": { "build": "tsc", "dev": "npm run watch", + "format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/core --write", + "lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/core", + "lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/core --fix", "tslint": "tslint -p tsconfig.json -c tslint.json", "tslintfix": "tslint --fix -p tsconfig.json -c tslint.json", "watch": "tsc --watch", diff --git a/packages/editor-ui/package.json b/packages/editor-ui/package.json index 2c0b360fa2..da845f3686 100644 --- a/packages/editor-ui/package.json +++ b/packages/editor-ui/package.json @@ -16,7 +16,9 @@ "scripts": { "build": "cross-env VUE_APP_PUBLIC_PATH=\"/%BASE_PATH%/\" vue-cli-service build", "dev": "npm run serve", - "lint": "vue-cli-service lint", + "format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/editor-ui --write", + "lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/editor-ui", + "lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/editor-ui --fix", "serve": "cross-env VUE_APP_URL_BASE_API=http://localhost:5678/ vue-cli-service serve", "test": "npm run test:unit", "tslint": "tslint -p tsconfig.json -c tslint.json", diff --git a/packages/node-dev/package.json b/packages/node-dev/package.json index f961b39ed7..ae2906917d 100644 --- a/packages/node-dev/package.json +++ b/packages/node-dev/package.json @@ -21,6 +21,9 @@ "scripts": { "dev": "npm run watch", "build": "tsc", + "format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/node-dev --write", + "lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/node-dev", + "lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/node-dev --fix", "postpack": "rm -f oclif.manifest.json", "prepack": "echo \"Building project...\" && rm -rf dist && tsc -b && oclif-dev manifest", "tslint": "tslint -p tsconfig.json -c tslint.json", diff --git a/packages/nodes-base/package.json b/packages/nodes-base/package.json index 91d8cc3787..34df5cb469 100644 --- a/packages/nodes-base/package.json +++ b/packages/nodes-base/package.json @@ -17,6 +17,9 @@ "scripts": { "dev": "npm run watch", "build": "tsc && gulp", + "format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/nodes-base --write", + "lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/nodes-base", + "lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/nodes-base --fix", "tslint": "tslint -p tsconfig.json -c tslint.json", "tslintfix": "tslint --fix -p tsconfig.json -c tslint.json", "nodelinter": "nodelinter", diff --git a/packages/workflow/package.json b/packages/workflow/package.json index f4d530d4d9..d609a3736e 100644 --- a/packages/workflow/package.json +++ b/packages/workflow/package.json @@ -17,6 +17,9 @@ "scripts": { "dev": "npm run watch", "build": "tsc", + "format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/workflow --write", + "lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/workflow", + "lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/workflow --fix", "tslint": "tslint -p tsconfig.json -c tslint.json", "tslintfix": "tslint --fix -p tsconfig.json -c tslint.json", "watch": "tsc --watch", @@ -31,7 +34,15 @@ "@types/lodash.get": "^4.4.6", "@types/node": "^14.14.40", "@types/xml2js": "^0.4.3", + "@typescript-eslint/eslint-plugin": "^4.29.0", + "@typescript-eslint/parser": "^4.29.0", + "eslint": "^7.32.0", + "eslint-config-airbnb-typescript": "^12.3.1", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-import": "^2.23.4", + "eslint-plugin-prettier": "^3.4.0", "jest": "^26.4.2", + "prettier": "^2.3.2", "ts-jest": "^26.3.0", "tslint": "^6.1.2", "typescript": "~4.3.5"