mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
[skip ci] Use updated native GitHub markdown `Note` admonition - Follows https://github.com/babel/babel/pull/15443 GitHub will render it with an icon and color the blockquote. The docs: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#alerts Signed-off-by: Yarden Shoham <[email protected]>
1.1 KiB
1.1 KiB
@babel/eslint-plugin-development
A set of eslint rules to enforce best practices in the development of Babel plugins.
Installation
You'll first need to install ESLint:
$ npm install --save-dev eslint
Next, install @babel/eslint-plugin-development:
$ npm install --save-dev @babel/eslint-plugin-development
Then, load the plugin in your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["@babel/development"]
}
Supported Rules
Note
Rules marked with 🔧 are autofixable.
@babel/development/no-deprecated-clone(🔧): Disallows using the deprecatedt.clone(node)andt.cloneDeep(node)methods from@babel/types. Those calls are replaced witht.cloneNode(node)when usingeslint --fix.@babel/development/no-undefined-identifier: Disallows usingt.identifier("undefined")to create a node which represents anundefinedvalue, since it might cause problem ifundefinedis redeclared.@babel/development/plugin-name: Requires plugins to have anameproperty, which can be useful for debugging purposes.