ci: Update linting dependencies, and setup eslint-plugin-unicorn (no-changelog) (#6070)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-04-24 12:47:13 +00:00 committed by GitHub
parent 8886516c9e
commit c7b1920943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 342 additions and 227 deletions

View file

@ -87,7 +87,7 @@
"element-ui@2.15.12": "patches/element-ui@2.15.12.patch", "element-ui@2.15.12": "patches/element-ui@2.15.12.patch",
"typedi@0.10.0": "patches/typedi@0.10.0.patch", "typedi@0.10.0": "patches/typedi@0.10.0.patch",
"@sentry/cli@2.17.0": "patches/@sentry__cli@2.17.0.patch", "@sentry/cli@2.17.0": "patches/@sentry__cli@2.17.0.patch",
"@typescript-eslint/eslint-plugin@5.45.0": "patches/@typescript-eslint__eslint-plugin@5.45.0.patch" "@typescript-eslint/eslint-plugin@5.59.0": "patches/@typescript-eslint__eslint-plugin@5.59.0.patch"
} }
} }
} }

View file

@ -35,6 +35,9 @@ const config = (module.exports = {
* https://github.com/ivov/eslint-plugin-n8n-local-rules * https://github.com/ivov/eslint-plugin-n8n-local-rules
*/ */
'eslint-plugin-n8n-local-rules', 'eslint-plugin-n8n-local-rules',
/** https://github.com/sindresorhus/eslint-plugin-unicorn */
'eslint-plugin-unicorn',
], ],
extends: [ extends: [
@ -422,6 +425,12 @@ const config = (module.exports = {
* https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md * https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/prefer-default-export.md
*/ */
'import/prefer-default-export': 'off', 'import/prefer-default-export': 'off',
/** https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-unnecessary-await.md */
'unicorn/no-unnecessary-await': 'error',
/** https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/no-useless-promise-resolve-reject.md */
'unicorn/no-useless-promise-resolve-reject': 'error',
}, },
overrides: [ overrides: [

View file

@ -3,18 +3,19 @@
"private": true, "private": true,
"version": "0.0.1", "version": "0.0.1",
"devDependencies": { "devDependencies": {
"@types/eslint": "~8.4", "@types/eslint": "~8.37",
"@typescript-eslint/eslint-plugin": "~5.45", "@typescript-eslint/eslint-plugin": "~5.59",
"@typescript-eslint/parser": "~5.45", "@typescript-eslint/parser": "~5.59",
"@vue/eslint-config-typescript": "~8.0", "@vue/eslint-config-typescript": "~8.0",
"eslint": "~8.28", "eslint": "~8.39",
"eslint-config-airbnb-typescript": "~17.0", "eslint-config-airbnb-typescript": "~17.0",
"eslint-config-prettier": "~8.5", "eslint-config-prettier": "~8.8",
"eslint-import-resolver-typescript": "~3.5", "eslint-import-resolver-typescript": "~3.5",
"eslint-plugin-diff": "~2.0", "eslint-plugin-diff": "~2.0",
"eslint-plugin-import": "~2.26", "eslint-plugin-import": "~2.27",
"eslint-plugin-n8n-local-rules": "~1.0", "eslint-plugin-n8n-local-rules": "~1.0",
"eslint-plugin-prettier": "~4.2", "eslint-plugin-prettier": "~4.2",
"eslint-plugin-unicorn": "~46.0",
"eslint-plugin-vue": "~7.17" "eslint-plugin-vue": "~7.17"
}, },
"scripts": { "scripts": {

View file

@ -1,13 +1,13 @@
diff --git a/dist/rules/consistent-type-imports.js b/dist/rules/consistent-type-imports.js diff --git a/dist/rules/consistent-type-imports.js b/dist/rules/consistent-type-imports.js
index fe6eaf80a1285b62ed93b0c32b74c889788c5164..de4e2ca30c131948e030b7d6dbce4ff50e3eff26 100644 index 1844dc32b19d10abbe13556b9ee2f69c0aabac05..01320c5212fd61e08ca8a438db3ccd59949f9421 100644
--- a/dist/rules/consistent-type-imports.js --- a/dist/rules/consistent-type-imports.js
+++ b/dist/rules/consistent-type-imports.js +++ b/dist/rules/consistent-type-imports.js
@@ -87,6 +87,8 @@ exports.default = util.createRule({ @@ -81,6 +81,8 @@ exports.default = util.createRule({
ImportDeclaration(node) { ImportDeclaration(node) {
var _a; var _a;
const source = node.source.value; const source = node.source.value;
+ if (source.endsWith('.vue')) return; + if (source.endsWith('.vue')) return;
+ +
// sourceImports is the object containing all the specifics for a particular import source, type or value // sourceImports is the object containing all the specifics for a particular import source, type or value
const sourceImports = (_a = sourceImportsMap[source]) !== null && _a !== void 0 ? _a : (sourceImportsMap[source] = { const sourceImports = (_a = sourceImportsMap[source]) !== null && _a !== void 0 ? _a : (sourceImportsMap[source] = {
source, source,

File diff suppressed because it is too large Load diff