peopledoc / eslint-config-peopledoc

ESLint config for PeopleDoc frontend projects
MIT License
1 stars 1 forks source link

Prefer destructuring for ember properties with curly multiline #20

Closed GreatWizard closed 3 years ago

GreatWizard commented 6 years ago

Currently both syntax are correct:

const { Router: EmberRouter } = Ember;
const {
  Router: EmberRouter
} = Ember;

As talk on slack, the second syntax seems to be the most "clearer" to see what is available. I create this issue to see how to configure our own rules to make it possible with eslint to lint correctly.

Useful resources:

xcambar commented 6 years ago

Thanks!

FWIW, there's a minProperties in object-curly-newline that could be useful, see https://eslint.org/docs/rules/object-curly-newline#minproperties

4www commented 6 years ago

For this I also appreciate the { "consistent": true }.

Any updates on wishes for that?

I'd gladly implement whatever solution is decided for.

MrChocolatine commented 3 years ago

After nearly 4 years, looks like we can close this issue.

The rule require-const-for-ember-properties was deleted in the version 2: https://github.com/DockYard/eslint-plugin-ember-suave/compare/v1.0.0...v2.0.0

See also: https://github.com/DockYard/eslint-plugin-ember-suave/pull/70