You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the migration generator moves the parserOptions property value from the old configuration file next to the files and rules properties within the new eslint.config.js file.
The current state produces following linting error:
WrapperError: Key "parserOptions": This appears to be in eslintrc format rather than flat config format.
...
messageTemplate: 'eslintrc-incompat',
messageData: { key: 'parserOptions' },
[cause]: IncompatibleKeyError: This appears to be in eslintrc format rather than flat config format.
...
messageTemplate: 'eslintrc-incompat',
messageData: { key: 'parserOptions' }
}
}
Expected Behavior
The flat configuration model has changed so that it expects the parserOptions property under the top-level languageOptions property as stated in the official docs.
In your Nx repository which is using the old way of Eslint configuration (e.g. .eslintrc.json) specify the parserOptions property and run the following migration generator nx g @nx/eslint:convert-to-flat-config
got languageSettings, which is not exist in eslint schema. But when I manually correct to languageOptions in main eslint.config.js, I got message that:
Error: You have attempted to use the lint rule @typescript-eslint/prefer-optional-chain which requires the full TypeScript type-checker to be available, but you do not have `parserOptions.project` configured to point at your project tsconfig.json files in the relevant TypeScript file "overrides" block of your project ESLint config /Users/iam/org-folder/project-folder/libs/app-layout/eslint.config.js
Please see https://nx.dev/guides/eslint for full guidance on how to resolve this issue.
Looks like global override in main eslint.config.js for languageOptions not working.
Current Behavior
Currently, the migration generator moves the
parserOptions
property value from the old configuration file next to thefiles
andrules
properties within the neweslint.config.js
file.Before
The
.eslintrc.json
file before the migration:After (wrong)
The
eslint.config.json
file after the migration:The current state produces following linting error:
Expected Behavior
The flat configuration model has changed so that it expects the
parserOptions
property under the top-levellanguageOptions
property as stated in the official docs.Before
The
.eslintrc.json
file before the migration:After (correct)
The
eslint.config.json
file after the migration:GitHub Repo
No response
Steps to Reproduce
.eslintrc.json
) specify theparserOptions
property and run the following migration generatornx g @nx/eslint:convert-to-flat-config
Nx Report
Failure Logs
No response
Package Manager Version
No response
Operating System
Additional Information
No response
The text was updated successfully, but these errors were encountered: