Skip to content

npm run lint cannot run: the web client has no eslint.config.js and ESLint 9 requires one #33

Description

@nguyenngothuong

Noted while working on #30.

samples/crm-web/package.json declares:

"lint": "eslint src --max-warnings 0"

with eslint ^9.17.0 and typescript-eslint ^8.18.0 in devDependencies. There is no eslint.config.js, .mjs or .cjs anywhere in the package, and no .eslintrc.* either. On a clean npm ci:

Oops! Something went wrong! :(
ESLint: 9.39.5
ESLint couldn't find an eslint.config.(js|mjs|cjs) file.

So the lint gate has never run against this codebase — which is worth stating plainly, because CONTRIBUTING.md asks contributors for a clean tree and samples/crm-web/Dockerfile notes that the typecheck runs as part of build. The typecheck does; the lint does not, and a contributor reading the script list would reasonably assume otherwise.

Not sending a patch, because the config is a set of decisions rather than a file: which rule sets (typescript-eslint recommended vs strict vs type-checked), whether eslint-plugin-react-hooks — already a dependency — is wired in, and whether the three layering rules stated in samples/crm-web/README.md become lint rules or stay conventions. That last one looks like the interesting part: “a primitive never imports a feature, a contract or a query” is mechanically checkable with no-restricted-imports, and a rule that is checked is a rule that survives.

Happy to send a config once you say which shape you want.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions