-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix a problem that 3rd-party plugins could not be loaded with legacy config #366
Fix a problem that 3rd-party plugins could not be loaded with legacy config #366
Conversation
src/__snapshots__/core.test.ts.snap
Outdated
"// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator | ||
// eslint-disable-next-line test/ban-nullish-coalescing-operator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting only one disable comment to be added, but multiple ones were added.
To investigate this problem, I added the following code for the debug log.
$ pnpm run test -t "fixes problems" src/core.test.ts
...
unfilteredMessages [
{
ruleId: 'test/ban-nullish-coalescing-operator',
message: "Definition for rule 'test/ban-nullish-coalescing-operator' was not found.",
line: 1,
column: 1,
endLine: 1,
endColumn: 2,
severity: 2,
nodeType: null
}
]
It seems that the plugin is failing to load.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core.lint()
only uses the ESLint
class. On the other hand, core.disablePerLine()
uses both the ESLint
class and the Linter
class.
The ESLint
class seems to be able to load 3rd-party plugins, but the Linter
class cannot.
As a result, it seems that although the lint results can be output, the problems cannot be fixed.
close: #364