1.0.1 • Published 2 years ago
eslint-plugin-experimental-components v1.0.1
eslint-plugin-experimental-components
The plugin flags components/functions as experimental, issuing warnings in the code editor upon import or usage. This ensures developers are aware of the component's potential instability and the likelihood of future changes.
Installation
You will first need to install eslint package
npm i eslint --save-devNext, install eslint-plugin-experimental-components:
npm i eslint-plugin-experimental-components --save-devUsage
Add experimental-components to the plugins section of your .eslintrc configuration file
{
"plugins": ["experimental-components"]
}Then add the rules under the rules section
{
"rules": {
"experimental-components/warn-on-experimental-component-usage": [
"warn",
{
"paths": [
{
"module_name": "ui/components",
"experimental_components": ["RadioButton", "AppBar"],
"warn_type": "both",
"warning_message":
"🔔 Experimental Component 🔔\n'{}' component is experimental component.",
},
....
],
},
],
}
}