Closed daidodo closed 3 years ago
I should've created a new issue in the first place. Thanks again for taking the time to look into this.
May I ask why you disable formatExports
and what if exports exceed 100 line length?
Just disabled for now as we get formatting implemented each step at a time.
We won't format exports either and will have them at unlimited line length.
Thanks! Before getting into the solution, I'd like to clarify some options in your import-sorter.json:
Thanks for the heads up. Even though those are default, I feel it's nice to explicitly list some properties in case the defaults were to change in a future version.
Yes, it's up to you.
Regarding the new feature, my understanding is you want the plugin to ignore max-len
rule because you've disabled it for imports and exports.
And I also noticed that your import-sorter.json has "emptyLinesAfterAllImports": 2
which can be replaced by ESLint rule import/newline-after-import if you want.
And that brings me to another use case that people might want some rules being ignored while others are in effect.
So my suggestion is as follows:
ignoreESLintRules: string[] | string
in Configuration.[]
, i.e. an empty array.Some notes:
ignoreESLintRules: '.*'
.indent
and @typescript-eslint/indent
you can set ignoreESLintRules: ['indent$']
.@dburdan, please tell me your thoughts. Thanks!
Thanks for the tip on the emptyLinesAfterAllImports
ESLint rule, we'll definitely use that!
I think your solution above would work perfectly, and also allow room for new use-cases other teams may encounter. That would solve our problems 👍🏼
@dburdan - Sorry for the late response as I was busy recently! But now the feature is out in v7.4.0! Please check it out and tell me if you have any questions.
Thanks!
Amazing, thanks so much! I'll give it a try as soon as the update is available.
Upgraded and working 👍🏼 I think it's safe to say this issue can be closed.
Moving a new feature request to this new issue:
import-sorter.json