diff --git a/.editorconfig b/.editorconfig index 00138d90..2ab1c558 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_style = tab +indent_size = 2 max_line_length = 80 +trim_trailing_whitespace = true + +[*.md] +max_line_length = off +trim_trailing_whitespace = false 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 diff --git a/.prettierrc b/.prettierrc index 4ff0749f..6a898910 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, + "trailingComma": "es5", + "tabWidth": 2, + "useTabs": true, + "overrides": [ + { + "files": ["*.js"], + "options": { + "singleQuote": true + } + } + ] } 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" + ] +} 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" + } + ] +} 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 +}