ember-cli / eslint-plugin-ember

An ESLint plugin that provides set of rules for Ember applications based on commonly known good practices.
MIT License
261 stars 202 forks source link

A failing test for no-deprecated-router-transition-methods (multiple classes) #2072

Open CvX opened 8 months ago

CvX commented 8 months ago

This rule incorrectly fails on the following code, where there is more than one Route class in a file:

import Route from '@ember/routing/route';
import { action } from '@ember/object';

export class SettingsRoute extends Route {
  @action
  foo() {
    this.transitionTo('login');
  }
}

export class AnotherRoute extends Route {
  @action
  foo() {
    this.transitionTo('login');
  }
}
CvX commented 8 months ago

Added a test for the same issue in no-implicit-injections