1.0.0 • Published 9 years ago
eslint-config-eslint-myplugin v1.0.0
eslint-plugin-sm
eslint plugin for sm
Installation
You'll first need to install ESLint:
$ npm i eslint -gNext, install eslint-plugin-sm:
$ npm install eslint-plugin-sm -gNote: If you installed ESLint globally (using the -g flag) then you must also install eslint-plugin-sm globally.
Usage
Add sm to the plugins section of your .eslintrc configuration file. You can omit the eslint-plugin- prefix:
{
"plugins": [
"sm"
]
}Then configure the rules you want to use under the rules section. For now, the fix only support "always" option.
{
"rules": {
"sm/no-tabs": "error",
"newline-after-var": "off",
"sm/newline-after-var": ["error", "always"]
}
}Example
with shareable config: eslint-config-sm and this plugin:
{
root: true,
"plugins": [
"sm"
],
"rules": {
"sm/no-tabs": "error",
"newline-after-var": "off",
"sm/newline-after-var": ["error", "always"]
},
extends: "sm"
}1.0.0
9 years ago