-
-
Notifications
You must be signed in to change notification settings - Fork 29
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
Allow to exclude certain rules from code formatting #78
Comments
Our Atom linter plugin has an option for this, which defaults to the mentioned rules: https://github.com/xojs/atom-linter-xo/blob/3645b74ba8820b99afff36419c4798ad1da12690/index.js#L55 However, honestly, I agree with you. They can be annoying and auto-fixing doesn't make much sense for them, in hindsight. Maybe we should move those rules to use the ESLint suggestions API instead of auto-fixing? If you agree, I can open some issues. |
That sounds a great idea! Closing this issue as the suggestion API is a better solution! |
But I just realized that we don't own |
I guess we could implement our own version in |
We could actually just create a rule that is bundled in XO that just implements it without any options, and only does what we need: https://github.com/xojs/eslint-config-xo/blob/06e4e1416bdbf2df56984adca8039683ebad735c/index.js#L258-L267 If you agree, I can open an issue on XO. |
Not sure how to do that, but if you think it will work, let's do it! |
If no @pvdlg @sindresorhus - This vscode extension already appears to inherit projects' configs (e.g. from |
While developing it's often useful to comment some code or add
.only
/.skip
to some tests.Rules like capitalized-comments, ava/no-only-test or ava/no-skip-test create friction during development when formatting the code on save with vscode-xo.
For example it's impossible to add
.only
to an AVA test because it will be removed automatically on save.It would be nice to have an option in the plugin to ignore some rules when auto formatting, similarly to what
atom-linter-xo
does: https://github.com/xojs/atom-linter-xo/blob/master/index.js#L55The text was updated successfully, but these errors were encountered: