-
-
Notifications
You must be signed in to change notification settings - Fork 867
fix(linter/plugins): get correct plugin name in all cases #17033
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| # Avoid ATTW errors due to nested `node_modules` directories inside `test/fixtures` | ||
| # which contain packages with no `name` field in their `package.json`s. | ||
| # | ||
| # TSDown's `attw.excludeEntrypoints` option doesn't work - possible bug in TSDown? | ||
| # https://github.com/rolldown/tsdown/issues/656 | ||
| test/fixtures/**/node_modules |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| { | ||
| "plugins": ["jsdoc"], | ||
| "jsPlugins": [ | ||
| // `plugin.meta.name` overrides package name | ||
| "plugin1", | ||
| // Package name used where no `plugin.meta.name` | ||
| "plugin2", | ||
| // `eslint-plugin-` prefix stripped | ||
| "eslint-plugin-plugin3", | ||
| "eslint-plugin-plugin4", | ||
| // `/eslint-plugin` suffix stripped | ||
| "@scope/eslint-plugin", | ||
| "@scope2/eslint-plugin", | ||
| // Plugin name is `jsdoc`, but that's overridden by alias | ||
| { "name": "js-jsdoc", "specifier": "./plugins/jsdoc.ts" }, | ||
| { "name": "js-jsdoc2", "specifier": "jsdoc" }, | ||
| // Plugin defines no `plugin.meta.name`, but not an error due to alias | ||
| { "name": "no-name-alias", "specifier": "./plugins/no_name.ts" }, | ||
| { "name": "no-name-alias2", "specifier": "no_name" } | ||
| ], | ||
| "categories": { "correctness": "off" }, | ||
| "rules": { | ||
| // `plugin1` | ||
| "plugin1-name-from-rule/rule": "error", | ||
| // `plugin2` | ||
| "plugin2-name-from-package/rule": "error", | ||
| // `eslint-plugin-plugin3` | ||
| "eslint-plugin-plugin3-name-from-package/rule": "error", | ||
| // `eslint-plugin-plugin4` | ||
| "eslint-plugin-plugin4-name-from-rule/rule": "error", | ||
| // `@scope/eslint-plugin` | ||
| "@scope/rule": "error", | ||
| // `@scope2/eslint-plugin` | ||
| "@scope2/rule": "error", | ||
| // Aliased | ||
| "js-jsdoc/rule": "error", | ||
| "js-jsdoc2/rule": "error", | ||
| "no-name-alias/rule": "error", | ||
| "no-name-alias2/rule": "error", | ||
| // Native `jsdoc` rule still works | ||
| "jsdoc/require-param": "error" | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| /** | ||
| * @param foo | ||
| */ | ||
| function f(foo, bar) {} | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.