diff --git a/.editorconfig b/.editorconfig index e89330a61..bc0f5a7fa 100644 --- a/.editorconfig +++ b/.editorconfig @@ -7,6 +7,7 @@ indent_style = space indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true +end_of_line = crlf [*.md] max_line_length = off diff --git a/.gitignore b/.gitignore index 813e36a09..fd8a2a5f5 100644 --- a/.gitignore +++ b/.gitignore @@ -25,7 +25,6 @@ speed-measure-plugin.json *.launch .settings/ *.sublime-workspace -.prettierrc # IDE - VSCode .vscode/* diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..5922806fc --- /dev/null +++ b/.prettierrc @@ -0,0 +1,37 @@ +{ + "singleQuote": true, + "semi": true, + "trailingComma": "all", + "tabWidth": 2, + "bracketSpacing": true, + "printWidth": 80, + "endOfLine": "crlf", + "arrowParens": "always", + "quoteProps": "consistent", + "overrides": [ + { + "files": "*.html", + "options": { + "parser": "html" + } + }, + { + "files": "*.component.html", + "options": { + "parser": "angular" + } + }, + { + "files": "*.scss", + "options": { + "singleQuote": false + } + }, + { + "files": "*.json", + "options": { + "printWidth": 80 + } + } + ] +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 0595e26bc..7dd8913ee 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -5,6 +5,7 @@ "angular.ng-template", "nrwl.angular-console", "dbaeumer.vscode-eslint", - "firsttris.vscode-jest-runner" + "firsttris.vscode-jest-runner", + "editorconfig.editorconfig" ] }