eslint-plugin-no-unnecessary-brackets
v0.0.3
Published
Warns when string literals are supplied inside curly brackets in jsx
Downloads
8
Maintainers
Readme
eslint-plugin-no-unnecessary-brackets
Warns when string literals are supplied inside curly brackets in jsx.
eg.
<div className={"example"}>Hello</div>
Installation
You'll first need to install ESLint:
npm i eslint --save-dev
Next, install eslint-plugin-no-unnecessary-brackets
:
npm install eslint-plugin-no-unnecessary-brackets --save-dev
Usage
Add no-unnecessary-brackets
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["no-unnecessary-brackets"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"no-unnecessary-brackets/no-unnecessary-brackets": 1
}
}
Rules
| Name | Description | | :---------------------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------- | | no-unnecessary-brackets | Warns when string literals are supplied inside curly brackets in jsx |