fix(eslint): setup eslint to run on every package - N8N-4553 (#4050)
* fix(eslint): setup eslint to run on every package Also, unify eslint config and dependencies into a private package in the workspace.
This commit is contained in:
committed by
GitHub
parent
d6b930c7be
commit
69eb97999d
16
packages/cli/.eslintrc.js
Normal file
16
packages/cli/.eslintrc.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
*/
|
||||
module.exports = {
|
||||
extends: ['@n8n_io/eslint-config/node'],
|
||||
ignorePatterns: [
|
||||
'jest.config.js',
|
||||
// TODO: Remove these
|
||||
'src/databases/migrations/**',
|
||||
'src/databases/ormconfig.ts',
|
||||
],
|
||||
rules: {
|
||||
// TODO: Remove this
|
||||
'import/order': 'off',
|
||||
},
|
||||
};
|
||||
@@ -22,18 +22,18 @@
|
||||
"build": "node scripts/build.mjs",
|
||||
"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/**/**.ts --write",
|
||||
"lint": "cd ../.. && node_modules/eslint/bin/eslint.js packages/cli",
|
||||
"lintfix": "cd ../.. && node_modules/eslint/bin/eslint.js packages/cli --fix",
|
||||
"lint": "eslint .",
|
||||
"lintfix": "eslint . --fix",
|
||||
"postpack": "rm -f oclif.manifest.json",
|
||||
"prepack": "oclif-dev manifest",
|
||||
"start": "run-script-os",
|
||||
"start:default": "cd bin && ./n8n",
|
||||
"start:windows": "cd bin && n8n",
|
||||
"test": "npm run test:sqlite",
|
||||
"test:sqlite": "export N8N_LOG_LEVEL=silent && export DB_TYPE=sqlite && jest --forceExit",
|
||||
"test:postgres": "export N8N_LOG_LEVEL=silent && export DB_TYPE=postgresdb && jest",
|
||||
"test:postgres:alt-schema": "export DB_POSTGRESDB_SCHEMA=alt_schema && npm run test:postgres",
|
||||
"test:mysql": "export N8N_LOG_LEVEL=silent && export DB_TYPE=mysqldb && jest",
|
||||
"test:sqlite": "N8N_LOG_LEVEL=silent DB_TYPE=sqlite jest --forceExit",
|
||||
"test:postgres": "N8N_LOG_LEVEL=silent DB_TYPE=postgresdb jest",
|
||||
"test:postgres:alt-schema": "DB_POSTGRESDB_SCHEMA=alt_schema npm run test:postgres",
|
||||
"test:mysql": "N8N_LOG_LEVEL=silent DB_TYPE=mysqldb jest",
|
||||
"watch": "tsc --watch",
|
||||
"typeorm": "ts-node -T ../../node_modules/typeorm/cli.js"
|
||||
},
|
||||
@@ -59,6 +59,7 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"@apidevtools/swagger-cli": "4.0.0",
|
||||
"@n8n_io/eslint-config": "",
|
||||
"@oclif/dev-cli": "^1.22.2",
|
||||
"@types/basic-auth": "^1.1.2",
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
|
||||
@@ -149,6 +149,6 @@ export class User {
|
||||
@AfterLoad()
|
||||
@AfterUpdate()
|
||||
computeIsPending(): void {
|
||||
this.isPending = this.password == null;
|
||||
this.isPending = this.password === null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user