0.1.0 • Published 5 years ago
eslint-plugin-no-string v0.1.0
eslint-plugin-no-string
In some projects, strings will be managed in a unified way to make projects is more friendly with i18n. So that, you may not want strings to appear in some files in your project.
Installation
You'll first need to install ESLint:
$ npm i eslint --save-devNext, install eslint-plugin-no-string:
$ npm install eslint-plugin-no-string --save-devUsage
Add no-string to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": ["no-string"]
}Then configure the rules you want to use under the rules section.
{
"rules": {
"no-string/files": [
"error",
"always",
["src/**", "src/index.ts", "**/*.jsx", "**/*.tsx"]
]
}
}