Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
To help with un-ts#121 / un-ts#112, fixes a bunch of tests that involved basic logic updates but I didn't get to fixing the tests that weren't as easy without context/backstory on the repo. I added comments explaining the changes I made.
Remaining failures
This leaves 33 failing tests in 5 files with 1 underlying problem in each file AFAICT:
test/rules/no-absolute-path.spec.ts
(11 failures, fixed in Fix no-absolute-path tests #4)All of the invalid tests fail with a confusing error about the rule name (
Error rule name should be the same as the name of the rule being tested
), and that is masking the underlying error of the configuration not liking the absolute file paths:No matching configuration found for /foo/bar/index.js.
. I'm guessing there needs to be some additional configuration to get ESLint to understand the aliasing that's going on here and not interpret the path literally?test/rules/consistent-type-specifier-style.spec.ts
(14 failures)All of the Flow tests involving the
typeof
keywords throw errors (A fatal parsing error occurred: Parsing error: Unexpected keyword 'typeof'.
). This was confusing because the parser is Babel and the Babel config includes the Flow preset, so not quite sure what is up here. I tried giving it a JS filename (filename: 'bar.js'
) in case the TS preset was somehow interfering, but that didn't work.test/rules/namespace.spec.ts
(5 failures)All failing tests are from parser failures (
Parser must expose a 'parse' or 'parseForESLint' method (undefined:undefined)
) that was hard to solve without having the background on why the tests chose their specific combinations of language target and parser.test/rules/named.spec.ts
(1 failure)The test of
eslint-disable-line
can't find thenamed
rule (Definition for rule 'named' was not found
), which I assume is some configuration change in flat config?test/cli.spec.ts
(2 failures)All failing tests are from
TypeError: A dynamic import callback was invoked without --experimental-vm-modules
errors, which might be a change in transpilation (default is module instead of commons now)? I didn't look deeply into to this one.So on the bright it seems like there is one class of problem per file? With some pointers, I'm happy to poke a bit more at the remaining tests but I'm not up for source-diving ESLint and friends quite yet.