From b24410b79641f30a403b26b0e4398dddbd6a8656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20G=C3=BCdelh=C3=B6fer?= Date: Mon, 30 Dec 2024 18:37:37 +0100 Subject: [PATCH 1/8] Add Prettier dev dependency and add linting commands in root package.json --- package-lock.json | 19 ++++++++++++++++++- package.json | 7 +++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2724559e..6f32c827 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,8 @@ "react-rnd": "^10.4.1" }, "devDependencies": { - "lerna": "^6.5.1" + "lerna": "^6.5.1", + "prettier": "^3.4.2" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -15975,6 +15976,22 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/prettier": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/pretty-format": { "version": "29.4.3", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.4.3.tgz", diff --git a/package.json b/package.json index 0ee2f2be..b32bf8a4 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,9 @@ "url": "git+https://github.com/munshkr/flok.git" }, "scripts": { - "build": "lerna run build" + "build": "lerna run build", + "lint:check": "prettier -c .", + "lint:fix": "prettier -w ." }, "keywords": [ "codemirror", @@ -23,7 +25,8 @@ }, "homepage": "https://github.com/munshkr/flok#readme", "devDependencies": { - "lerna": "^6.5.1" + "lerna": "^6.5.1", + "prettier": "^3.4.2" }, "workspaces": [ "packages/*" From 44aaf400fd88d6b87e8287f986da8a22cea00ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20G=C3=BCdelh=C3=B6fer?= Date: Mon, 30 Dec 2024 18:41:02 +0100 Subject: [PATCH 2/8] Add .editorconfig from prettier defaults --- .editorconfig | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..a78447eb --- /dev/null +++ b/.editorconfig @@ -0,0 +1,7 @@ +[*] +charset = utf-8 +insert_final_newline = true +end_of_line = lf +indent_style = space +indent_size = 2 +max_line_length = 80 \ No newline at end of file From 907e66f67e624676c641dcf10147999e41d04aa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20G=C3=BCdelh=C3=B6fer?= Date: Mon, 30 Dec 2024 18:42:12 +0100 Subject: [PATCH 3/8] Add lint:check to CI --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0bcd1dc9..d506d39a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,4 +18,5 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run build + - run: npm run lint:check # - run: npm test From 5599ee7d1a99ce9b4bb34dd9112d67a702ff645a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20G=C3=BCdelh=C3=B6fer?= Date: Mon, 30 Dec 2024 18:50:52 +0100 Subject: [PATCH 4/8] Add .prettierigner, with build outputs --- .prettierignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..c6a4f0ff --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +packages/web/public From 7f41aa9ce5ff10a7042721ee3e2d3caaebc95bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20G=C3=BCdelh=C3=B6fer?= Date: Tue, 31 Dec 2024 15:58:38 +0100 Subject: [PATCH 5/8] Rename linting tasks --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b32bf8a4..f756f0ee 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,8 @@ }, "scripts": { "build": "lerna run build", - "lint:check": "prettier -c .", - "lint:fix": "prettier -w ." + "lint": "prettier -c .", + "format": "prettier -w ." }, "keywords": [ "codemirror", From 8b6823766ba3419498d55bfba78156a3518d8452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20G=C3=BCdelh=C3=B6fer?= Date: Tue, 31 Dec 2024 16:02:18 +0100 Subject: [PATCH 6/8] Add check and lint back to CI --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d506d39a..0dcb3695 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,5 +18,6 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm install - run: npm run build - - run: npm run lint:check + - run: npm run check + - run: npm run lint # - run: npm test From 0faa388946c4efe2bb93cb5333ccddb5f226ebcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Silvani?= Date: Thu, 2 Jan 2025 10:39:06 -0300 Subject: [PATCH 7/8] chore(ci): Comment out lint for now --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0dcb3695..5a23911b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm install - - run: npm run build - run: npm run check - - run: npm run lint + # - run: npm run lint + - run: npm run build # - run: npm test From 75a0c1bc3e5f46fdad66fa2b4aa8d08e9366f818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Silvani?= Date: Thu, 2 Jan 2025 10:41:02 -0300 Subject: [PATCH 8/8] fix(ci): Run build before check --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5a23911b..4e2f082b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,7 +17,7 @@ jobs: with: node-version: ${{ matrix.node-version }} - run: npm install + - run: npm run build - run: npm run check # - run: npm run lint - - run: npm run build # - run: npm test