Skip to content

Commit

Permalink
Merge branch 'master' into meta.hasSuggestions
Browse files Browse the repository at this point in the history
* master:
  Chore: Adopt `eslint-plugin/require-meta-docs-url` rule internally (eslint#14823)
  Docs: New syntax issue template (eslint#14826)
  Chore: assertions on reporting loc in `unicode-bom` (refs eslint#12334) (eslint#14809)
  Docs: fix multiple broken links (eslint#14833)
  Chore: use `actions/setup-node@v2` (eslint#14816)
  Docs: Update README team and sponsors
  7.31.0
  Build: changelog update for 7.31.0
  Upgrade: @eslint/eslintrc to v0.4.3 (eslint#14808)
  Update: add end location to report in `consistent-return` (refs eslint#12334) (eslint#14798)
  Docs: update BUG_REPORT template (eslint#14787)
  Docs: provide more context to no-eq-null (eslint#14801)
  • Loading branch information
bmish committed Jul 27, 2021
2 parents 0fa4fed + 8be8a36 commit b76612b
Show file tree
Hide file tree
Showing 17 changed files with 213 additions and 265 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Expand Up @@ -88,7 +88,7 @@ module.exports = {
files: ["lib/rules/*"],
excludedFiles: ["index.js"],
rules: {
"internal-rules/consistent-docs-url": "error"
"eslint-plugin/require-meta-docs-url": ["error", { pattern: "https://eslint.org/docs/rules/{{name}}" }]
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md
Expand Up @@ -72,7 +72,7 @@ assignees: ''
<!-- Please tell us exactly how to see the issue you're describing -->

1.
1.
1.
2.
3.

**Are you willing to submit a pull request to fix this bug?**
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/NEW_SYNTAX.md
@@ -0,0 +1,43 @@
---
name: "\U0001F4DD Request new syntax support"
about: Request new stage 4 syntax be supported.
title: ''
labels:
- core
- new syntax
assignees: ''

---

<!--
ESLint adheres to the Open JS Foundation Code of Conduct:
https://eslint.org/conduct
-->

**What is the name of the syntax to implement?**

<!-- for example, "class fields" -->

**Please provide the TC39 URL for the syntax proposal:**



**Please provide some example code for the new syntax:**

```js
// example code here
```

## Implementation Checklist

Please check off all items that have already been completed. Be sure to paste the pull request URLs next to each item so we can verify the work as done.

- [ ] Ecma262 update: <!-- paste PR URL for this syntax here -->
- [ ] ESTree update: <!-- paste PR URL for this ESTree update here -->
- [ ] Acorn update: <!-- paste PR URL for this syntax here -->
- [ ] `eslint-visitor-keys` update: <!-- paste PR URL for this syntax here -->
- [ ] `espree` update: <!-- paste PR URL for this syntax here -->
- [ ] `eslint-scope` update: <!-- paste PR URL for this syntax here -->
- [ ] `eslint` update: <!-- paste PR URL for this syntax here -->

**Are you willing to submit a pull request to implement this syntax?**
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
- name: Install Packages
run: npm install
- name: Lint Files
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Packages
Expand All @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/setup-node@v2
with:
node-version: '12'
- name: Install Packages
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,16 @@
v7.31.0 - July 17, 2021

* [`efdbb12`](https://github.com/eslint/eslint/commit/efdbb1227019427ec2d968a8d6e9151dd8a77c35) Upgrade: @eslint/eslintrc to v0.4.3 (#14808) (Brandon Mills)
* [`a96b05f`](https://github.com/eslint/eslint/commit/a96b05f6c5649cfee112d605c91d95aa191e2f78) Update: add end location to report in `consistent-return` (refs #12334) (#14798) (Nitin Kumar)
* [`e0e8e30`](https://github.com/eslint/eslint/commit/e0e8e308929c9c66612505f2da89043f8592eea7) Docs: update BUG_REPORT template (#14787) (Nitin Kumar)
* [`39115c8`](https://github.com/eslint/eslint/commit/39115c8b71d2629161359f6456f47fdbd552fddd) Docs: provide more context to no-eq-null (#14801) (gfyoung)
* [`9a3c73c`](https://github.com/eslint/eslint/commit/9a3c73c130d437a65f4edba0dcb63390e68cac41) Docs: fix a broken link (#14790) (Sam Chen)
* [`ddffa8a`](https://github.com/eslint/eslint/commit/ddffa8ad58b4b124b08061e9045fdb5370cbdbe3) Update: Indicating the operator in question (#14764) (Paul Smith)
* [`bba714c`](https://github.com/eslint/eslint/commit/bba714c2ed813821ed288fbc07722cdde6e534fe) Update: Clarifying what changes need to be made in no-mixed-operators (#14765) (Paul Smith)
* [`b0d22e3`](https://github.com/eslint/eslint/commit/b0d22e3eff18ea7f08189134c07cddceaec69a09) Docs: Mention benefit of providing `meta.docs.url` (#14774) (Bryan Mishkin)
* [`000cc79`](https://github.com/eslint/eslint/commit/000cc796fd487e7b9ba8bcc5857dd691044479cc) Sponsors: Sync README with website (ESLint Jenkins)
* [`a6a7438`](https://github.com/eslint/eslint/commit/a6a7438502abc6a1e29ec35cfbe2058ffc0803b1) Chore: pin fs-teardown@0.1.1 (#14771) (Milos Djermanovic)

v7.30.0 - July 2, 2021

* [`5f74642`](https://github.com/eslint/eslint/commit/5f746420700d457b92dd86659de588d272937b79) Chore: don't check Program.start in SourceCode#getComments (refs #14744) (#14748) (Milos Djermanovic)
Expand Down
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -254,6 +254,16 @@ Toru Nagashima
The people who review and fix bugs and help triage issues.

<table><tbody><tr><td align="center" valign="top" width="11%">
<a href="https://github.com/brettz9">
<img src="https://github.com/brettz9.png?s=75" width="75" height="75"><br />
Brett Zamir
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/bmish">
<img src="https://github.com/bmish.png?s=75" width="75" height="75"><br />
Bryan Mishkin
</a>
</td><td align="center" valign="top" width="11%">
<a href="https://github.com/g-plane">
<img src="https://github.com/g-plane.png?s=75" width="75" height="75"><br />
Pig Fang
Expand Down
8 changes: 8 additions & 0 deletions docs/rules/no-eq-null.md
Expand Up @@ -39,3 +39,11 @@ while (qux !== null) {
baz();
}
```

## Compatibility

* **JSHint**: This rule corresponds to `eqnull` rule of JSHint.

## When Not To Use It

If you want to enforce type-checking operations in general, use the more powerful [eqeqeq](./eqeqeq) instead.
2 changes: 1 addition & 1 deletion docs/rules/space-after-keywords.md
Expand Up @@ -2,7 +2,7 @@

(removed) This rule was **removed** in ESLint v2.0 and replaced by the [keyword-spacing](keyword-spacing.md) rule.

(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fix) automatically fixed problems reported by this rule.
(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#--fix) automatically fixed problems reported by this rule.

Some style guides will require or disallow spaces following the certain keywords.

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/space-before-keywords.md
Expand Up @@ -2,7 +2,7 @@

(removed) This rule was **removed** in ESLint v2.0 and **replaced** by the [keyword-spacing](keyword-spacing.md) rule.

(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fix) automatically fixed problems reported by this rule.
(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#--fix) automatically fixed problems reported by this rule.

Keywords are syntax elements of JavaScript, such as `function` and `if`. These identifiers have special meaning to the language and so often appear in a different color in code editors. As an important part of the language, style guides often refer to the spacing that should be used around keywords. For example, you might have a style guide that says keywords should be always be preceded by spaces, which would mean `if-else` statements must look like this:

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/space-return-throw-case.md
Expand Up @@ -2,7 +2,7 @@

(removed) This rule was **removed** in ESLint v2.0 and **replaced** by the [keyword-spacing](keyword-spacing.md) rule.

(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#fix) automatically fixed problems reported by this rule.
(fixable) The `--fix` option on the [command line](../user-guide/command-line-interface#--fix) automatically fixed problems reported by this rule.

Require spaces following `return`, `throw`, and `case`.

Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/configuring/configuration-files.md
Expand Up @@ -297,7 +297,7 @@ The `extends` property value can be `"eslint:all"` to enable all core rules in t

You might enable all core rules as a shortcut to explore rules and options while you decide on the configuration for a project, especially if you rarely override options or disable rules. The default options for rules are not endorsements by ESLint (for example, the default option for the [`quotes`](https://eslint.org/docs/rules/quotes) rule does not mean double quotes are better than single quotes).

If your configuration extends `eslint:all`, after you upgrade to a newer major or minor version of ESLint, review the reported problems before you use the `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix), so you know if a new fixable rule will make changes to the code.
If your configuration extends `eslint:all`, after you upgrade to a newer major or minor version of ESLint, review the reported problems before you use the `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#--fix), so you know if a new fixable rule will make changes to the code.

Example of a configuration file in JavaScript format:

Expand Down
6 changes: 3 additions & 3 deletions lib/rules/consistent-return.js
Expand Up @@ -104,18 +104,18 @@ module.exports = {
} else if (node.type === "ArrowFunctionExpression") {

// `=>` token
loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc.start;
loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc;
} else if (
node.parent.type === "MethodDefinition" ||
(node.parent.type === "Property" && node.parent.method)
) {

// Method name.
loc = node.parent.key.loc.start;
loc = node.parent.key.loc;
} else {

// Function name or `function` keyword.
loc = (node.id || node).loc.start;
loc = (node.id || context.getSourceCode().getFirstToken(node)).loc;
}

if (!name) {
Expand Down
6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "eslint",
"version": "7.30.0",
"version": "7.31.0",
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
"description": "An AST-based pattern checker for JavaScript.",
"bin": {
Expand Down Expand Up @@ -44,7 +44,7 @@
"bugs": "https://github.com/eslint/eslint/issues/",
"dependencies": {
"@babel/code-frame": "7.12.11",
"@eslint/eslintrc": "^0.4.2",
"@eslint/eslintrc": "^0.4.3",
"@humanwhocodes/config-array": "^0.5.0",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
Expand Down Expand Up @@ -96,7 +96,7 @@
"ejs": "^3.0.2",
"eslint": "file:.",
"eslint-config-eslint": "file:packages/eslint-config-eslint",
"eslint-plugin-eslint-plugin": "^3.2.0",
"eslint-plugin-eslint-plugin": "^3.4.0",
"eslint-plugin-internal-rules": "file:tools/internal-rules",
"eslint-plugin-jsdoc": "^25.4.3",
"eslint-plugin-node": "^11.1.0",
Expand Down

0 comments on commit b76612b

Please sign in to comment.