👕 Integrate community linting ruleset
This commit is contained in:
parent
effe1ed0db
commit
6c8b561291
3 changed files with 35 additions and 2 deletions
32
.eslintrc.js
32
.eslintrc.js
|
|
@ -11,6 +11,7 @@ module.exports = {
|
|||
parserOptions: {
|
||||
project: ['./tsconfig.json'],
|
||||
sourceType: 'module',
|
||||
extraFileExtensions: ['.json'],
|
||||
},
|
||||
ignorePatterns: [
|
||||
'.eslintrc.js',
|
||||
|
|
@ -25,10 +26,39 @@ module.exports = {
|
|||
|
||||
overrides: [
|
||||
{
|
||||
files: [ './**/*.ts' ],
|
||||
files: ['package.json'],
|
||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||
rules: {
|
||||
'n8n-nodes-base/community-package-json-author-email-still-default': 'error',
|
||||
'n8n-nodes-base/community-package-json-author-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-author-name-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-author-name-still-default': 'error',
|
||||
'n8n-nodes-base/community-package-json-description-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-description-still-default': 'error',
|
||||
'n8n-nodes-base/community-package-json-keywords-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-keywords-without-official-tag': 'error',
|
||||
'n8n-nodes-base/community-package-json-license-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-license-not-default': 'error',
|
||||
'n8n-nodes-base/community-package-json-n8n-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-n8n-nodes-empty': 'error',
|
||||
'n8n-nodes-base/community-package-json-n8n-nodes-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-name-missing': 'error',
|
||||
'n8n-nodes-base/community-package-json-name-still-default': 'error',
|
||||
'n8n-nodes-base/community-package-json-repository-url-still-default': 'error',
|
||||
'n8n-nodes-base/community-package-json-version-missing': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['./credentials/**/*.ts'],
|
||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||
rules: {
|
||||
'n8n-nodes-base/filesystem-wrong-cred-filename': 'error',
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ['./nodes/**/*.ts'],
|
||||
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||
rules: {
|
||||
'n8n-nodes-base/filesystem-wrong-node-filename': 'error',
|
||||
'n8n-nodes-base/node-class-description-empty-string': 'error',
|
||||
'n8n-nodes-base/node-class-description-icon-not-svg': 'error',
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@
|
|||
"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",
|
||||
"lint:plugin": "eslint nodes credentials package.json",
|
||||
"lintfix:plugin": "eslint nodes credentials package.json --fix",
|
||||
"watch": "tsc --watch",
|
||||
"test": "jest"
|
||||
},
|
||||
|
|
@ -41,7 +43,7 @@
|
|||
"@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",
|
||||
"eslint-plugin-n8n-nodes-base": "~1.1.1",
|
||||
"gulp": "^4.0.2",
|
||||
"jest": "^26.4.2",
|
||||
"n8n-workflow": "~0.104.0",
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
},
|
||||
"include": [
|
||||
"credentials/**/*",
|
||||
"package.json",
|
||||
"src/**/*",
|
||||
"nodes/**/*",
|
||||
"nodes/**/*.json",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue