一個可以杜絕 996 的 eslint 外掛
Github 地址:github.com/xinyu198736…
執行效果
Feature list
- 每天 18:00 之後禁止程式碼變更
- 週六週日 禁止程式碼變更
Installation
You'll first need to install ESLint:
$ npm i eslint --save-dev
複製程式碼
Next, install eslint-plugin-nns
:
$ 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.
Usage
Add nns
to the plugins section of your .eslintrc
configuration file. You can omit the eslint-plugin-
prefix:
{
"plugins": [
"nns"
]
}
複製程式碼
Then configure the rules you want to use under the rules section.
{
"rules": {
"nns/no-illegal-working-time": "error"
}
}
複製程式碼