diff --git a/eslint/babel-eslint-parser/README.md b/eslint/babel-eslint-parser/README.md index 75814be5c1..8ee13ebda1 100644 --- a/eslint/babel-eslint-parser/README.md +++ b/eslint/babel-eslint-parser/README.md @@ -1,8 +1,5 @@ # @babel/eslint-parser [![npm](https://img.shields.io/npm/v/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) [![travis](https://img.shields.io/travis/babel/@babel/eslint-parser/main.svg)](https://travis-ci.org/babel/@babel/eslint-parser) [![npm-downloads](https://img.shields.io/npm/dm/@babel/eslint-parser.svg)](https://www.npmjs.com/package/@babel/eslint-parser) - -## This project is still experimental and will be released with Babel v8. You can track our progress [here](https://github.com/babel/babel/issues/10752)! Please use [babel-eslint](https://github.com/babel/babel-eslint) in the meantime. - **@babel/eslint-parser** allows you to lint **ALL** valid Babel code with the fantastic [ESLint](https://github.com/eslint/eslint). @@ -56,7 +53,7 @@ Additional configuration options can be set in your ESLint configuration under t - `sourceType` can be set to `"module"`(default) or `"script"` if your code isn't using ECMAScript modules. - `allowImportExportEverywhere` (default `false`) can be set to `true` to allow import and export declarations to appear anywhere a statement is allowed if your build environment supports that. Otherwise import and export declarations can only appear at a program's top level. - `ecmaFeatures.globalReturn` (default `false`) allow return statements in the global scope when used with `sourceType: "script"`. -- `babelOptions` is an object containing Babel configuration [options](https://babeljs.io/docs/en/options) that are passed to Babel's parser at runtime. For cases where users might not want to use a Babel configuration file or are running Babel through another tool (such as Webpack with `babel-loader`). +- `babelOptions` is an object containing Babel configuration [options](https://babeljs.io/docs/en/options) that are passed to Babel's parser at runtime. For cases where users might not want to use a Babel configuration file or are running Babel through another tool (such as Webpack with `babel-loader`). **.eslintrc.js** @@ -83,14 +80,14 @@ This configuration would use the default parser for all files except for those f ```js module.exports = { rules: { - indent: "error" + indent: "error", }, overrides: [ { files: ["files/transformed/by/babel/*.js"], parser: "@babel/eslint-parser", - } - ] + }, + ], }; ``` diff --git a/eslint/babel-eslint-plugin/README.md b/eslint/babel-eslint-plugin/README.md index cb9eb4e4df..85f6d2b928 100644 --- a/eslint/babel-eslint-plugin/README.md +++ b/eslint/babel-eslint-plugin/README.md @@ -1,12 +1,10 @@ # @babel/eslint-plugin -## This project is still experimental and will be released with Babel v8. You can track our progress [here](https://github.com/babel/babel/issues/10752)! Please use [eslint-plugin-babel](https://github.com/babel/eslint-plugin-babel) in the meantime. - Companion rules for `@babel/eslint-parser`. `@babel/eslint-parser` does a great job at adapting `eslint` for use with Babel, but it can't change the built-in rules to support experimental features. `@babel/eslint-plugin` re-implements problematic rules so they do not give false positives or negatives. -> Requires Node 10.9 or greater +> Requires Node 10.13 or greater ### Install @@ -18,7 +16,7 @@ Load the plugin in your `.eslintrc.json` file: ```json { - "plugins": ["@babel/eslint-plugin"] + "plugins": ["@babel"] } ``` @@ -32,10 +30,11 @@ original ones as well!). "babel/no-invalid-this": "error", "babel/no-unused-expressions": "error", "babel/object-curly-spacing": "error", - "babel/semi": "error", + "babel/semi": "error" } } ``` + ### Rules Each rule corresponds to a core `eslint` rule and has the same options.