From 1058e6f86d3c78f8ea101d5c9dd78f118d2fdf0a Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 15:30:56 +0200 Subject: [PATCH 1/9] fix: move ESLint config files to repo root --- .eslintignore | 14 ++++++++++++++ api-editor/.eslintrc.js => .eslintrc.js | 0 api-editor/.eslintignore | 14 -------------- api-editor/tsconfig.eslint.json | 8 -------- tsconfig.eslint.json | 8 ++++++++ 5 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 .eslintignore rename api-editor/.eslintrc.js => .eslintrc.js (100%) delete mode 100644 api-editor/.eslintignore delete mode 100644 api-editor/tsconfig.eslint.json create mode 100644 tsconfig.eslint.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..994b29ad3 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,14 @@ +# Compilation/build outputs +build/ +dist/ +dist-ssr/ + +# Configuration +.eslintrc.js + +# GUI +/api-editor/gui/vite.config.ts +/api-editor/gui/src/theme/index.d.ts + +# Backend +/api-editor/backend/src/main/resources/static/ diff --git a/api-editor/.eslintrc.js b/.eslintrc.js similarity index 100% rename from api-editor/.eslintrc.js rename to .eslintrc.js diff --git a/api-editor/.eslintignore b/api-editor/.eslintignore deleted file mode 100644 index 0f802a127..000000000 --- a/api-editor/.eslintignore +++ /dev/null @@ -1,14 +0,0 @@ -# Compilation/build outputs -build/ -dist/ -dist-ssr/ - -# Configuration -.eslintrc.js - -# GUI -/gui/vite.config.ts -/gui/src/theme/index.d.ts - -# Backend -/backend/src/main/resources/static/ diff --git a/api-editor/tsconfig.eslint.json b/api-editor/tsconfig.eslint.json deleted file mode 100644 index a2abd9727..000000000 --- a/api-editor/tsconfig.eslint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./client/tsconfig.json", - "compilerOptions": { - "noEmit": true - }, - "include": ["./gui/src", "./gui/vite.config.ts"], - "exclude": [] -} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 000000000..eaeb289a6 --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,8 @@ +{ + "extends": "./api-editor/gui/tsconfig.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["./api-editor/gui/src", "./api-editor/gui/vite.config.ts"], + "exclude": [] +} From 5ce1906f99562d2d3b0764b1e39ca2c7b6d29664 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 15:31:57 +0200 Subject: [PATCH 2/9] chore: disable TYPESCRIPT_STANDARD linter --- .mega-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.mega-linter.yml b/.mega-linter.yml index 5babbf077..2b622c0d2 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -111,7 +111,7 @@ ENABLE_LINTERS: # - TERRAFORM_CHECKOV - TSX_ESLINT - TYPESCRIPT_ES - - TYPESCRIPT_STANDARD + # - TYPESCRIPT_STANDARD - TYPESCRIPT_PRETTIER # - VBDOTNET_DOTNET_FORMAT - XML_XMLLINT From 11c70e7d43adbbaaac8e4a1f772c07b9a57dd2d5 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 15:34:13 +0200 Subject: [PATCH 3/9] build: update linter configs --- api-editor/gui/package-lock.json | 14 +++++++------- api-editor/gui/package.json | 2 +- package-lock.json | 14 +++++++------- package.json | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/api-editor/gui/package-lock.json b/api-editor/gui/package-lock.json index b0e612691..697292772 100644 --- a/api-editor/gui/package-lock.json +++ b/api-editor/gui/package-lock.json @@ -38,7 +38,7 @@ "devDependencies": { "@chakra-ui/cli": "^1.8.1", "@hookform/devtools": "^4.0.2", - "@lars-reimann/prettier-config": "^4.0.4", + "@lars-reimann/prettier-config": "^5.0.0", "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^12.1.3", "@types/jest": "^27.4.0", @@ -2282,9 +2282,9 @@ } }, "node_modules/@lars-reimann/prettier-config": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@lars-reimann/prettier-config/-/prettier-config-4.0.4.tgz", - "integrity": "sha512-/ZNaWoQouy0gmjEmjLlek5xOY7OULEJSBAZR3mHJPCXgaCweJULME0cVadlOrpODbskO6Tr/8zPr0uie8kjOag==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@lars-reimann/prettier-config/-/prettier-config-5.0.0.tgz", + "integrity": "sha512-52Ha8xMKpQESiaEzceWgyQb+fuPVD3wl2p6Op1mpLyLj6natjq7Vy8lAmbWS3AbPRjPlJZZHnp/b+sOAOdNqbA==", "dev": true, "peerDependencies": { "prettier": ">= 2" @@ -13608,9 +13608,9 @@ } }, "@lars-reimann/prettier-config": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@lars-reimann/prettier-config/-/prettier-config-4.0.4.tgz", - "integrity": "sha512-/ZNaWoQouy0gmjEmjLlek5xOY7OULEJSBAZR3mHJPCXgaCweJULME0cVadlOrpODbskO6Tr/8zPr0uie8kjOag==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@lars-reimann/prettier-config/-/prettier-config-5.0.0.tgz", + "integrity": "sha512-52Ha8xMKpQESiaEzceWgyQb+fuPVD3wl2p6Op1mpLyLj6natjq7Vy8lAmbWS3AbPRjPlJZZHnp/b+sOAOdNqbA==", "dev": true, "requires": {} }, diff --git a/api-editor/gui/package.json b/api-editor/gui/package.json index 7db78438f..f560cd974 100644 --- a/api-editor/gui/package.json +++ b/api-editor/gui/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@chakra-ui/cli": "^1.8.1", "@hookform/devtools": "^4.0.2", - "@lars-reimann/prettier-config": "^4.0.4", + "@lars-reimann/prettier-config": "^5.0.0", "@testing-library/jest-dom": "^5.16.2", "@testing-library/react": "^12.1.3", "@types/jest": "^27.4.0", diff --git a/package-lock.json b/package-lock.json index b125f03b8..612235e31 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "com.larsreimann.api_editor", "version": "0.0.1", "devDependencies": { - "@lars-reimann/eslint-config": "^4.1.2", + "@lars-reimann/eslint-config": "^4.2.0", "@lars-reimann/prettier-config": "^5.0.0" } }, @@ -196,9 +196,9 @@ "peer": true }, "node_modules/@lars-reimann/eslint-config": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-4.1.2.tgz", - "integrity": "sha512-I8FkPY44T534UsabmrCpg9OcmQUpzEwJkEI3jujKzOD48D9PbIfaGsewmEJ6EzjcPM3J1FGgi9N4okQwwYekWA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-4.2.0.tgz", + "integrity": "sha512-6QJMin0IP4fzqB8AXUpPnYKfP0XgnRJrP4KZ2O1yw21Vluq3LfBuuTtUkMstDoVsuBuNajeHlS8qrBOzG+26xg==", "dev": true, "dependencies": { "eslint-config-airbnb": "^19.0.2", @@ -3589,9 +3589,9 @@ "peer": true }, "@lars-reimann/eslint-config": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-4.1.2.tgz", - "integrity": "sha512-I8FkPY44T534UsabmrCpg9OcmQUpzEwJkEI3jujKzOD48D9PbIfaGsewmEJ6EzjcPM3J1FGgi9N4okQwwYekWA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@lars-reimann/eslint-config/-/eslint-config-4.2.0.tgz", + "integrity": "sha512-6QJMin0IP4fzqB8AXUpPnYKfP0XgnRJrP4KZ2O1yw21Vluq3LfBuuTtUkMstDoVsuBuNajeHlS8qrBOzG+26xg==", "dev": true, "requires": { "eslint-config-airbnb": "^19.0.2", diff --git a/package.json b/package.json index c01b73ea4..a83694b17 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "prettier": "@lars-reimann/prettier-config", "devDependencies": { - "@lars-reimann/eslint-config": "^4.1.2", + "@lars-reimann/eslint-config": "^4.2.0", "@lars-reimann/prettier-config": "^5.0.0" } } From e83fef99894b83ec1bf1756b7f99331cb058460f Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 15:35:51 +0200 Subject: [PATCH 4/9] build: fix Dependabot config --- .github/dependabot.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 3e0944375..5f8be7eae 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,20 +5,20 @@ version: 2 updates: - - package-ecosystem: 'npm' + - package-ecosystem: 'github-actions' directory: '/' schedule: interval: 'monthly' - - package-ecosystem: 'npm' - directory: '/client' + - package-ecosystem: 'gradle' + directory: '/api-editor' schedule: interval: 'monthly' - - package-ecosystem: 'gradle' + - package-ecosystem: 'npm' directory: '/' schedule: interval: 'monthly' - - package-ecosystem: 'github-actions' - directory: '/' + - package-ecosystem: 'npm' + directory: '/api-editor/gui' schedule: interval: 'monthly' - package-ecosystem: 'pip' From 68f446d256fcad0a80f20a0f42b01a2022a65a13 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 15:48:20 +0200 Subject: [PATCH 5/9] build: fix prettier ignore list --- .prettierignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.prettierignore b/.prettierignore index 0d3350e96..af4df2ddf 100644 --- a/.prettierignore +++ b/.prettierignore @@ -3,4 +3,4 @@ build/ dist/ dist-ssr/ -api-editor/server/src/main/resources/static/ +api-editor/backend/src/main/resources/static/ From abe9f3a919baa644086a04c856bf93bf9d9cd666 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 15:59:43 +0200 Subject: [PATCH 6/9] build: possible fix for lint error --- .eslintrc.js | 4 +++- api-editor/gui/tsconfig.eslint.json | 8 ++++++++ api-editor/gui/tsconfig.json | 2 +- tsconfig.eslint.json | 8 -------- 4 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 api-editor/gui/tsconfig.eslint.json delete mode 100644 tsconfig.eslint.json diff --git a/.eslintrc.js b/.eslintrc.js index 45933264d..f8f0a709a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,7 +1,9 @@ +const path = require('path') + module.exports = { root: true, parserOptions: { - tsconfigRootDir: __dirname, + tsconfigRootDir: path.join(__dirname, 'api-editor', 'gui'), project: 'tsconfig.eslint.json', }, settings: { diff --git a/api-editor/gui/tsconfig.eslint.json b/api-editor/gui/tsconfig.eslint.json new file mode 100644 index 000000000..6a17ce531 --- /dev/null +++ b/api-editor/gui/tsconfig.eslint.json @@ -0,0 +1,8 @@ +{ + "extends": "tsconfig.json", + "compilerOptions": { + "noEmit": true + }, + "include": ["src/**/*", "vite.config.ts"], + "exclude": [] +} diff --git a/api-editor/gui/tsconfig.json b/api-editor/gui/tsconfig.json index 193c2f4e4..6d2c935b5 100644 --- a/api-editor/gui/tsconfig.json +++ b/api-editor/gui/tsconfig.json @@ -15,6 +15,6 @@ "noEmit": true, "jsx": "react" }, - "include": ["src/"], + "include": ["src/**/*"], "exclude": ["**/*.test.ts"] } diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json deleted file mode 100644 index eaeb289a6..000000000 --- a/tsconfig.eslint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./api-editor/gui/tsconfig.json", - "compilerOptions": { - "noEmit": true - }, - "include": ["./api-editor/gui/src", "./api-editor/gui/vite.config.ts"], - "exclude": [] -} From db95be5397f4cc307bd17537e29ef17d3db20e46 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 16:05:08 +0200 Subject: [PATCH 7/9] build: possible fix that tsconfig.json is not found --- api-editor/gui/tsconfig.eslint.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-editor/gui/tsconfig.eslint.json b/api-editor/gui/tsconfig.eslint.json index 6a17ce531..41f8873a2 100644 --- a/api-editor/gui/tsconfig.eslint.json +++ b/api-editor/gui/tsconfig.eslint.json @@ -1,5 +1,5 @@ { - "extends": "tsconfig.json", + "extends": "./tsconfig.json", "compilerOptions": { "noEmit": true }, From eb9e6472b915ee27876c5c77fa3cc6b379abcf40 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Sat, 4 Jun 2022 16:13:46 +0200 Subject: [PATCH 8/9] build: include .eslintrc instead of ignoring it --- .eslintignore | 3 --- .eslintrc.js | 4 +--- api-editor/gui/tsconfig.eslint.json | 8 -------- tsconfig.eslint.json | 12 ++++++++++++ 4 files changed, 13 insertions(+), 14 deletions(-) delete mode 100644 api-editor/gui/tsconfig.eslint.json create mode 100644 tsconfig.eslint.json diff --git a/.eslintignore b/.eslintignore index 994b29ad3..de845f8e4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,9 +3,6 @@ build/ dist/ dist-ssr/ -# Configuration -.eslintrc.js - # GUI /api-editor/gui/vite.config.ts /api-editor/gui/src/theme/index.d.ts diff --git a/.eslintrc.js b/.eslintrc.js index f8f0a709a..45933264d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,9 +1,7 @@ -const path = require('path') - module.exports = { root: true, parserOptions: { - tsconfigRootDir: path.join(__dirname, 'api-editor', 'gui'), + tsconfigRootDir: __dirname, project: 'tsconfig.eslint.json', }, settings: { diff --git a/api-editor/gui/tsconfig.eslint.json b/api-editor/gui/tsconfig.eslint.json deleted file mode 100644 index 41f8873a2..000000000 --- a/api-editor/gui/tsconfig.eslint.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "noEmit": true - }, - "include": ["src/**/*", "vite.config.ts"], - "exclude": [] -} diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json new file mode 100644 index 000000000..88e435afe --- /dev/null +++ b/tsconfig.eslint.json @@ -0,0 +1,12 @@ +{ + "extends": "./api-editor/gui/tsconfig.json", + "compilerOptions": { + "noEmit": true + }, + "include": [ + "./.eslintrc.js", + "./api-editor/gui/src/**/*", + "./api-editor/gui/vite.config.ts" + ], + "exclude": [] +} From 3d7d25b77eab4d7d2c9dfb874b491059d0e79de9 Mon Sep 17 00:00:00 2001 From: lars-reimann Date: Sat, 4 Jun 2022 14:18:24 +0000 Subject: [PATCH 9/9] style: apply automatic fixes of linters --- tsconfig.eslint.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tsconfig.eslint.json b/tsconfig.eslint.json index 88e435afe..9ab51453a 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.eslint.json @@ -3,10 +3,6 @@ "compilerOptions": { "noEmit": true }, - "include": [ - "./.eslintrc.js", - "./api-editor/gui/src/**/*", - "./api-editor/gui/vite.config.ts" - ], + "include": ["./.eslintrc.js", "./api-editor/gui/src/**/*", "./api-editor/gui/vite.config.ts"], "exclude": [] }