Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typo in error message for no-get rule #427

Merged
merged 1 commit into from
May 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/rules/no-get.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Starting in Ember 3.1, native ES5 getters are available, which eliminates much o
This rule disallows:

* `this.get('someProperty')` when `this.someProperty` can be used
* `this.getProperties('prop1', 'prop2')` when `{ this.prop1, this.prop2 }` can be used
* `this.getProperties('prop1', 'prop2')` when `{ prop1: this.prop1, prop2: this.prop2 }` can be used

**WARNING**: there are a number of circumstances where `get` / `getProperties` still need to be used, and you may need to manually disable the rule for these:

Expand Down Expand Up @@ -52,7 +52,7 @@ const { prop1, prop2 } = this;
```

```js
const foo = { this.prop1, this.prop2 };
const foo = { prop1: this.prop1, prop2: this.prop2 };
```

## References
Expand Down
2 changes: 1 addition & 1 deletion lib/rules/no-get.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function makeErrorMessageForGet(property, isImportedGet) {
: `Use \`this.${property}\` instead of \`this.get('${property}')\``;
}

const ERROR_MESSAGE_GET_PROPERTIES = "Use `{ this.prop1, this.prop2, ... }` instead of Ember's `getProperties` function";
const ERROR_MESSAGE_GET_PROPERTIES = "Use `{ prop1: this.prop1, prop2: this.prop2, ... }` instead of Ember's `getProperties` function";

module.exports = {
makeErrorMessageForGet,
Expand Down