Skip to content
This repository has been archived by the owner on Jul 14, 2023. It is now read-only.

Commit

Permalink
Autogenerated new docs and demo at Sat Jul 08 2017 21:57:15
Browse files Browse the repository at this point in the history
  • Loading branch information
ESLint Jenkins committed Jul 9, 2017
1 parent 427d07d commit 17b3ab0
Show file tree
Hide file tree
Showing 15 changed files with 62,333 additions and 111,012 deletions.
4 changes: 4 additions & 0 deletions _data/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ categories:
fixable: false
name: for-direction
recommended: false
- description: enforce `return` statements in getters
fixable: false
name: getter-return
recommended: false
- description: disallow `await` inside of loops
fixable: false
name: no-await-in-loop
Expand Down
93 changes: 93 additions & 0 deletions _posts/2017-07-08-eslint-v4.2.0-released.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
---
layout: post
title: ESLint v4.2.0 released
tags:
- release
- minor
---
# ESLint v4.2.0 released

We just pushed ESLint v4.2.0, which is a minor release upgrade of ESLint. This release adds some new features and fixes several bugs found in the previous release.






## Features


* [c693be5](https://github.com/eslint/eslint/commit/c693be5) New: Allow passing a function as `fix` option (fixes [#8039](https://github.com/eslint/eslint/issues/8039)) ([#8730](https://github.com/eslint/eslint/issues/8730)) (Ian VanSchooten)
* [8698a92](https://github.com/eslint/eslint/commit/8698a92) New: [getter-return](/docs/rules/getter-return) rule (fixes [#8449](https://github.com/eslint/eslint/issues/8449)) ([#8460](https://github.com/eslint/eslint/issues/8460)) (薛定谔的猫)




## Enhancements


* [e0f0101](https://github.com/eslint/eslint/commit/e0f0101) Update: fix indentation of nested function parameters (fixes [#8892](https://github.com/eslint/eslint/issues/8892)) ([#8900](https://github.com/eslint/eslint/issues/8900)) (Teddy Katz)
* [975dacf](https://github.com/eslint/eslint/commit/975dacf) Update: fix indentation of EmptyStatements (fixes [#8882](https://github.com/eslint/eslint/issues/8882)) ([#8885](https://github.com/eslint/eslint/issues/8885)) (Teddy Katz)
* [3767cda](https://github.com/eslint/eslint/commit/3767cda) Update: add [no-sync](/docs/rules/no-sync) option to allow at root level (fixes [#7985](https://github.com/eslint/eslint/issues/7985)) ([#8859](https://github.com/eslint/eslint/issues/8859)) (Victor Hom)
* [1f5bfc2](https://github.com/eslint/eslint/commit/1f5bfc2) Update: Add always-multiline option to [multiline-ternary](/docs/rules/multiline-ternary) (fixes [#8770](https://github.com/eslint/eslint/issues/8770)) ([#8841](https://github.com/eslint/eslint/issues/8841)) (Nathan Woltman)
* [676af9e](https://github.com/eslint/eslint/commit/676af9e) Update: fix indentation of JSXExpressionContainer contents (fixes [#8832](https://github.com/eslint/eslint/issues/8832)) ([#8850](https://github.com/eslint/eslint/issues/8850)) (Teddy Katz)
* [85c9327](https://github.com/eslint/eslint/commit/85c9327) Update: fix parenthesized CallExpression indentation (fixes [#8790](https://github.com/eslint/eslint/issues/8790)) ([#8802](https://github.com/eslint/eslint/issues/8802)) (Teddy Katz)
* [be8d354](https://github.com/eslint/eslint/commit/be8d354) Update: simplify variable declarator [indent](/docs/rules/indent) handling (fixes [#8785](https://github.com/eslint/eslint/issues/8785)) ([#8801](https://github.com/eslint/eslint/issues/8801)) (Teddy Katz)




## Bug Fixes


* [11ffe6b](https://github.com/eslint/eslint/commit/11ffe6b) Fix: [no-regex-spaces](/docs/rules/no-regex-spaces) rule incorrectly fixes quantified spaces ([#8773](https://github.com/eslint/eslint/issues/8773)) (Keri Warr)
* [931a9f1](https://github.com/eslint/eslint/commit/931a9f1) Fix: [indent](/docs/rules/indent) false positive with multi-line await expression ([#8837](https://github.com/eslint/eslint/issues/8837)) (薛定谔的猫)
* [f00854e](https://github.com/eslint/eslint/commit/f00854e) Fix: --quiet no longer fixes warnings (fixes [#8675](https://github.com/eslint/eslint/issues/8675)) ([#8858](https://github.com/eslint/eslint/issues/8858)) (Kevin Partington)
* [22116f2](https://github.com/eslint/eslint/commit/22116f2) Fix: correct [comma-dangle](/docs/rules/comma-dangle) JSON schema ([#8864](https://github.com/eslint/eslint/issues/8864)) (Evgeny Poberezkin)
* [5c3ac8e](https://github.com/eslint/eslint/commit/5c3ac8e) Fix: [arrow-parens](/docs/rules/arrow-parens) fixer gets tripped up with trailing comma in args ([#8838](https://github.com/eslint/eslint/issues/8838)) (薛定谔的猫)
* [9417818](https://github.com/eslint/eslint/commit/9417818) Fix: [no-debugger](/docs/rules/no-debugger) autofixer produced invalid syntax ([#8806](https://github.com/eslint/eslint/issues/8806)) (Teddy Katz)
* [eac06f2](https://github.com/eslint/eslint/commit/eac06f2) Fix: [no-extra-parens](/docs/rules/no-extra-parens) false positives for variables called "let" ([#8808](https://github.com/eslint/eslint/issues/8808)) (Teddy Katz)
* [616587f](https://github.com/eslint/eslint/commit/616587f) Fix: [dot-notation](/docs/rules/dot-notation) autofix produces syntax errors for object called "let" ([#8807](https://github.com/eslint/eslint/issues/8807)) (Teddy Katz)
* [a53ef7e](https://github.com/eslint/eslint/commit/a53ef7e) Fix: don't require a third argument in linter.verifyAndFix (fixes [#8805](https://github.com/eslint/eslint/issues/8805)) ([#8809](https://github.com/eslint/eslint/issues/8809)) (Teddy Katz)




## Documentation


* [7c8de92](https://github.com/eslint/eslint/commit/7c8de92) Docs: Clarified PR guidelines in maintainer guide ([#8876](https://github.com/eslint/eslint/issues/8876)) (Kevin Partington)
* [d1fc408](https://github.com/eslint/eslint/commit/d1fc408) Docs: Update CLA link in Contributing docs ([#8883](https://github.com/eslint/eslint/issues/8883)) (Calvin Freitas)
* [1ce553d](https://github.com/eslint/eslint/commit/1ce553d) Docs: Fix wording of minProperties in [object-curly-newline](/docs/rules/object-curly-newline) (fixes [#8874](https://github.com/eslint/eslint/issues/8874)) ([#8878](https://github.com/eslint/eslint/issues/8878)) (solmsted)
* [8796d55](https://github.com/eslint/eslint/commit/8796d55) Docs: add missing item to 4.0 migration guide table of contents ([#8835](https://github.com/eslint/eslint/issues/8835)) (薛定谔的猫)
* [ce969f9](https://github.com/eslint/eslint/commit/ce969f9) Docs: add guidelines for patch release communication (fixes [#7277](https://github.com/eslint/eslint/issues/7277)) ([#8823](https://github.com/eslint/eslint/issues/8823)) (Teddy Katz)
* [5c83c99](https://github.com/eslint/eslint/commit/5c83c99) Docs: Clarify arrow function parens in [no-extra-parens](/docs/rules/no-extra-parens) (fixes [#8741](https://github.com/eslint/eslint/issues/8741)) ([#8822](https://github.com/eslint/eslint/issues/8822)) (Kevin Partington)
* [84d921d](https://github.com/eslint/eslint/commit/84d921d) Docs: Added note about Node/CJS scoping to [no-redeclare](/docs/rules/no-redeclare) (fixes [#8814](https://github.com/eslint/eslint/issues/8814)) ([#8820](https://github.com/eslint/eslint/issues/8820)) (Kevin Partington)
* [5ad8b70](https://github.com/eslint/eslint/commit/5ad8b70) Docs: add minor formatting improvement to paragraph about parsers ([#8816](https://github.com/eslint/eslint/issues/8816)) (Teddy Katz)






## Build Related


* [88ed041](https://github.com/eslint/eslint/commit/88ed041) Build: Turnoff CI branch build (fixes [#8804](https://github.com/eslint/eslint/issues/8804)) ([#8873](https://github.com/eslint/eslint/issues/8873)) (Gyandeep Singh)
* [c4f2e29](https://github.com/eslint/eslint/commit/c4f2e29) Build: fix race condition in demo ([#8827](https://github.com/eslint/eslint/issues/8827)) (Teddy Katz)




## Chores


* [9f95a3e](https://github.com/eslint/eslint/commit/9f95a3e) Chore: remove unused helper method from [`indent`](/docs/rules/indent) ([#8901](https://github.com/eslint/eslint/issues/8901)) (Teddy Katz)
* [72f22eb](https://github.com/eslint/eslint/commit/72f22eb) Chore: replace is-my-json-valid with Ajv ([#8852](https://github.com/eslint/eslint/issues/8852)) (Gajus Kuizinas)
* [b678535](https://github.com/eslint/eslint/commit/b678535) Chore: Add collapsible block for config in ISSUE_TEMPLATE ([#8872](https://github.com/eslint/eslint/issues/8872)) (Gyandeep Singh)
* [330dd58](https://github.com/eslint/eslint/commit/330dd58) Chore: fix title of linter test suite ([#8861](https://github.com/eslint/eslint/issues/8861)) (Teddy Katz)
* [60099ed](https://github.com/eslint/eslint/commit/60099ed) Chore: enable [for-direction](/docs/rules/for-direction) rule on ESLint codebase ([#8853](https://github.com/eslint/eslint/issues/8853)) (薛定谔的猫)
* [e0d1a84](https://github.com/eslint/eslint/commit/e0d1a84) Chore: upgrade eslint-plugin-eslint-plugin & eslint-plugin-node ([#8856](https://github.com/eslint/eslint/issues/8856)) (薛定谔的猫)
* [0780d86](https://github.com/eslint/eslint/commit/0780d86) Chore: remove identical tests ([#8851](https://github.com/eslint/eslint/issues/8851)) (Teddy Katz)


6 changes: 3 additions & 3 deletions docs/developer-guide/nodejs-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ var messages = linter.verifyAndFix("var foo", {
rules: {
semi: 2
}
}, { filename: "foo.js" });
});
```

Output object from this method:
Expand Down Expand Up @@ -212,7 +212,7 @@ var CLIEngine = require("eslint").CLIEngine;

The `CLIEngine` is a constructor, and you can create a new instance by passing in the options you want to use. The available options are:

* `allowInlineConfig` - Set to false to disable the use of configuration comments (such as `/*eslint-disable*/`). Corresponds to `--no-inline-config`.
* `allowInlineConfig` - Set to `false` to disable the use of configuration comments (such as `/*eslint-disable*/`). Corresponds to `--no-inline-config`.
* `baseConfig` - Set to false to disable use of base config. Could be set to an object to override default base config as well.
* `cache` - Operate only on changed files (default: `false`). Corresponds to `--cache`.
* `cacheFile` - Name of the file where the cache will be stored (default: `.eslintcache`). Corresponds to `--cache-file`. Deprecated: use `cacheLocation` instead.
Expand All @@ -221,7 +221,7 @@ The `CLIEngine` is a constructor, and you can create a new instance by passing i
* `cwd` - Path to a directory that should be considered as the current working directory.
* `envs` - An array of environments to load (default: empty array). Corresponds to `--env`.
* `extensions` - An array of filename extensions that should be checked for code. The default is an array containing just `".js"`. Corresponds to `--ext`. It is only used in conjunction with directories, not with filenames or glob patterns.
* `fix` - True indicates that fixes should be included with the output report, and that errors and warnings should not be listed if they can be fixed. However, the files on disk will not be changed. To persist changes to disk, call [`outputFixes()`](#outputfixes).
* `fix` - This can be a boolean or a function which will be provided each linting message and should return a boolean. True indicates that fixes should be included with the output report, and that errors and warnings should not be listed if they can be fixed. However, the files on disk will not be changed. To persist changes to disk, call [`outputFixes()`](#outputfixes).
* `globals` - An array of global variables to declare (default: empty array). Corresponds to `--global`.
* `ignore` - False disables use of `.eslintignore`, `ignorePath` and `ignorePattern` (default: true). Corresponds to `--no-ignore`.
* `ignorePath` - The ignore file to use instead of `.eslintignore` (default: null). Corresponds to `--ignore-path`.
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/working-with-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@ Add these keywords into your `package.json` file to make it easy for others to f

### Working with Custom Parsers

If you want to use your own parser and provide additional capabilities for your rules, you can specify your own custom parser. By default, the ESLint parser will use its parse method that takes in the source code as a first parameter and additional optional parameters as a second parameter to create an AST. You can specify a `parse` configuration to use your own custom parser. If a `parseForESLint` method is exposed, this method will be used to parse. Otherwise, the parser will use the parse method. `parseForESLint` behaves like `parse` and takes in the the source code and optional ESLint configurations. When `parseForESLint` is called, the method should return an object that contains the required property `ast` and an optional `services` property. `ast` should contain the AST. The `services` property contains the parser-dependent services. The value of the service property is available to rules as `context.parserServices`
If you want to use your own parser and provide additional capabilities for your rules, you can specify your own custom parser. If a `parseForESLint` method is exposed on the parser, this method will be used to parse the code. Otherwise, the `parse` method will be used. Both methods should take in the the source code as the first argument, and an optional configuration object as the second argument (provided as `parserOptions` in a config file). The `parse` method should simply return the AST. The `parseForESLint` method should return an object that contains the required property `ast` and an optional `services` property. `ast` should contain the AST. The `services` property can contain any parser-dependent services (such as type checkers for nodes). The value of the `services` property is available to rules as `context.parserServices`.

If no parseForESLint function is found, the parser will use the default parse method with the source code and the parser options. You can find a ESLint parser project [here](https://github.com/eslint/typescript-eslint-parser).
You can find an ESLint parser project [here](https://github.com/eslint/typescript-eslint-parser).

{

Expand Down
2 changes: 2 additions & 0 deletions docs/developer-guide/working-with-rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ In the preceding example, the error level is assumed to be the first argument. I

To learn more about JSON Schema, we recommend looking at some [examples](http://json-schema.org/examples.html) to start, and also reading [Understanding JSON Schema](http://spacetelescope.github.io/understanding-json-schema/) (a free ebook).

**Note:** Currently you need to use full JSON Schema object rather than array in case your schema has references ($ref), because in case of array format eslint transforms this array into a single schema without updating references that makes them incorrect (they are ignored).

### Getting the Source

If your rule needs to get the actual JavaScript source to work with, then use the `sourceCode.getText()` method. This method works as follows:
Expand Down
5 changes: 3 additions & 2 deletions docs/maintainer-guide/pullrequests.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Anyone, both team members and the public, may leave comments on pull requests.
When a pull request is opened, the bot will check the following:

1. Has the submitter signed a CLA?
1. Is the commit message summary in the correct format? Double-check that the tag ("Fix:", "New:", etc.) is correct based on the issue. Documentation-only pull requests do not require an issue.
1. Does the commit summary reference an issue?
1. Is the commit message summary in the correct format?
1. Is the commit summary too long?

The bot will add a comment specifying the problems that it finds. You do not need to look at the pull request any further until those problems have been addressed (there's no need to comment on the pull request to ask the submitter to do what the bot asked - that's why we have the bot!).

Once the bot checks have been satisfied, you check the following:

1. Double-check that the commit message tag ("Fix:", "New:", etc.) is correct based on the issue (or, if no issue is referenced, based on the stated problem).
1. Does the code follow our conventions (including header comments, JSDoc comments, etc.)? If not, please leave that feedback and reference the conventions document.
1. For code changes:
* Are there tests that verify the change? If not, please ask for them.
Expand All @@ -44,6 +44,7 @@ Committers may merge a pull request if it is a non-breaking change and is:
1. A bug fix (for either rules or core)
1. A dependency upgrade
1. Related to the build system
1. A chore

In addition, committers may merge any non-breaking pull request if it has been approved by at least one TSC member.

Expand Down
16 changes: 11 additions & 5 deletions docs/maintainer-guide/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ A two-person release team is assigned to each scheduled release. This two-person

The two-person team should seek input from the whole team on the Monday following a release to double-check if a patch release is necessary.

## Release Communication

Each scheduled release should be associated with a release issue ([example](https://github.com/eslint/eslint/issues/8138)). The release issue is the source of information for the team about the status of a release. Be sure the release issue has the "release" label so that it's easy to find.

## Process

On the day of a scheduled release, the release team should follow these steps:
Expand All @@ -33,10 +37,10 @@ On the day of a scheduled release, the release team should follow these steps:
* Small bug fixes written by a team member.
1. Log into Jenkins and schedule a build for the "ESLint Release" job.
1. Wait for the "ESLint Release" job to complete.
1. Update the release blog post with a "Highlights", including new rules and anything else that's important.
1. Make release announcement in the chatroom.
1. Make release announcement on Twitter.
1. Remind the team not to merge anything other than documentation changes and bug fixes.
1. Update the release blog post with a "Highlights" section, including new rules and anything else that's important.
1. Make a release announcement in the public chatroom.
1. Make a release announcement on Twitter.
1. Make a release announcement on the release issue. Document any problems that occurred during the release, and remind the team not to merge anything other than documentation changes and bug fixes. Leave the release issue open.

On the Monday following the scheduled release, the release team needs to determine if a patch release is necessary. A patch release is considered necessary if any of the following occurred since the scheduled release:

Expand All @@ -45,7 +49,9 @@ On the Monday following the scheduled release, the release team needs to determi

The patch release decision should be made as early on Monday as possible. If a patch release is necessary, then follow the same steps as the scheduled release process.

After the patch release has been published (or no patch release is necessary), inform the team that they can start merging in changes again.
In rare cases, a second patch release might be necessary if the release is known to have a severe regression that hasn't been fixed by Monday. If this occurs, the release team should announce the situation on the release issue, and leave the issue open until all patch releases are complete. However, it's usually better to fix bugs for the next release cycle rather than doing a second patch release.

After the patch release has been published (or no patch release is necessary), close the release issue and inform the team that they can start merging in semver-minor changes again.

## Emergency Releases

Expand Down
Loading

0 comments on commit 17b3ab0

Please sign in to comment.