Skip to content

Commit

Permalink
fix(config): normalizeConfig broke
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Mar 27, 2020
1 parent 48c2eea commit 8988541
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/rules/decorator-position.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,9 @@ function positionDecorator(context, node, options) {

function placeDecoratorsBesideProperty(context, node, options) {
for (const decoratorConfig of options.overrides[PREFER_INLINE]) {
if (!decoratorConfig) {
continue;
}
const config = normalizeConfig(decoratorConfig, INTENT.SAME_LINE);
const info = decoratorInfo(node, config);

Expand Down Expand Up @@ -206,6 +209,9 @@ function placeDecoratorsBesideProperty(context, node, options) {

function placeDecoratorsAboveProperty(context, node, options) {
for (const decoratorConfig of options.overrides[ABOVE]) {
if (!decoratorConfig) {
continue;
}
const config = normalizeConfig(decoratorConfig, INTENT.DIFFERENT_LINES);
const info = decoratorInfo(node, config);

Expand Down
5 changes: 5 additions & 0 deletions smoke-tests/ember/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@ export class Foo {
@hasMany('relation', {
someConfig: true,
}) relationship;

@(task(function* () {
// some task
}).drop())
someTask;
}

0 comments on commit 8988541

Please sign in to comment.