@putout/plugin-putout-config
🐊Putout plugin helps with 🐊Putout Config.
Install
npm i @putout/plugin-putout-config -D
Rules
- ✅ [apply-labels][#apply-labels];
- ✅ [convert-boolean-to-string][#convert-boolean-to-string];
- ✅ [move-formatter-up][#move-formatter-up];
- ✅ [remove-empty][#remove-empty];
- ✅ [rename-property.js][#rename-property.js];
Config
{
"rules": {
"putout-config/apply-labels": "on",
"putout-config/convert-boolean-to-string": "on",
"putout-config/move-formatter-up": "on",
"putout-config/remove-empty": "on"
}
}
apply-labels
Apply labels
according to 🐊Putout v36. Checkout in 🐊Putout Editor
❌ Example of incorrect code
{
"rules": {
"remove-unused-labels": "on",
"convert-label-to-object": "on"
}
}
✅ Example of correct code
{
"rules": {
"labels/remove-unused": "on",
"labels/convert-to-object": "on"
}
}
convert-boolean-to-string
❌ Example of incorrect code
{
"rules": {
"remove-unused-variables": true,
"remove-debugger": false
}
}
✅ Example of correct code
{
"rules": {
"remove-unused-variables": "on",
"remove-debugger": "off"
}
}
move-formatter-up
Checkout in 🐊Putout Editor.
❌ Example of incorrect code
{
"parser": "babel",
"rules": {
"remove-unused-variables": "off"
},
"formatter": "progress-bar"
}
✅ Example of correct code
{
"parser": "babel",
"formatter": "progress-bar",
"rules": {
"remove-unused-variables": "off"
}
}
remove-empty
❌ Example of incorrect code
{
"rules": {},
"plugins": [],
"match": {
"*.js": {
"remove-unused-variables": "off"
}
}
}
✅ Example of correct code
{
"match": {
"*.js": {
"remove-unused-variables": "off"
}
}
}
License
MIT