Skip to content

Does we have any formatter for lit like eslint or prettier in VScode? #4033

Answered by p-ob
jitendraP-ashutec asked this question in Q&A
Discussion options

You must be logged in to vote

We've been using eslint and prettier for quite some time with our lit monorepos.

Here's an example of what we've set up and it's carried on strong for quite some time (it's been awhile since I've reviewed, so I'm sure it could be improved upon).

Packages:

.prettierrc:

{
  "printWidth": 120,
  "overrides": [
    {
      "files": "*.ts,*.js",
      "options": {
        "htmlWhitespaceSensitivity": "strict"
      }
    },
    {
      "files": "*.scss",
      "options": {
        "parser": "scss",
        "singleQuote": true,
        "printWidth": 200
      }
    },
  …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jitendraP-ashutec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants