ember/no-duplicate-dependent-keys

November 8, 2022 ยท View on GitHub

๐Ÿ’ผ This rule is enabled in the โœ… recommended config.

๐Ÿ”ง This rule is automatically fixable by the --fix CLI option.

Disallow repeating dependent keys.

Rule Details

This rule makes it easy to spot repeating dependent keys in computed properties.

Examples

Examples of incorrect code for this rule:

computed('foo.bar', 'foo.baz', 'foo.qux', 'foo.bar', function () {
  // ...
});
// or using brace expansions
computed('foo.{bar,baz,qux}', 'foo.bar', function () {
  // ...
});

Examples of correct code for this rule:

computed('foo.bar', 'foo.baz', 'foo.qux', function () {
  // ...
});
// or using brace expansions
computed('foo.{bar,baz,qux}', 'bar.foo', function () {
  // ...
});