Skip to content

Commit

Permalink
Introduce Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov committed Jul 18, 2022
1 parent d8bda10 commit b87db59
Show file tree
Hide file tree
Showing 311 changed files with 12,189 additions and 12,150 deletions.
2 changes: 0 additions & 2 deletions .editorconfig

This file was deleted.

4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.vscode
node_modules
dist
NOTES.md
node_modules
.DS_Store
.todo
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
useTabs: true,
tabWidth: 2,
singleQuote: false,
semi: true,
trailingComma: "es5",
};
21 changes: 21 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"search.exclude": {
"node_modules": true,
"**/*.js": true,
},
"workbench.colorCustomizations": {
"sash.hoverBorder": "#93e6fc",
"statusBar.background": "#61dafb",
"statusBar.foreground": "#15202b",
"statusBarItem.hoverBackground": "#2fcefa",
"statusBarItem.remoteBackground": "#61dafb",
"statusBarItem.remoteForeground": "#15202b",
"titleBar.activeBackground": "#61dafb",
"titleBar.activeForeground": "#15202b",
"titleBar.inactiveBackground": "#61dafb99",
"titleBar.inactiveForeground": "#15202b99"
},
"peacock.color": "#61dafb",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
168 changes: 84 additions & 84 deletions docs/rules/community-package-json-author-email-still-default.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,97 +12,97 @@ The `author.email` value in the `package.json` of a community package must be di

```json
{
"name": "n8n-nodes-starter",
"version": "0.1.1",
"description": "Example starter module for custom n8n nodes.",
"license": "MIT",
"author": {
"name": "John Smith",
"email": "jan@n8n.io"
},
"repository": {
"type": "git",
"url": "git+https://github.com/johnsmith/n8n-nodes-service.git"
},
"keywords": ["n8n-community-node-package"],
"main": "index.js",
"scripts": {
"dev": "npm run watch",
"build": "tsc && gulp",
"lint": "tslint -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js ./nodes",
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js --fix ./nodes",
"watch": "tsc --watch",
"test": "jest"
},
"files": ["dist"],
"n8n": {
"credentials": ["dist/credentials/ServiceApi.credentials.js"],
"nodes": ["dist/nodes/Service/Service.node.js"]
},
"devDependencies": {
"@types/express": "^4.17.6",
"@types/request-promise-native": "~1.0.15",
"@typescript-eslint/parser": "^5.29.0",
"eslint-plugin-n8n-nodes-base": "^1.0.43",
"gulp": "^4.0.2",
"jest": "^26.4.2",
"n8n-workflow": "~0.104.0",
"ts-jest": "^26.3.0",
"tslint": "^6.1.2",
"typescript": "~4.3.5"
},
"dependencies": {
"n8n-core": "~0.101.0"
}
"name": "n8n-nodes-starter",
"version": "0.1.1",
"description": "Example starter module for custom n8n nodes.",
"license": "MIT",
"author": {
"name": "John Smith",
"email": "jan@n8n.io"
},
"repository": {
"type": "git",
"url": "git+https://github.com/johnsmith/n8n-nodes-service.git"
},
"keywords": ["n8n-community-node-package"],
"main": "index.js",
"scripts": {
"dev": "npm run watch",
"build": "tsc && gulp",
"lint": "tslint -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js ./nodes",
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js --fix ./nodes",
"watch": "tsc --watch",
"test": "jest"
},
"files": ["dist"],
"n8n": {
"credentials": ["dist/credentials/ServiceApi.credentials.js"],
"nodes": ["dist/nodes/Service/Service.node.js"]
},
"devDependencies": {
"@types/express": "^4.17.6",
"@types/request-promise-native": "~1.0.15",
"@typescript-eslint/parser": "^5.29.0",
"eslint-plugin-n8n-nodes-base": "^1.0.43",
"gulp": "^4.0.2",
"jest": "^26.4.2",
"n8n-workflow": "~0.104.0",
"ts-jest": "^26.3.0",
"tslint": "^6.1.2",
"typescript": "~4.3.5"
},
"dependencies": {
"n8n-core": "~0.101.0"
}
}
```

✅ Example of **correct** code:

```json
{
"name": "n8n-nodes-service",
"version": "0.1.1",
"description": "Consumes Service API",
"license": "MIT",
"author": {
"name": "John Smith",
"email": "john.smith@mail.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/johnsmith/n8n-nodes-service.git"
},
"keywords": ["n8n-community-node-package"],
"main": "index.js",
"scripts": {
"dev": "npm run watch",
"build": "tsc && gulp",
"lint": "tslint -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js ./nodes",
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js --fix ./nodes",
"watch": "tsc --watch",
"test": "jest"
},
"files": ["dist"],
"n8n": {
"credentials": ["dist/credentials/ServiceApi.credentials.js"],
"nodes": ["dist/nodes/Service/Service.node.js"]
},
"devDependencies": {
"@types/express": "^4.17.6",
"@types/request-promise-native": "~1.0.15",
"@typescript-eslint/parser": "^5.29.0",
"eslint-plugin-n8n-nodes-base": "^1.0.43",
"gulp": "^4.0.2",
"jest": "^26.4.2",
"n8n-workflow": "~0.104.0",
"ts-jest": "^26.3.0",
"tslint": "^6.1.2",
"typescript": "~4.3.5"
},
"dependencies": {
"n8n-core": "~0.101.0"
}
"name": "n8n-nodes-service",
"version": "0.1.1",
"description": "Consumes Service API",
"license": "MIT",
"author": {
"name": "John Smith",
"email": "john.smith@mail.com"
},
"repository": {
"type": "git",
"url": "git+https://github.com/johnsmith/n8n-nodes-service.git"
},
"keywords": ["n8n-community-node-package"],
"main": "index.js",
"scripts": {
"dev": "npm run watch",
"build": "tsc && gulp",
"lint": "tslint -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js ./nodes",
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && node_modules/eslint/bin/eslint.js --fix ./nodes",
"watch": "tsc --watch",
"test": "jest"
},
"files": ["dist"],
"n8n": {
"credentials": ["dist/credentials/ServiceApi.credentials.js"],
"nodes": ["dist/nodes/Service/Service.node.js"]
},
"devDependencies": {
"@types/express": "^4.17.6",
"@types/request-promise-native": "~1.0.15",
"@typescript-eslint/parser": "^5.29.0",
"eslint-plugin-n8n-nodes-base": "^1.0.43",
"gulp": "^4.0.2",
"jest": "^26.4.2",
"n8n-workflow": "~0.104.0",
"ts-jest": "^26.3.0",
"tslint": "^6.1.2",
"typescript": "~4.3.5"
},
"dependencies": {
"n8n-core": "~0.101.0"
}
}
```

Expand Down
Loading

0 comments on commit b87db59

Please sign in to comment.