diff --git a/.editorconfig b/.editorconfig index 5feb5e51c..86738d75f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,16 +4,21 @@ root = true [*] charset = utf-8 indent_style = space -indent_size = 4 +indent_size = 2 +end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true -max_line_length = 180 - -[*.json] -indent_size = 2 +max_line_length = 120 -[*.ts] +[*.{tsx,ts,jsx,js}] quote_type = single +indent_size = 4 + +[*.{html,spec.ts}] +max_line_length = 250 + +[packages/type-compiler/src/compiler.ts] +max_line_length = 250 [*.md] max_line_length = off diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..8f5cf67db --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +yarn.lock +.angular +packages/core/src/indent.ts diff --git a/.prettierrc b/.prettierrc index 0cfd4c471..9a68a6f08 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,19 +1,28 @@ { "plugins": ["@trivago/prettier-plugin-sort-imports"], + "importOrderParserPlugins": ["typescript", "decorators-legacy"], + "importOrder": ["", "^@deepkit/(.*)$", "^[./]"], + "importOrderSeparation": true, + "importOrderSortSpecifiers": true, "trailingComma": "all", + "printWidth": 120, "bracketSpacing": true, "tabWidth": 2, "singleQuote": true, "arrowParens": "avoid", "endOfLine": "lf", - "importOrderSeparation": true, - "importOrderSortSpecifiers": true, "overrides": [ { "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], "options": { "tabWidth": 4 } + }, + { + "files": ["*.spec.ts", "*.html", "packages/type-compiler/src/compiler.ts"], + "options": { + "printWidth": 250 + } } ] }