Open kimihiro64 opened 5 years ago
Would you provide the following items?
Given rules like this:
'eslint-comments/no-restricted-disable': [
'error',
'*', // disable all rules but the following
// overrides the enforce that class methods use "this"
// https://eslint.org/docs/rules/class-methods-use-this
// used when declaring interfaces in JS
'!class-methods-use-this',
// this is a problem when returning a cast literal
// https://palantir.github.io/tslint/rules/no-object-literal-type-assertion/
'!@typescript-eslint/no-object-literal-type-assertion',
// eslint-disable-next-line import/no-unassigned-import -> will still error
// eslint-disable-next-line class-methods-use-this -> will not error
I do have this issue too. Can I make a PR to fix this problem?
This issue is due to ignore
package. Due to how it works (non reincluded sub file if parent is ignored), it ignore the non-core rules because of the *
pattern
Hi @kimihiro64!
Since this repo is unmaintained, you might want to re-open this issue in the @eslint-community fork https://github.com/eslint-community/eslint-plugin-eslint-comments
For more info about why we created this organization, you can read https://eslint.org/blog/2023/03/announcing-eslint-community-org
I'm not allowing any rules to be disabled by default (''), then adding specific rules that have to be disabled because they have no workaround. This works for core rules with '!corerule', but it breaks for all plugin rules '!plugin/rule', presumably because under the hood this uses the ignore package, which is built on recognizing directories. I tried escaping the / with both \/ and //, using instead of /, using . instead of /, nothing works. If ignore is the issue, then probably this needs to be redone using regex patterns instead of glob patterns to support plugin rules. As of right now I have to turn this rule off because it's always erroring for those plugin rules.