Linting rules for using appropriate punctuation symbols (like the apostrophe symbol instead of a single quote) in string literals.
You'll first need to install ESLint:
$ npm i eslint --save-dev
Next, install eslint-plugin-punctuation
:
$ npm install eslint-plugin-punctuation --save-dev
Add punctuation
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": ["punctuation"]
}
Then configure the rules you want to use under the rules section.
{
"rules": {
"punctuation/prefer-apostrophe-in-string-literal": "error"
}
}
- prefer-apostrophe-in-string-literal