mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Initial setup
This commit is contained in:
parent
1c2ca6244c
commit
f915b2f2df
61
.eslintrc.js
61
.eslintrc.js
|
@ -1,4 +1,6 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
root: true,
|
||||||
|
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
es6: true,
|
es6: true,
|
||||||
|
@ -21,6 +23,28 @@ module.exports = {
|
||||||
'**/migrations/**',
|
'**/migrations/**',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
overrides: [
|
||||||
|
{
|
||||||
|
files: './packages/*(cli|core|workflow|node-dev)/**/*.ts',
|
||||||
|
plugins: [
|
||||||
|
/**
|
||||||
|
* Plugin with lint rules for import/export syntax
|
||||||
|
* https://github.com/import-js/eslint-plugin-import
|
||||||
|
*/
|
||||||
|
'eslint-plugin-import',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typescript-eslint/eslint-plugin is required by eslint-config-airbnb-typescript
|
||||||
|
* See step 2: https://github.com/iamturns/eslint-config-airbnb-typescript#2-install-eslint-plugins
|
||||||
|
*/
|
||||||
|
'@typescript-eslint',
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Plugin to report formatting violations as lint violations
|
||||||
|
* https://github.com/prettier/eslint-plugin-prettier
|
||||||
|
*/
|
||||||
|
'eslint-plugin-prettier',
|
||||||
|
],
|
||||||
extends: [
|
extends: [
|
||||||
/**
|
/**
|
||||||
* Config for typescript-eslint recommended ruleset (without type checking)
|
* Config for typescript-eslint recommended ruleset (without type checking)
|
||||||
|
@ -51,27 +75,6 @@ module.exports = {
|
||||||
*/
|
*/
|
||||||
'eslint-config-prettier',
|
'eslint-config-prettier',
|
||||||
],
|
],
|
||||||
|
|
||||||
plugins: [
|
|
||||||
/**
|
|
||||||
* Plugin with lint rules for import/export syntax
|
|
||||||
* https://github.com/import-js/eslint-plugin-import
|
|
||||||
*/
|
|
||||||
'eslint-plugin-import',
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @typescript-eslint/eslint-plugin is required by eslint-config-airbnb-typescript
|
|
||||||
* See step 2: https://github.com/iamturns/eslint-config-airbnb-typescript#2-install-eslint-plugins
|
|
||||||
*/
|
|
||||||
'@typescript-eslint',
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Plugin to report formatting violations as lint violations
|
|
||||||
* https://github.com/prettier/eslint-plugin-prettier
|
|
||||||
*/
|
|
||||||
'eslint-plugin-prettier',
|
|
||||||
],
|
|
||||||
|
|
||||||
rules: {
|
rules: {
|
||||||
// ******************************************************************
|
// ******************************************************************
|
||||||
// required by prettier plugin
|
// required by prettier plugin
|
||||||
|
@ -122,7 +125,7 @@ module.exports = {
|
||||||
'undefined',
|
'undefined',
|
||||||
],
|
],
|
||||||
|
|
||||||
'no-void': ['error', { 'allowAsStatement': true }],
|
'no-void': ['error', { allowAsStatement: true }],
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// @typescript-eslint
|
// @typescript-eslint
|
||||||
|
@ -186,7 +189,10 @@ module.exports = {
|
||||||
/**
|
/**
|
||||||
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md
|
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md
|
||||||
*/
|
*/
|
||||||
'@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
|
'@typescript-eslint/explicit-member-accessibility': [
|
||||||
|
'error',
|
||||||
|
{ accessibility: 'no-public' },
|
||||||
|
],
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md
|
* https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/member-delimiter-style.md
|
||||||
|
@ -363,4 +369,13 @@ module.exports = {
|
||||||
*/
|
*/
|
||||||
'import/prefer-default-export': 'off',
|
'import/prefer-default-export': 'off',
|
||||||
},
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ['./packages/nodes-base/nodes/**/*.ts'],
|
||||||
|
plugins: ['eslint-plugin-n8n-nodes-base'],
|
||||||
|
rules: {
|
||||||
|
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
"format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/nodes-base/**/**.ts --write",
|
"format": "cd ../.. && node_modules/prettier/bin-prettier.js packages/nodes-base/**/**.ts --write",
|
||||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
"lint": "tslint -p tsconfig.json -c tslint.json",
|
||||||
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json",
|
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json",
|
||||||
|
"lintfix:old": "cd ../.. && node_modules/eslint/bin/eslint.js packages/nodes-base/nodes --fix",
|
||||||
"nodelinter": "nodelinter",
|
"nodelinter": "nodelinter",
|
||||||
"watch": "tsc --watch",
|
"watch": "tsc --watch",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
|
@ -686,6 +687,7 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"eslint-plugin-n8n-nodes-base": "^1.0.28",
|
||||||
"@types/aws4": "^1.5.1",
|
"@types/aws4": "^1.5.1",
|
||||||
"@types/basic-auth": "^1.1.2",
|
"@types/basic-auth": "^1.1.2",
|
||||||
"@types/cheerio": "^0.22.15",
|
"@types/cheerio": "^0.22.15",
|
||||||
|
|
Loading…
Reference in a new issue