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
@@ -1,19 +1,27 @@
|
||||
/**
|
||||
* @type {import('@types/eslint').ESLint.ConfigData}
|
||||
*/
|
||||
module.exports = {
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
extends: ['plugin:vue/essential', '@vue/typescript'],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
|
||||
semi: [2, 'always'],
|
||||
indent: ['error', 'tab'],
|
||||
'comma-dangle': ['error', 'always-multiline'],
|
||||
'no-tabs': 0,
|
||||
'no-labels': 0,
|
||||
},
|
||||
extends: ['@n8n_io/eslint-config/frontend'],
|
||||
|
||||
parserOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
project: ['./tsconfig.json'],
|
||||
},
|
||||
|
||||
rules: {
|
||||
// TODO: Remove these
|
||||
'import/no-default-export': 'off',
|
||||
'import/no-extraneous-dependencies': 'off',
|
||||
'import/order': 'off',
|
||||
'prettier/prettier': 'off',
|
||||
'@typescript-eslint/member-delimiter-style': 'off',
|
||||
'@typescript-eslint/naming-convention': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-unsafe-argument': 'off',
|
||||
'@typescript-eslint/no-unsafe-return': 'off',
|
||||
'@typescript-eslint/no-unused-vars': 'off',
|
||||
'@typescript-eslint/prefer-nullish-coalescing': 'off',
|
||||
'@typescript-eslint/prefer-optional-chain': 'off',
|
||||
'@typescript-eslint/restrict-template-expressions': 'off',
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
"test:dev": "vitest",
|
||||
"build:storybook": "build-storybook",
|
||||
"storybook": "start-storybook -p 6006",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json",
|
||||
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json",
|
||||
"lint": "tslint -p tsconfig.json -c tslint.json && eslint .",
|
||||
"lintfix": "tslint --fix -p tsconfig.json -c tslint.json && eslint . --fix",
|
||||
"build:theme": "gulp build:theme",
|
||||
"watch:theme": "gulp watch:theme"
|
||||
},
|
||||
@@ -38,6 +38,7 @@
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.35",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.3",
|
||||
"@fortawesome/vue-fontawesome": "^2.0.2",
|
||||
"@n8n_io/eslint-config": "",
|
||||
"@storybook/addon-actions": "^6.5.10",
|
||||
"@storybook/addon-essentials": "^6.5.10",
|
||||
"@storybook/addon-links": "^6.5.10",
|
||||
@@ -48,18 +49,11 @@
|
||||
"@types/jest": "^27.4.0",
|
||||
"@types/markdown-it": "^12.2.3",
|
||||
"@types/sanitize-html": "^2.6.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"@vue/cli-plugin-babel": "~4.5.19",
|
||||
"@vue/eslint-config-prettier": "^6.0.0",
|
||||
"@vue/eslint-config-typescript": "^7.0.0",
|
||||
"@vue/test-utils": "^1.0.3",
|
||||
"babel-loader": "^8.2.2",
|
||||
"c8": "7.11.0",
|
||||
"core-js": "^3.6.5",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"eslint-plugin-vue": "^7.16.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-autoprefixer": "^4.0.0",
|
||||
"gulp-clean-css": "^4.3.0",
|
||||
|
||||
Reference in New Issue
Block a user