Skip to content

eslint fails on fresh clone #655

Open
@Clemens-E

Description

@Clemens-E

Hi! nice boilerplate, especially the prettier/eslint rules.
I cloned the project and made no changes to give it a try.
Running pnpm lint shows 38 Problems, most related to cypress, the others related to spec files:

> eslint .


/workspaces/angular-boilerplate/cypress.config.ts
   6:25  error  'on' is defined but never used      @typescript-eslint/no-unused-vars
   6:29  error  'config' is defined but never used  @typescript-eslint/no-unused-vars
  18:1   error  Delete `⏎`                          prettier/prettier

/workspaces/angular-boilerplate/cypress/support/component.d.ts
  0:0  error  Parsing error: ESLint was configured to run on `<tsconfigRootDir>/cypress/support/component.d.ts` using `parserOptions.project`: <tsconfigRootDir>/cypress/tsconfig.json
However, that TSConfig does not include this file. Either:
- Change ESLint's list of included files to not include this file
- Change that TSConfig 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

/workspaces/angular-boilerplate/cypress/support/component.ts
  9:31  error  Unsafe argument of type `any` assigned to a parameter of type `CommandFn<keyof Chainable<any>>`  @typescript-eslint/no-unsafe-argument

/workspaces/angular-boilerplate/src/app/app.component.spec.ts
  14:9  error  Unsafe call of an `any` typed value  @typescript-eslint/no-unsafe-call

/workspaces/angular-boilerplate/src/app/lib/components/footer/footer.component.spec.ts
  23:9  error  Unsafe call of an `any` typed value  @typescript-eslint/no-unsafe-call

/workspaces/angular-boilerplate/src/app/lib/components/layouts/layout-horizontal/layout-horizontal.component.spec.ts
  20:9  error  Unsafe call of an `any` typed value  @typescript-eslint/no-unsafe-call

/workspaces/angular-boilerplate/src/app/lib/components/logo/logo.component.spec.ts
  20:9  error  Unsafe call of an `any` typed value  @typescript-eslint/no-unsafe-call

To ensure this isn't a local issue on my setup, I decided to use a Github Codespace and installed node 18.10.0.
Ran pnpm install, then pnpm build, and pnpm lint, still the same issues showed up.

Is this expected? What is the fix?

Local setup:
Windows 10, node v18.18.2
Github Codespaces:
Ubuntu 22.04.3 LTS, node v18.10.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    reproducedIssue was reproduced

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions