babel-preset-airbnb
Advanced tools
Comparing version 3.0.1 to 3.1.0
@@ -21,3 +21,3 @@ 'use strict'; | ||
// see docs about api at https://babeljs.io/docs/en/config-files#apicache | ||
api.assertVersion(7); | ||
api.assertVersion('^7.0.0'); | ||
@@ -28,2 +28,3 @@ const { | ||
removePropTypes, | ||
jscript = true, | ||
} = options; | ||
@@ -67,3 +68,3 @@ | ||
require('@babel/plugin-transform-property-literals'), | ||
require('@babel/plugin-transform-jscript'), | ||
jscript ? require('@babel/plugin-transform-jscript') : null, | ||
[require('@babel/plugin-proposal-object-rest-spread'), { | ||
@@ -70,0 +71,0 @@ useBuiltIns: true, |
{ | ||
"name": "babel-preset-airbnb", | ||
"version": "3.0.1", | ||
"version": "3.1.0", | ||
"description": "A babel preset for transforming your JavaScript for Airbnb", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,3 +5,3 @@ # babel-preset-airbnb | ||
Currently contains transforms for all standard syntax that is [stage 4](https://tc39.github.io/ecma262/) (ES2018) or [stage 3](https://github.com/tc39/proposals#active-proposals), except for the following: | ||
Currently contains transforms for all [stage 4](https://tc39.github.io/ecma262/) (ES2018) and [stage 3](https://github.com/tc39/proposals#active-proposals) syntax that is permitted in the [Airbnb Style Guide](https://github.com/airbnb/javascript). Please note that if usage of a stage 3 proposal is not explicitly mentioned in the Airbnb Style Guide, then it will not be enabled here. Additionally, stage 4 syntax that is excluded is as follows: | ||
- generators: `regenerator-runtime` is too heavyweight for our use. | ||
@@ -153,1 +153,13 @@ - `async/await`: `regenerator-runtime` is too heavyweight for our use, and [async-to-promises](https://www.npmjs.com/package/babel-plugin-async-to-promises) is not yet complete enough to be safely used. | ||
For example, if you are using this plugin in a deployable app, you might want to use the remove mode for your production build (and disable this transform entirely in development for optimal build speeds). | ||
## JScript | ||
This preset uses a transform to protect against JScript bugs in older versions of Internet Explorer. If you'd like to disable this, set the `jscript` option to `false`: | ||
```json | ||
{ | ||
"presets": [["airbnb", { | ||
"jscript": false, | ||
}]] | ||
} | ||
``` |
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
9601
63
164