Skip to content

Commit

Permalink
build: Update prettier/eslint/stylelint
Browse files Browse the repository at this point in the history
* Add prettier plugin for import sorting. Previously used an eslint plugin, but prettier is better suited for code formatting rules.
* Add prettier plugin for sorting attributes on html elements.
  • Loading branch information
jrassa committed Jul 28, 2023
1 parent 576cd71 commit dfcc501
Show file tree
Hide file tree
Showing 80 changed files with 2,563 additions and 1,405 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,6 @@
"rxjs/Rx"
]
}],
"sort-imports": ["error", { "ignoreDeclarationSort": true }],
"import/order": ["error", {
"groups": [
["builtin"],
["external"],
["internal", "parent", "sibling"]
],
"pathGroups": [
{
"pattern": "@angular/**",
"group": "builtin"
}
],
"pathGroupsExcludedImportTypes": ["@angular/**"],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}],
"import/no-unresolved": ["error"],
"rxjs/prefer-observer": ["error"],
"rxjs/finnish": ["error", {
Expand Down
38 changes: 37 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
{
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-organize-attributes"],
"printWidth": 100,
"singleQuote": true,
"trailingComma": "none"
"trailingComma": "none",
"importOrder": [
"^@angular/(.*)$",
"<THIRD_PARTY_MODULES>",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderParserPlugins": ["decorators-legacy", "typescript"],
"attributeGroups": [
"$CLASS",
"^\\[class\\.",
"^\\[ngClass]",
"$ID",
"$NAME",
"^\\[name]$",
"$DATA",
"^\\[data-",
"$SRC",
"$FOR",
"$TYPE",
"^\\[type]$",
"$HREF",
"^\\[href]$",
"$VALUE",
"^\\[value]$",
"$TITLE",
"^\\[title]$",
"$ALT",
"$ROLE",
"$ARIA",
"^\\[attr.aria",
"$DEFAULT",
"$ANGULAR"
],
"attributeSort": "ASC"
}
Loading

0 comments on commit dfcc501

Please sign in to comment.