Skip to content

Commit

Permalink
Automatically sort imports using Prettier plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hupf committed Nov 6, 2023
1 parent 5975947 commit b153e5f
Show file tree
Hide file tree
Showing 23 changed files with 623 additions and 86 deletions.
34 changes: 34 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const config = {
/**
* Enable plugin for automatically sorting of imports
*/
plugins: ["@trivago/prettier-plugin-sort-imports"],
importOrderParserPlugins: ["typescript", "decorators-legacy"],

/**
* Custom sorting of imports, first lit stuff, then other third
* party libs, then own modules
*/
importOrder: [
"^lit$",
"^lit/.*$",
"^@lit/.*$",
"^@lit-app/.*$",
"<THIRD_PARTY_MODULES>",
"^[./]",
],

/**
* Whether to separate sorting groups (as defined above) with
* newline
*/
// importOrderSeparation: true,

/**
* Whether to sort the specifiers on the left hand side of the
* import statement
*/
importOrderSortSpecifiers: true,
};

export default config;
1 change: 0 additions & 1 deletion .prettierrc.json

This file was deleted.

1 change: 0 additions & 1 deletion cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************

// Import commands.js using ES2015 syntax:
import "./commands";

Expand Down
Loading

0 comments on commit b153e5f

Please sign in to comment.