TypeScript CI trouble

I tried to submit a PR for fixing an issue. But I can’t get the CI to pass. Locally I ran into problems with eslint, too…

I’m not sure if it is related to my setup. Basically I started with a GitHub file edit and a PR created from that. Then CI complained about unsynced package.json in the exercise. So I cloned my fork to my machine and ran yarn install and yarn sync. This indeed synced package.json (for like 100+ exercises).

After commiting CI complained about Invalid option '--ext' - perhaps you meant '-c'? during lint step. I figured out how to lint locally and got that same message. Removing --ext from scripts/lint.mjs removes the message and now eslint complains about:

(node:8016) ESLintIgnoreWarning: The ".eslintignore" file is no longer supported. Switch to using the "ignores" property in "eslint.config.js": https://eslint.org/docs/latest/use/configure/migration-guide#ignoring-files
(Use `node --trace-warnings ...` to show where the warning was created)

Oops! Something went wrong! :(

ESLint: 9.1.1

A config object is using the "parser" key, which is not supported in flat config system.

Flat config uses "languageOptions.parser" to override the default parser.

Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers
[Failure] Lint check failed!

I have no idea what I’m doing wrong or if this is a new issue hitting everyone. Can anyone help?

You’re not doing anything wrong. @ErikSchierboom merged Bump eslint from 8.42.0 to 9.1.1 in /common by dependabot[bot] · Pull Request #1458 · exercism/typescript · GitHub but that forced a new version of ESLint which apparently no longer supports .eslintignore

See: Migrate to v9.x - ESLint - Pluggable JavaScript Linter

I don’t think I can successfully fix all things within that PR. I have moved the .eslintignore into .eslintrc.cjs for the exercise and also did that for the global .eslintignore. And some more, see PR.

@exercism/typescript-track@workspace:. provides eslint (pe0edb) with version 9.1.1, which doesn't satisfy what @exercism/eslint-config-typescript and some of its descendants request

suggests, that changes are required to @exercism/eslint-config-typescript to support eslint 9 on the track. Locally I get:

Oops! Something went wrong! :(

ESLint: 9.1.1

A config object is using the "parser" key, which is not supported in flat config system.

Flat config uses "languageOptions.parser" to override the default parser.

Please see the following page for information on how to convert your config object into the correct format:
https://eslint.org/docs/latest/use/configure/migration-guide#custom-parsers
[Failure] Lint check failed!

but CI seems to have another problem:

Oops! Something went wrong! :(

ESLint: 9.1.1

You are linting "tmp_exercises", but all of the files matching the glob pattern "tmp_exercises" are ignored.

If you don't want to lint these files, remove the pattern "tmp_exercises" from the list of arguments passed to ESLint.

If you do want to lint these files, try the following solutions:

* Check your .eslintignore file, or the eslintIgnore property in package.json, to ensure that the files are not configured to be ignored.
* Explicitly list the files from this glob that you'd like to lint on the command-line, rather than providing a glob as an argument.

[Failure] Lint check failed!

I don’t get it…

1 Like

Sorry about the merge. That was a mistake in a bulk merge pr script I ran.

1 Like

The underlying issue is us upgrading @exercism/eslint-config-typescript to ESLint 9.

I think the tmp_exercises issue is a red herring, caused by the config not being flattened correctly for it to be used/read/etc.

Are you trying to solve this @mk-mxp or should I put it on my list?

This is yours, thanks!

1 Like