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 = {
|
||||
root: true,
|
||||
|
||||
env: {
|
||||
browser: true,
|
||||
es6: true,
|
||||
|
@ -21,6 +23,28 @@ module.exports = {
|
|||
'**/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: [
|
||||
/**
|
||||
* Config for typescript-eslint recommended ruleset (without type checking)
|
||||
|
@ -51,27 +75,6 @@ module.exports = {
|
|||
*/
|
||||
'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: {
|
||||
// ******************************************************************
|
||||
// required by prettier plugin
|
||||
|
@ -122,7 +125,7 @@ module.exports = {
|
|||
'undefined',
|
||||
],
|
||||
|
||||
'no-void': ['error', { 'allowAsStatement': true }],
|
||||
'no-void': ['error', { allowAsStatement: true }],
|
||||
|
||||
// ----------------------------------
|
||||
// @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
|
||||
*/
|
||||
'@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
|
||||
|
@ -363,4 +369,13 @@ module.exports = {
|
|||
*/
|
||||
'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",
|
||||
"lint": "tslint -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",
|
||||
"watch": "tsc --watch",
|
||||
"test": "jest"
|
||||
|
@ -686,6 +687,7 @@
|
|||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint-plugin-n8n-nodes-base": "^1.0.28",
|
||||
"@types/aws4": "^1.5.1",
|
||||
"@types/basic-auth": "^1.1.2",
|
||||
"@types/cheerio": "^0.22.15",
|
||||
|
|
Loading…
Reference in a new issue