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 on angular buildable libraries #18802

Closed
1 of 4 tasks
llucasshenrique opened this issue Aug 23, 2023 · 2 comments · Fixed by #18837
Closed
1 of 4 tasks

Lint fails on angular buildable libraries #18802

llucasshenrique opened this issue Aug 23, 2023 · 2 comments · Fixed by #18837
Assignees
Labels
outdated scope: angular Issues related to Angular support in Nx type: bug

Comments

@llucasshenrique
Copy link

Current Behavior

Linting a angular buildable library if fails with:

/.../lint-problem/libs/ng-buildable/package.json
 2:9  error  Parsing error: Unexpected token :

Even if is a new library.

Expected Behavior

Linting an newly created library should not fail.

GitHub Repo

https://github.com/llucasshenrique/lint-problem

Steps to Reproduce

1.Create an buildable angular library
2.Run lint as it as target

Nx Report

>  NX  Falling back to ts-node for local typescript execution. This may be a little slower.
  - To fix this, ensure @swc-node/register and @swc/core have been installed

 >  NX   Report complete - copy this into the issue template

   Node   : 18.17.1
   OS     : linux-x64
   pnpm   : 8.6.9
   
   nx (global)        : 16.3.2
   nx                 : 16.7.4
   @nx/js             : 16.7.4
   @nx/jest           : 16.7.4
   @nx/linter         : 16.7.4
   @nx/workspace      : 16.7.4
   @nx/angular        : 16.7.4
   @nx/cypress        : 16.7.4
   @nx/eslint-plugin  : 16.7.4
   @nx/web            : 16.7.4
   nx-cloud           : 16.3.0
   typescript         : 5.1.3

Failure Logs

> nx run ng-buildable:lint


Linting "ng-buildable"...
=============

WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.

You may find that it works just fine, or you may not.

SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.1.0

YOUR TYPESCRIPT VERSION: 5.1.3

Please only submit bug reports when using the officially supported version.

=============

.../lint-problem/libs/ng-buildable/package.json
  2:9  error  Parsing error: Unexpected token :

✖ 1 problem (1 error, 0 warnings)

Lint errors found in the listed files.


 ———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————

 >  NX   Ran target lint for project ng-buildable (3s)
 
    ✖    1/1 failed
    ✔    0/1 succeeded [0 read from cache]

Operating System

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

Additional Information

If fails on new an old buildable libraries, i was migrating old non-buildable libraries to buildable ones and this errors appeared after i've updated the workspace.

@FrozenPandaz FrozenPandaz added the scope: angular Issues related to Angular support in Nx label Aug 23, 2023
@Coly010 Coly010 self-assigned this Aug 25, 2023
@Coly010
Copy link
Contributor

Coly010 commented Aug 25, 2023

Workaround for now is to add:

    {
      "files": ["*.json"],
      "parser": "jsonc-eslint-parser",
      "rules": {}
    },

to the .eslintrc.json at the root of your workspace in the overrides array, and to install jsonc-eslint-parser.

But I'll investigate a better fix

@github-actions
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 Sep 25, 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 type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants