@babel/eslint-parser
Advanced tools
Comparing version 7.18.2 to 7.18.9
{ | ||
"name": "@babel/eslint-parser", | ||
"version": "7.18.2", | ||
"version": "7.18.9", | ||
"description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", | ||
@@ -39,3 +39,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"devDependencies": { | ||
"@babel/core": "^7.18.2", | ||
"@babel/core": "^7.18.9", | ||
"dedent": "^0.7.0", | ||
@@ -42,0 +42,0 @@ "eslint": "^7.27.0", |
@@ -52,3 +52,21 @@ # @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) | ||
- `requireConfigFile` (default `true`) can be set to `false` to allow @babel/eslint-parser to run on files that do not have a Babel configuration associated with them. This can be useful for linting files that are not transformed by Babel (such as tooling configuration files), though we recommend using the default parser via [glob-based configuration](https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns). Note: @babel/eslint-parser will not parse any experimental syntax when no configuration file is found. | ||
- `requireConfigFile` (default `true`) can be set to `false` to allow @babel/eslint-parser to run on files that do not have a Babel configuration associated with them. This can be useful for linting files that are not transformed by Babel (such as tooling configuration files), though we recommend using the default parser via [glob-based configuration](https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns). | ||
Note: When `requireConfigFile` is `false`, @babel/eslint-parser will still try to load the root babel config. If no configuration file is found, @babel/eslint-parser will not parse any experimental syntax. Though not recommended, if you have a babel config, but would like to prevent @babel/eslint-parser from loading Babel config, please specify | ||
**.eslintrc.js** | ||
```js | ||
module.exports = { | ||
parser: "@babel/eslint-parser", | ||
parserOptions: { | ||
requireConfigFile: false, | ||
babelOptions: { | ||
babelrc: false, | ||
configFile: false, | ||
// your babel options | ||
presets: ["@babel/preset-env"], | ||
}, | ||
}, | ||
}; | ||
``` | ||
- `sourceType` can be set to `"module"`(default) or `"script"` if your code isn't using ECMAScript modules. | ||
@@ -55,0 +73,0 @@ <!-- TODO(Babel 8): Remove this --> |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50386
143