Skip to content

Incompatible with prettier-plugin-twig #89

@johnvanhulsen

Description

@johnvanhulsen

Dependency information

"scripts:" {
  ...
  "format": "prettier --write 'src/**/*.{js,ts,svelte,css,scss}' 'templates/**/*.{html,twig}'"
},
"devDependencies": {
  "@zackad/prettier-plugin-twig": "^0.15.2",
  "prettier": "^3.5.1",
  "prettier-plugin-classnames": "^0.7.6",
  "prettier-plugin-merge": "^0.7.2",
  "prettier-plugin-svelte": "^3.3.3",
  "prettier-plugin-tailwindcss": "^0.6.11",
  "tailwindcss": "^4.0.6",
}

Steps to reproduce

Used this plugin in Twig, where i use @zackad/prettier-plugin-twig for formatting.
I think these two conflicting eachother. When i modify my file to .html, this plugin wins. With .twig all classnames are on the same line.

{
  "plugins": [
    "prettier-plugin-svelte",
    "prettier-plugin-tailwindcss",
    "@zackad/prettier-plugin-twig",
    "prettier-plugin-classnames",
    "prettier-plugin-merge"
  ],
  "overrides": [
    {
      "files": "*.svelte",
      "options": {
        "parser": "svelte"
      }
    },
    {
      "files": "*.twig",
      "options": {
        "tabWidth": 4
      }
    }
  ],
  "semi": false,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "es5",
  "printWidth": 100
}

Is there something miss in my config, or is it the plugin? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlang: othersAn issue with a language that is not supported by this plugintype: new language

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions