eslint-plugin-eslint-plugin
eslint-plugin-eslint-plugin copied to clipboard
warning '/*eslint*/' has no effect because you have 'noInlineConfig' setting in your config (.eslintrc.js#overrides[3])
> eslint . --ignore-pattern "!.*"
/home/weiran/repo/eslint-plugin-eslint-plugin/docs/rules/consistent-output.md
16:1 warning '/*eslint*/' has no effect because you have 'noInlineConfig' setting in your config (.eslintrc.js#overrides[3])
37:1 warning '/*eslint*/' has no effect because you have 'noInlineConfig' setting in your config (.eslintrc.js#overrides[3])
it was introduced in https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/commit/15ffadae375f9f835b3f3a18b5aa1bbc07e5efbe. it would be great if we can find a way to avoid the warnings. :)
Here's why I had to enable noInlineConfig for the markdown documentation samples with these inline configs:
/* eslint eslint-plugin/consistent-output: error */
- We can only refer to our own rules using
self/, noteslint-plugin/, so we'll get an errorDefinition for rule was not found. - Even if we change the inline configs to use
self/, then we will start receiving a lot of unwanted violations from the violations we intend to show in the documentation samples.
I'm not sure how to eliminate the warnings / noInlineConfig usage, other than to remove the inline configs (which I personally see as redundant, and note that we're not using them in every rule doc anyway).
Let me know if you have any ideas.
uh, I have tried reportUnusedDisableDirectives: false, but it did not help.
there are some choices:
-
- remove the inline config in docs.
-
- eslint provide an option
ignoreInlineConfig(similar tonoInlineConfig).
- eslint provide an option
I slightly prefer the 2nd(to keep the same format as eslint docs as possible, see for-direction). can you file the issue in eslint repo, so we can figure out the right solution?