Skip to content

Conversation

jrentlez
Copy link
Contributor

@jrentlez jrentlez commented May 5, 2025

Depends on #656.

This PR upgrades eslint from version 8 to version 9.
This includes migrating to the new "flat config" format.

@jrentlez jrentlez force-pushed the eslint9 branch 3 times, most recently from 5a1a822 to 73e5e2c Compare May 5, 2025 14:02
@jrentlez jrentlez marked this pull request as ready for review May 5, 2025 14:05
@jrentlez jrentlez requested a review from joluj May 5, 2025 14:05
@jrentlez
Copy link
Contributor Author

jrentlez commented May 5, 2025

@joluj I'm having trouble with the reuse check, it reports this error:

reuse._util - ERROR - Could not parse 'AGPL-3.0-only','
reuse.project - ERROR - 'eslint.config.mjs' holds an SPDX expression that cannot be parsed, skipping the file
# MISSING COPYRIGHT AND LICENSING INFORMATION

The following files have no copyright and licensing information:
* eslint.config.mjs

However, eslint.config.mjs has the same identifier as every other file, so I have no idea where this comes from.

@joluj
Copy link
Collaborator

joluj commented May 5, 2025

@georg-schwarz @rhazn Any ideas regarding the licensing information?

@rhazn
Copy link
Contributor

rhazn commented May 5, 2025

Yes, the license checker breaks if the tag is repeated in a file an not in the header. See here for example: https://github.com/jvalue/jayvee/pull/657/files#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2R115 . There is a way around it I've used before in the docs autogeneration, I'll try to look it up.

@rhazn
Copy link
Contributor

rhazn commented May 5, 2025

See here: https://github.com/jvalue/jayvee/blob/main/apps/docs-generator/src/UserDocCategoryBuilder.ts#L54

@jrentlez jrentlez force-pushed the eslint9 branch 5 times, most recently from d1b3c40 to bc8482f Compare May 7, 2025 15:54
@jrentlez
Copy link
Contributor Author

jrentlez commented May 7, 2025

@joluj Another strange CI error (can't even reproduce this one locally):

/home/runner/work/jayvee/jayvee/libs/language-server/eslint.config.mjs
    0:0  error  Parsing error: "parserOptions.project" has been provided for @typescript-eslint/parser.
  The file was not found in any of the provided project(s): libs/language-server/eslint.config.mjs

libs/language-server/eslint.config.mjs is clearly at the expected location.

Copy link
Collaborator

@joluj joluj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MJS files don't seem to be linted properly.

import baseConfig from "../../eslint.config.mjs";

export default defineConfig(baseConfig, [globalIgnores(["!**/*"]), {
languageOptions: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't formatted properly is it? Also, it uses tabs instead of spaces.

Comment on lines +54 to +55
{ plugins: { 'unicorn': unicorn } },
{files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also doesn't seem to be formatted properly

},
...baseConfig,
{
languageOptions: {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabs

import { fixupPluginRules } from "@eslint/compat";

const compat = new FlatCompat({
baseDirectory: dirname(fileURLToPath(import.meta.url)),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tabs

jrentlez added 3 commits May 14, 2025 17:08
This includes replacing a deprecated rule with a new plugin
@jrentlez
Copy link
Contributor Author

Closed in favor of #675

@jrentlez jrentlez closed this Aug 27, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Aug 27, 2025
@jrentlez jrentlez deleted the eslint9 branch August 27, 2025 14:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants