Skip to content
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 the linter #827

Open
jlwllmr opened this issue Nov 12, 2024 · 0 comments · May be fixed by #828
Open

Fix the linter #827

jlwllmr opened this issue Nov 12, 2024 · 0 comments · May be fixed by #828
Assignees
Labels
bug Something isn't working

Comments

@jlwllmr
Copy link
Collaborator

jlwllmr commented Nov 12, 2024

Describe the bug

The linter currently won't run on any PR:

ESLint: 8.57.1

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/compat' imported from /Users/Work/Documents/GitHub/doc.linea/eslint.config.mjs
    at packageResolve (node:internal/modules/esm/resolve:844:9)
    at moduleResolve (node:internal/modules/esm/resolve:901:20)
    at defaultResolve (node:internal/modules/esm/resolve:1131:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:390:12)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:359:25)
    at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:234:38)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:85:39)
    at link (node:internal/modules/esm/module_job:84:36)

@eslint/compat was installed as part of the changes in #708, where we moved to the new ES module formatting for the linter config files. This format is required for eslint 9.x.x, but the plugins that we use with eslint are not compatible with eslint 9.x.x, so we still have it at 8.57.x.

As far as I can see, we need to either:

  1. Gradually remove the eslint plugins and see if it the linter still works (side quest: identify precisely what each of them actually offers)
  2. Revert back to the CommonJS config format and stay at eslint 8.56.x/8.57.x

Steps to reproduce

npm run lint

Expected behavior

Linter should run.

Link(s)

No response

@jlwllmr jlwllmr added the bug Something isn't working label Nov 12, 2024
@jlwllmr jlwllmr self-assigned this Nov 12, 2024
@jlwllmr jlwllmr changed the title Fix the spelling linter Fix the linter Nov 12, 2024
@jlwllmr jlwllmr linked a pull request Nov 12, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant