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

Enforce const usage in module scope only. #12558

Merged
merged 1 commit into from
Nov 5, 2015

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Nov 4, 2015

Good:

const FOO = 'FOO';

Bad:

function derp() {
  const FOO = 'FOO';
}

if (false) {
  const BLAH = 'BLAH';
}

Good:

```js
const FOO = 'FOO';
```

Bad:

```js
function derp() {
  const FOO = 'FOO';
}

if (false) {
  const BLAH = 'BLAH';
}
```
@rwjblue
Copy link
Member Author

rwjblue commented Nov 4, 2015

This is followup from #11874 (comment)

@mixonic
Copy link
Member

mixonic commented Nov 5, 2015

💪 move

mixonic added a commit that referenced this pull request Nov 5, 2015
Enforce const usage in module scope only.
@mixonic mixonic merged commit 341a325 into emberjs:master Nov 5, 2015
@mixonic mixonic deleted the enforce-const-usage branch November 5, 2015 02:02
@dgeb
Copy link
Member

dgeb commented Nov 5, 2015

On behalf of my future self, many thanks for automating this rule 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants