ESLint Beautifier
About
ESLint beautifier for Unibeautify
Package | Docs | Latest |
---|---|---|
@unibeautify/beautifier-eslint | v0.6.0 | |
unibeautify | v0.17.1 | |
eslint | v4.19.1 | |
eslint-plugin-react | v7.21.5 |
Install
Install with npm
:
npm install --save-dev unibeautify eslint eslint-plugin-react @unibeautify/beautifier-eslint
Or with yarn
:
yarn add --dev unibeautify eslint eslint-plugin-react @unibeautify/beautifier-eslint
Usage
Add ESLint
to beautifiers
language option.
A .unibeautifyrc.json
file would look like the following:
{
"LANGUAGE_NAME": {
"beautifiers": [
"ESLint"
]
}
}
Note: The
LANGUAGE_NAME
should be replaced with your desired supported language name, such asJSX
,JavaScript
, etc.
Advanced
The following beautifier option(s) are supported:
prefer_beautifier_config
See beautifier options docs for more information.
Example advanced configuration:
{
"LANGUAGE_NAME": {
"beautifiers": [
"ESLint"
],
"ESLint": {
"prefer_beautifier_config": true
}
}
}
Options
FAQ
How to use ESLint in Atom, VSCode, and other editors?
See the editor integration documentation for installation instructions for your editor of choice.
How to use ESLint configuration file?
You can override Unibeautify configuration and use ESLint's own configuration file instead with prefer_beautifier_config
beautifier option.
{
"LANGUAGE_NAME": {
"beautifiers": [
"ESLint"
],
"ESLint": {
"prefer_beautifier_config": "path/to/ESLint/config/file"
}
}
}
See beautifier options docs for more information.
How to enable ESLint to format on save?
See the editor integration documentation for format on save instructions for your editor of choice.
How to run ESLint on all files?
You can run ESLint on all of your files for every commit with Unibeautify CI.
Is there a ESLint sandbox or playground?
You can quickly try ESLint online with Unibeautify Playground.