From ec3b981a9008fb23fd070bad95a8d8b1f00dc499 Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Thu, 6 Jun 2024 12:16:46 -0400 Subject: [PATCH 1/7] chore: update code formatting cofigs --- .editorconfig | 10 +++++++++- .prettierrc | 38 ++++++++++++++++++-------------------- .vscode/settings.json | 5 ++++- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/.editorconfig b/.editorconfig index 00138d90..5772a330 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,7 +1,15 @@ +# Editor configuration, see http://editorconfig.org +root = true + [*] charset = utf-8 insert_final_newline = true end_of_line = lf indent_style = space -indent_size = 4 +indent_size = 2 max_line_length = 80 +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index 4ff0749f..9a752409 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,22 +1,20 @@ { - "phpVersion": "8.1", - "plugins": ["@prettier/plugin-php"], - "tabWidth": 4, - "bracketSameLine": true, - "printWidth": 80, - "singleQuote": false, - "overrides": [ - { - "files": ["*.js"], - "options": { - "singleQuote": true - } - }, - { - "files": ["*.md", "package.json", "package-lock.json"], - "options": { - "tabWidth": 2 - } - } - ] + "phpVersion": "8.1", + "plugins": ["@prettier/plugin-php"], + "bracketSameLine": false, + "bracketSpacing": true, + "printWidth": 80, + "singleQuote": false, + "semi": true, + "tabWidth": 2, + "useTabs": false, + "trailingComma": "es5", + "overrides": [ + { + "files": ["*.js"], + "options": { + "singleQuote": true + } + } + ] } diff --git a/.vscode/settings.json b/.vscode/settings.json index 7a73a41b..0bae4c2e 100755 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,2 +1,5 @@ { -} \ No newline at end of file + "eslint.validate": ["json"], + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true +} From ccc1ab2cd9ad974f7f98fe9f5ed5ea612e5c9c6a Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Tue, 11 Jun 2024 09:21:27 -0400 Subject: [PATCH 2/7] update: default prettier config --- .prettierrc | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/.prettierrc b/.prettierrc index 9a752409..6a898910 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,20 +1,20 @@ { - "phpVersion": "8.1", - "plugins": ["@prettier/plugin-php"], - "bracketSameLine": false, - "bracketSpacing": true, - "printWidth": 80, - "singleQuote": false, - "semi": true, - "tabWidth": 2, - "useTabs": false, - "trailingComma": "es5", - "overrides": [ - { - "files": ["*.js"], - "options": { - "singleQuote": true - } - } - ] + "phpVersion": "8.1", + "plugins": ["@prettier/plugin-php"], + "bracketSameLine": false, + "bracketSpacing": true, + "printWidth": 80, + "singleQuote": false, + "semi": true, + "trailingComma": "es5", + "tabWidth": 2, + "useTabs": true, + "overrides": [ + { + "files": ["*.js"], + "options": { + "singleQuote": true + } + } + ] } From 9175c9e766cc3694c808cdcc7a28c0f74270fc60 Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Tue, 11 Jun 2024 09:28:44 -0400 Subject: [PATCH 3/7] use tab as indent style --- .editorconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 5772a330..2ab1c558 100644 --- a/.editorconfig +++ b/.editorconfig @@ -5,11 +5,11 @@ root = true charset = utf-8 insert_final_newline = true end_of_line = lf -indent_style = space +indent_style = tab indent_size = 2 max_line_length = 80 trim_trailing_whitespace = true [*.md] max_line_length = off -trim_trailing_whitespace = false \ No newline at end of file +trim_trailing_whitespace = false From 7aabe12123fa98d1bc5dc2202673a2fe03acd86d Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Tue, 11 Jun 2024 09:29:42 -0400 Subject: [PATCH 4/7] update: formatted file From 3788c7b00dccb35a87d266305811d0be67703815 Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Tue, 11 Jun 2024 09:31:00 -0400 Subject: [PATCH 5/7] update: extensions for development --- .vscode/extensions.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..151de212 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + "recommendations": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "firsttris.vscode-jest-runner", + "stylelint.vscode-stylelint", + "eamodio.gitlens", + "wix.vscode-import-cost", + "christian-kohler.path-intellisense", + "formulahendry.auto-rename-tag", + "deque-systems.vscode-axe-linter" + ] +} From 1be26fff0671e7057207fd9922975a85a3d9f385 Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Tue, 11 Jun 2024 09:36:31 -0400 Subject: [PATCH 6/7] chore: launch config for debugging jest files --- .vscode/launch.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..4f3613ef --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,20 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "request": "launch", + "name": "Jest Current File", + "skipFiles": ["/**"], + "program": "${workspaceFolder}/node_modules/.bin/jest", + "cwd": "${workspaceFolder}", + "args": [ + "test", + "--testPathPattern=${FileBasenameNoExtension}", + "--runInBand" + ], + "console": "internalConsole", + "internalConsoleOptions": "neverOpen" + } + ] +} From 2d04e60db62506b620826b4c524c34de1e58d400 Mon Sep 17 00:00:00 2001 From: Mahesh Ambig Date: Tue, 11 Jun 2024 09:44:54 -0400 Subject: [PATCH 7/7] chore: gitignore files --- .gitignore | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index e42dde9d..cebdcfbd 100755 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,24 @@ -node_modules -.DS_Store -api-cache +# compiled output tmp -.vscode +api-cache + +# dependencies +node_modules # auto-gen PHP files/logs php_errors.log + + +# IDE - VSCode +.vscode/* +!.vscode/settings.json +!.vscode/launch.json +!.vscode/extensions.json + +# System Files +.DS_Store + +# misc +npm-debug.log +yarn-error.log +package-lock.json