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

lint fails for newly generated angular remote application #20150

Closed
1 of 4 tasks
Paul-Streambranch opened this issue Nov 9, 2023 · 1 comment · Fixed by #20210
Closed
1 of 4 tasks

lint fails for newly generated angular remote application #20150

Paul-Streambranch opened this issue Nov 9, 2023 · 1 comment · Fixed by #20210
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx scope: module federation Issues related to module federation support type: bug

Comments

@Paul-Streambranch
Copy link

Current Behavior

Newly generated remote using npx nx generate @nx/angular:remote --name=newremote --directory=apps/newremote --projectNameAndRootFormat=as-provided --setParserOptionsProject=true --no-interactive will fail npx nx lint newremote since eslint configuration with parserOptions is not configured to handle the .ts files coming from the module-federation config.

/Users/username/Documents/workspace/apps/newremote/webpack.prod.config.ts
  0:0  error  Parsing error: ESLint was configured to run on `<tsconfigRootDir>/apps/newremote/webpack.prod.config.ts` using `parserOptions.project`: 
- /users/username/documents/workspace/apps/newremote/tsconfig.app.json
- /users/username/documents/workspace/apps/newremote/tsconfig.editor.json
However, none of those TSConfigs include this file. Either:
- Change ESLint's list of included files to not include this file
- Change one of those TSConfigs to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file

Expected Behavior

Newly generated remote using npx nx generate @nx/angular:remote --name=newremote --directory=apps/newremote --projectNameAndRootFormat=as-provided --setParserOptionsProject=true --no-interactive should successfully run npx nx lint newremote.

GitHub Repo

No response

Steps to Reproduce

  1. npx nx generate @nx/angular:remote --name=newremote --directory=apps/newremote --projectNameAndRootFormat=as-provided --setParserOptionsProject=true --no-interactive
  2. npx nx lint newremote

Nx Report

Node   : 18.15.0
   OS     : darwin-arm64
   npm    : 9.5.0
   
   nx                 : 17.0.2
   @nx/js             : 17.0.2
   @nx/jest           : 17.0.2
   @nx/linter         : 17.0.2
   @nx/eslint         : 17.0.2
   @nx/workspace      : 17.0.2
   @nx/angular        : 17.0.2
   @nx/cypress        : 17.0.2
   @nx/devkit         : 17.0.2
   @nx/eslint-plugin  : 17.0.2
   @nx/plugin         : 17.0.2
   @nrwl/tao          : 17.0.2
   @nx/vite           : 17.0.2
   @nx/web            : 17.0.2
   @nx/webpack        : 17.0.2
   typescript         : 5.1.6
   ---------------------------------------

Failure Logs

/Users/username/Documents/workspace/apps/newremote/webpack.prod.config.ts
  0:0  error  Parsing error: ESLint was configured to run on `<tsconfigRootDir>/apps/newremote/webpack.prod.config.ts` using `parserOptions.project`: 
- /users/username/documents/workspace/apps/newremote/tsconfig.app.json
- /users/username/documents/workspace/apps/newremote/tsconfig.editor.json
However, none of those TSConfigs include this file. Either:
- Change ESLint's list of included files to not include this file
- Change one of those TSConfigs to include this file
- Create a new TSConfig that includes this file and include it in your parserOptions.project
See the typescript-eslint docs for more info: https://typescript-eslint.io/linting/troubleshooting#i-get-errors-telling-me-eslint-was-configured-to-run--however-that-tsconfig-does-not--none-of-those-tsconfigs-include-this-file

Package Manager Version

No response

Operating System

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

Additional Information

I guess the fix should be to include the .ts files coming from module federation in the tsconfig. But I let you decide what is best.

Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: angular Issues related to Angular support in Nx scope: module federation Issues related to module federation support type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants