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

Support .cjs file extension when using eslint flat config #26636

Closed
4 tasks
benpsnyder opened this issue Jun 22, 2024 · 0 comments · Fixed by #26637
Closed
4 tasks

Support .cjs file extension when using eslint flat config #26636

benpsnyder opened this issue Jun 22, 2024 · 0 comments · Fixed by #26637
Labels
scope: linter Issues related to Eslint support in Nx type: bug

Comments

@benpsnyder
Copy link
Contributor

Current Behavior

packages/eslint/src/utils/flat-config.ts only supports eslint.config.js

Expected Behavior

packages/eslint/src/utils/flat-config.ts should support eslint.config.js and eslint.config.cjs because when "type": "module" is used in package.json flat config with eslint breaks

I am using bun instead of node and bunx --bun nx run <project>:lint is how I want to execute my linting

GitHub Repo

No response

Steps to Reproduce

Doesn't require.

Nx Report

Node   : 22.2.0
OS     : darwin-arm64
bun    : 1.1.15

nx (global)        : 19.3.0
nx                 : 19.3.1
@nx/js             : 19.3.1
@nx/jest           : 19.3.1
@nx/linter         : 19.3.1
@nx/eslint         : 19.3.1
@nx/workspace      : 19.3.1
@nx/angular        : 19.3.1
@nx/cypress        : 19.3.1
@nx/devkit         : 19.3.1
@nx/esbuild        : 19.3.1
@nx/eslint-plugin  : 19.3.1
@nx/nest           : 19.3.1
@nx/next           : 19.3.1
@nx/node           : 19.3.1
@nx/plugin         : 19.3.1
@nx/react          : 19.3.1
@nrwl/tao          : 19.3.1
@nx/vite           : 19.3.1
@nx/web            : 19.3.1
@nx/webpack        : 19.3.1
typescript         : 5.5.2
---------------------------------------
Registered Plugins:
@nx-dotnet/core
@nx/vite/plugin
@nxlv/python
---------------------------------------
Community plugins:
@analogjs/content             : 1.5.0
@analogjs/platform            : 1.5.0
@analogjs/router              : 1.5.0
@analogjs/trpc                : 0.2.45
@analogjs/vite-plugin-angular : 1.5.0
@compodoc/compodoc            : 1.1.25
@jscutlery/semver             : 5.2.2
@monodon/rust                 : 1.4.0
@ngrx/component-store         : 18.0.0
@ngrx/schematics              : 18.0.0
@ngrx/store                   : 18.0.0
@ngxpert/cmdk                 : 2.0.0
@nx-dotnet/core               : 2.2.0
@nx-tools/nx-container        : 6.0.1
@nx/rspack                    : 19.1.0
@nxlv/python                  : 18.1.0
@storybook/angular            : 8.1.10
@syccure/authorization        : 0.1.0
eslint-plugin-ngrx            : 2.1.4
ngx-toastr                    : 19.0.0

Failure Logs

No response

Package Manager Version

bun 1.1.15

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants