sweepline/eslint-plugin-unused-imports

Cannot read property 'get' of undefined

AbdealiLoKo opened this issue · 1 comments

Please follow the general troubleshooting steps first:

I frequently get this error in vscode:

Cannot read property 'get' of undefined Occurred while linting .../myfile.ts:11 Rule: "import/no-unused-modules"

Now I am not sure how to create a reproducible example ...
If I can help in debugging, let me know.

Right now - I got this error when I was trying to create a new file with:

type MarkFunctionPropertyNames<T> = {
    [Key in keyof T]: T[Key] extends Function | Subject<any> ? never : Key;
  }
  type ExcludeFunctionPropertyNames<T extends object> = MarkFunctionPropertyNames<T>[keyof T];
  type ExcludeFunctions<T extends object> = Pick<T, ExcludeFunctionPropertyNames<T>>;
  export type NgChanges<TComponent extends object, TProps = ExcludeFunctions<TComponent>> = {
    [Key in keyof TProps]: {
      previousValue: TProps[Key];
      currentValue: TProps[Key];
      firstChange: boolean;
      isFirstChange(): boolean;
    }
  }

The code from: https://netbasal.com/create-a-typed-version-of-simplechanges-in-angular-451f86593003

This package does not do anything with the rule import/no-unused-modules. Did you mean to report this to https://github.com/import-js/eslint-plugin-import ?