Skip to content

Linting is broken in master #7303

@niklas-e

Description

@niklas-e

Noticed npm run lint is broken in master. Root cause is recent eslint upgrade from v8 to v10. New version does no longer support .eslintrc.json or .eslintignore. I'm submitting a PR very soon.

These kind of things happen when not using automated validation pipelines. I'd recommend setting up one. I can submit a PR for it if you'd like.

~/code/phaser$ npm run lint

> phaser@4.1.0 lint
> eslint --config .eslintrc.json "src/**/*.js"

(node:534) 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#ignore-files
(Use `node --trace-warnings ...` to show where the warning was created)

Oops! Something went wrong! :(

ESLint: 10.2.0

TypeError [ERR_IMPORT_ATTRIBUTE_MISSING]: Module "file:///home/niklas/code/phaser/.eslintrc.json?mtime=1778942736943" needs an import attribute of "type: json"
    at validateAttributes (node:internal/modules/esm/assert:88:15)
    at defaultLoadSync (node:internal/modules/esm/load:164:3)
    at #loadAndMaybeBlockOnLoaderThread (node:internal/modules/esm/loader:796:12)
    at #loadSync (node:internal/modules/esm/loader:816:49)
    at ModuleLoader.load (node:internal/modules/esm/loader:781:26)
    at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:526:31)
    at #getOrCreateModuleJobAfterResolve (node:internal/modules/esm/loader:577:36)
    at afterResolve (node:internal/modules/esm/loader:625:52)
    at ModuleLoader.getOrCreateModuleJob (node:internal/modules/esm/loader:631:12)
    at onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:650:32)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions