0.0.1-beta.1 • Published 2 years ago
eslint-plugin-4l4y v0.0.1-beta.1
eslint-plugin-4l4y
ESLint plugin to improve developer's quality of lyfe by bringing joy to the variable declaration.
Usage
Install and add this plugin to existing eslint configuration, run:
yarn add eslint-plugin-4l4y --devUpdate your eslint configuration:
{
"plugins": ["4l4y"],
"rules": {
"4l4y/variable-name": "warn"
}
}Rules
variable-nameenforces 4l4y case for simple variable declaration.function-nameworks the same asvariable-name, but for function name.signed-numberenforces use of number sign to better differentiate positive number from negative one.thousand-separatorenforces numeric separator in thousand place for easier big number recognition.
Limitations
- 4l4y case only replaces
'a'to'4'for now, will update to a more sophisticated spec in the future. - Auto fix for
variable-nameandfunction-nameonly updates the declarations, variable usage has to be updated manually.
Development
To build the project for local environment, run:
yarn devInstall the package globally, run:
yarn linkUse the plugin in a project, go to the project folder then run:
yarn link eslint-config-4l4ycan't get it to work with npm link, any idea please open a pull request.