一個能夠杜絕 996 的 eslint 插件git
Github 地址:github.com/xinyu198736…github
You'll first need to install ESLint:npm
$ npm i eslint --save-dev
複製代碼
Next, install eslint-plugin-nns
:json
$ npm install eslint-plugin-nns --save-dev
複製代碼
Note: If you installed ESLint globally (using the -g
flag) then you must also install eslint-plugin-nns
globally.bash
Add nns
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:spa
{
"plugins": [
"nns"
]
}
複製代碼
Then configure the rules you want to use under the rules section.插件
{
"rules": {
"nns/no-illegal-working-time": "error"
}
}
複製代碼