lukastaegert/eslint-plugin-tree-shaking

Feature Request: Lax mode

wSedlacek opened this issue · 1 comments

Right now this plugin seems a little too aggressive for my needs.

Let's look at this small example.

Screen Shot 2021-03-04 at 7 58 03 PM

I am using RxJS that from my understanding is pretty good about tree shaking, and even if they aren't there isn't much I can do from my project to fix their problems and I would rather not have to add a bunch of eslint-disable everywhere.

So I am looking for options that will assume that other modules do not have any side effects.
I just want to make sure that the current module doesn't create any new side effects.

I also might be ignorant of this but does this

export class DeckService {
  private readonly internalDecks$ = new BehaviorSubject<Deck[]>([]);
  public readonly decks$: Observable<Deck[]>;

  constructor() {
    this.decks$ = this.internalDecks$.asObservable();
  }
}

Really differ from this?

export class DeckService {
  private readonly internalDecks$ = new BehaviorSubject<Deck[]>([]);
  public readonly decks$ = this.internalDecks$.asObservable();
}

Or is this just a false positive?

Duplicate of #73