-
Notifications
You must be signed in to change notification settings - Fork 23
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
Fix doubling of new lines and adding indent ignore feature #33
Conversation
@gajus please take a look, minimal unbreaking changes. |
Thank you |
🎉 This PR is included in version 2.4.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Usage exmaple: {
plugins: ["sql", "unicorn"],
rules: {
'unicorn/template-indent': [
'warn', {
indent: 4,
tags: ['sql']
}
],
"sql/format": [
'warn',
{
ignoreBaseIndent: true,
ignoreExpressions: false,
ignoreInline: false,
ignoreTagless: true
}, {
commaBreak: true
}
]
}
} |
@npdev453 can you take a video or 2 to show what it looks like in the editor using ESLint automatic fixing? Wonder if there's a way to apply auto-fix only for singular rules (there are other rules where I don't want it to automatically fix, but rather warn as a prompt for me to come up with my own solution) |
@karlhorky Done! https://youtu.be/9bZgvHfSnrQ About second question, maybe something like that |
For anyone finding this and looking for another alternative for formatting SQL in embedded Prettier can be used with the combination of the |
9da5b34 Fixes: #10
(because now it cause linting loop)
ignoreBaseIndent
makes this plugin usable withunicorn/template-indent
(or with striptIndent template lit itself)https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/template-indent.md (because now it cause linting loop)
that in some mind can close #31