nuxt-modules / eslint

ESLint module for Nuxt.js
MIT License
160 stars 15 forks source link

Monorepo Setup Issues #58

Closed duckies closed 3 years ago

duckies commented 3 years ago

I'm working in a monorepo where I am importing files from the server for TypeScript purposes on the client side. I am uncertain where the issue lies, but when running ESLint locally it finds issues normally:

> npm run lint
7:1  error  `vue` import should occur before import of `../../../server/src/user.example`  import/order

However, this module's ESLint is linting imported server code and libraries in node_modules.

 ERROR  ERROR in ../server/src/user.example.ts:2:3                                   22:38:23
TS2564: Property 'id' has no initializer and is not definitely assigned in the constructor.
    1 | export class User {
  > 2 |   id: number;
      |   ^^
    3 | }
    4 |

I have spent a couple of days now trying to diagnose the issue but don't know how to debug ESLint being ran programmatically. I have a minimal reproduction repo nuxt-monorepo-eslint.