New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for laravel blade files #369
Comments
@glennmichael123 you gonna need prettier-plugin-blade installed |
@Dimava this package right here? |
@glennmichael123 yep, prettier itself also uses plugins for languages that are not built-in (html/js/css/gql/md/yaml) |
@Dimava thank you for your response and apologies for the late reply, I tried installing that - I wasn't able to make it work, without somehow having to press |
@glennmichael123 please update your example repo and link a couple of .blade files so I could try it |
@Dimava updated it, i hope i knew what i was doing there 😅 |
Hi, sorry for bothering you, were you able to take a look at the minimal reproduction and figure out something? Or do you need more info? |
export default [{
files: ['**/*.blade.php'],
plugins: { format },
languageOptions: { parser: format.parserPlain },
rules: {
'format/prettier': ['error', {
// "plugins": ["@shufo/prettier-plugin-blade"], "trailingCommaPHP": true,, etc
...JSON.parse(readFileSync('./.prettierrc', 'utf8')),
// "parser": "blade", "tabWidth": 4
...JSON.parse(readFileSync('./.prettierrc', 'utf8')).overrides[0].options,
}],
},
}] |
Describe the bug
We tried configuring for
.blade.php
files but the auto-formatting did not work. Is support for blade files not there yet or did we misconfigure our configs?Reproduction
https://github.com/ci-on/eslint-example/blob/main/eslint.config.js#L18C3-L29C5
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: