Open YonatanKra opened 1 month ago
What does your ESLint config look like? Do you have the @typescript-eslint
plugin declared more than once like the error shows?
I experience this issue as well because I have another dependency that references the typescript-eslint plugin
. This looks like an issue with the new flat configuration style as noted here: https://github.com/eslint/eslintrc/issues/135
I'm not sure there's much NX can do until there's some kind of registry paradigm for eslint plugins.
It's a brand new Nx project. Changed nothing. My config looks like this:
const { FlatCompat } = require('@eslint/eslintrc');
const js = require('@eslint/js');
const baseConfig = require('../../eslint.config.js');
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
});
module.exports = [
...baseConfig,
{
files: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.vue'],
// Override or add rules here
rules: {},
},
...compat.extends('@nuxt/eslint-config'),
{
files: ['**/*.vue'],
languageOptions: {
parserOptions: { parser: require('@typescript-eslint/parser') },
},
},
{ ignores: ['.nuxt/**', '.output/**', 'node_modules'] },
];
Even if I delete
languageOptions: {
parserOptions: { parser: require('@typescript-eslint/parser') },
},
Which is the only mention of eslint
in the project, I get the error because it stems from @nx/eslint/plugin
which I have no control over.
Any way to bypass this without turning off linting?
@jaysoo @drwpow
This happens for me with a fresh nuxt
app install. I did nothing - just installed a new Nx project and ran pnpm start
.
Is there any workaround?
Current Behavior
I'm getting an error for every Nx command. Even a simple
nx run myApp:test
fails.Running with Verbose gives me the following error:
Expected Behavior
I expect it to run the tests
GitHub Repo
No response
Steps to Reproduce
Nx Report
Node : 20.3.0 OS : darwin-x64 Native Target : x86_64-macos pnpm : 8.6.12
nx (global) : 20.0.0 nx : 20.0.0 @nx/js : 20.0.0 @nx/jest : 20.0.0 @nx/eslint : 20.0.0 @nx/workspace : 20.0.0 @nx/devkit : 20.0.0 @nx/esbuild : 20.0.0 @nx/eslint-plugin : 20.0.0 @nx/node : 20.0.0 @nx/nuxt : 20.0.0 @nx/playwright : 20.0.0 @nx/vite : 20.0.0 @nx/web : 20.0.0 typescript : 5.5.2
Registered Plugins: @nx/eslint/plugin @nx/jest/plugin @nx/vite/plugin @nx/nuxt/plugin @nx/playwright/plugin
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response