Skip to content

Commit

Permalink
Docs: Fix the messageId example (fixes #9889) (#9892)
Browse files Browse the repository at this point in the history
  • Loading branch information
j-f1 authored and kaicataldo committed Jan 30, 2018
1 parent 9cbb487 commit b8151f8
Show file tree
Hide file tree
Showing 12 changed files with 161 additions and 68 deletions.
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/CHANGE.md
@@ -0,0 +1,25 @@
<!--
ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
This template is for requesting a change that is not a bug fix, rule change, or new rule. If you are here for another reason, please see below:
1. To report a bug: https://eslint.org/docs/developer-guide/contributing/reporting-bugs
2. To request a rule change: https://eslint.org/docs/developer-guide/contributing/rule-changes
3. To propose a new rule: https://eslint.org/docs/developer-guide/contributing/new-rules
4. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint
Note that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue.
-->

**Tell us about your environment**

* **ESLint Version:**
* **Node Version:**
* **npm Version:**

**What did you do?**

**What happened?**

**What did you expect to happen?**

@@ -1,11 +1,12 @@
<!--
ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
This template is for bug reports. If you are reporting a bug, please continue on. If you are here for another reason, please see below:
This template is for bug reports. If you are here for another reason, please see below:
1. To propose a new rule: https://eslint.org/docs/developer-guide/contributing/new-rules
2. To request a change: https://eslint.org/docs/developer-guide/contributing/changes
3. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint
2. To request a rule change: https://eslint.org/docs/developer-guide/contributing/rule-changes
3. To request a change that is not a bug fix, rule change, or new rule: https://eslint.org/docs/developer-guide/contributing/changes
4. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint
Note that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue.
-->
Expand Down
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/NEW_RULE.md
@@ -0,0 +1,30 @@
<!--
ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
This template is for new rule proposals. If you are proposing a new rule, please continue on. If you are here for another reason, please see below:
1. To report a bug: https://eslint.org/docs/developer-guide/contributing/reporting-bugs
2. To request a rule change: https://eslint.org/docs/developer-guide/contributing/rule-changes
3. To request a change that is not a bug fix, rule change, or new rule: https://eslint.org/docs/developer-guide/contributing/changes
4. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint
Note that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue.
-->

**Please describe what the rule should do:**


**What category of rule is this? (place an "X" next to just one item)**

[ ] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)

**Provide 2-3 code examples that this rule will warn about:**

```js
<!-- put your code examples here -->
```

**Why should this rule be included in ESLint (instead of a plugin)?**
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/RULE_CHANGE.md
@@ -0,0 +1,32 @@
<!--
ESLint adheres to the [JS Foundation Code of Conduct](https://js.foundation/community/code-of-conduct).
This template is for requesting a rule change. If you are here for another reason, please see below:
1. To report a bug: https://eslint.org/docs/developer-guide/contributing/reporting-bugs
2. To propose a new rule: https://eslint.org/docs/developer-guide/contributing/new-rules
3. To request a change that is not a bug fix, rule change, or new rule: https://eslint.org/docs/developer-guide/contributing/changes
4. If you have any questions, please stop by our chatroom: https://gitter.im/eslint/eslint
Note that leaving sections blank will make it difficult for us to troubleshoot and we may have to close the issue.
-->

**What rule do you want to change?**


**Does this change cause the rule to produce more or fewer warnings?**


**How will the change be implemented? (New option, new default behavior, etc.)?**


**Please provide some example code that this change will affect:**

```js
<!-- example code here -->
```

**What does the rule currently do for this code?**


**What will the rule do after it's changed?**
2 changes: 1 addition & 1 deletion docs/developer-guide/contributing/changes.md
@@ -1,6 +1,6 @@
# Change Requests

If you'd like to request a change to ESLint, please [create a new issue](https://github.com/eslint/eslint/issues/new?body=**What%20version%20are%20you%20using%3F**%0A%0A**What%20did%20you%20do%3F**%0A%0A**What%20happened%3F**%0A%0A**What%20did%20you%20expect%20to%20happen%3F**%0A%0A) on GitHub. Be sure to include the following information:
If you'd like to request a change to ESLint, please [create a new issue](https://github.com/eslint/eslint/issues/new?template=CHANGE.md) on GitHub. Be sure to include the following information:

1. The version of ESLint you are using.
1. The problem you want to solve.
Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/contributing/new-rules.md
Expand Up @@ -19,7 +19,7 @@ Even though these are the formal criteria for inclusion, each rule is evaluated

## Proposing a Rule

If you want to propose a new rule, [create a pull request](/docs/developer-guide/contributing/pull-requests.md) or new issue and paste the questions from the [rule proposal template](https://github.com/eslint/eslint/blob/master/templates/rule-proposal.md) into the description.
If you want to propose a new rule, [create a pull request](/docs/developer-guide/contributing/pull-requests.md) or new issue and paste the questions from the [rule proposal template](https://github.com/eslint/eslint/issues/new?template=NEW_RULE.md) into the description.

We need all of this information in order to determine whether or not the rule is a good core rule candidate.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/contributing/reporting-bugs.md
@@ -1,6 +1,6 @@
# Reporting Bugs

If you think you've found a bug in ESLint, please [create a new issue](https://github.com/eslint/eslint/issues/new) or a [pull request](/docs/developer-guide/contributing/pull-requests.md) on GitHub. Be sure to copy the questions from the [bug report template](https://github.com/eslint/eslint/blob/master/templates/bug-report.md).
If you think you've found a bug in ESLint, please [create a new issue](https://github.com/eslint/eslint/issues/new) or a [pull request](/docs/developer-guide/contributing/pull-requests.md) on GitHub.

Please include as much detail as possible to help us properly address your issue. If we need to triage issues and constantly ask people for more detail, that's time taken away from actually fixing issues. Help us be as efficient as possible by including a lot of detail in your issues.

Expand Down
2 changes: 1 addition & 1 deletion docs/developer-guide/contributing/rule-changes.md
Expand Up @@ -4,7 +4,7 @@ Occasionally, a core ESLint rule needs to be changed. This is not necessarily a

## Proposing a Rule Change

To propose a change to an existing rule, [create a new issue](https://github.com/eslint/eslint/issues/new) or a [pull request](/docs/developer-guide/contributing/pull-requests.md) on GitHub. Be sure to copy the questions from the [rule change proposal template](https://github.com/eslint/eslint/blob/master/templates/rule-change-proposal.md).
To propose a change to an existing rule, [create a new issue](https://github.com/eslint/eslint/issues/new?template=RULE_CHANGE.md) or a [pull request](/docs/developer-guide/contributing/pull-requests.md) on GitHub. Be sure to copy the questions from the [rule change proposal template](https://github.com/eslint/eslint/blob/master/templates/rule-change-proposal.md).

We need all of this information in order to determine whether or not the change is a good candidate for inclusion.

Expand Down
27 changes: 15 additions & 12 deletions docs/developer-guide/working-with-rules.md
Expand Up @@ -222,23 +222,26 @@ var foo = 2;
// ^ error: Avoid using variables named 'foo'

// In your tests:
var rule = require('../../../lib/rules/no-insecure-random');
var RuleTester = require('eslint').RuleTester;
var rule = require("../../../lib/rules/my-rule");
var RuleTester = require("eslint").RuleTester;

var ruleTester = new RuleTester();
ruleTester.run('my-rule', rule, {
valid: ['bar', 'baz'],
ruleTester.run("my-rule", rule, {
valid: ["bar", "baz"],

invalid: [
{
code: 'foo',
errors: [
invalid: [
{
messageId: 'foo',
code: "foo",
errors: [
{
messageId: "avoidName",
data: {
name: "foo"
}
}
]
}
]
}
]
]
});
{% endraw %}
```
Expand Down
30 changes: 15 additions & 15 deletions templates/bug-report.md
@@ -1,16 +1,16 @@
**Tell us about your environment**

* **ESLint Version:**
* **Node Version:**
* **npm Version:**

**What parser (default, Babel-ESLint, etc.) are you using?**

**Please show your full configuration:**

**What did you do? Please include the actual source code causing the issue.**

**What did you expect to happen?**

**What actually happened? Please include the actual, raw output from ESLint.**
**Tell us about your environment**
* **ESLint Version:**
* **Node Version:**
* **npm Version:**
**What parser (default, Babel-ESLint, etc.) are you using?**
**Please show your full configuration:**
**What did you do? Please include the actual source code causing the issue.**
**What did you expect to happen?**
**What actually happened? Please include the actual, raw output from ESLint.**

37 changes: 19 additions & 18 deletions templates/rule-change-proposal.md
@@ -1,19 +1,20 @@
**What rule do you want to change?**


**Does this change cause the rule to produce more or fewer warnings?**


**How will the change be implemented? (New option, new default behavior, etc.)?**


**Please provide some example code that this change will affect:**

```js
<!-- example code here -->
```

**What does the rule currently do for this code?**


**What rule do you want to change?**
**Does this change cause the rule to produce more or fewer warnings?**
**How will the change be implemented? (New option, new default behavior, etc.)?**
**Please provide some example code that this change will affect:**
```js
<!-- example code here -->
```
**What does the rule currently do for this code?**
**What will the rule do after it's changed?**

33 changes: 17 additions & 16 deletions templates/rule-proposal.md
@@ -1,17 +1,18 @@
**Please describe what the rule should do:**


**What category of rule is this? (place an "X" next to just one item)**

[ ] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)

**Provide 2-3 code examples that this rule will warn about:**

```js
<!-- put your code examples here -->
```

**Please describe what the rule should do:**
**What category of rule is this? (place an "X" next to just one item)**
[ ] Enforces code style
[ ] Warns about a potential error
[ ] Suggests an alternate way of doing something
[ ] Other (please specify:)
**Provide 2-3 code examples that this rule will warn about:**
```js
<!-- put your code examples here -->
```
**Why should this rule be included in ESLint (instead of a plugin)?**

0 comments on commit b8151f8

Please sign in to comment.