feat(basic): prefer non global object of node (#159)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
曾明健
2023-04-03 20:41:41 +08:00
committed by GitHub
parent d1cd722857
commit 502f6b0c37
3 changed files with 35 additions and 0 deletions

View File

@@ -49,6 +49,7 @@ module.exports = {
'antfu',
'no-only-tests',
'unused-imports',
'node',
],
settings: {
'import/resolver': {
@@ -315,6 +316,10 @@ module.exports = {
'operator-linebreak': ['error', 'before'],
'max-statements-per-line': ['error', { max: 1 }],
// node
// 'node/prefer-global/process': ['error', 'never'], // Not sure if we need it as we are using `process.env.NODE_ENV` a lot in front-end.
'node/prefer-global/buffer': ['error', 'never'],
// unicorns
// Pass error message when throwing errors
'unicorn/error-message': 'error',

View File

@@ -27,6 +27,7 @@
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-n": "^15.7.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-unicorn": "^46.0.0",
"eslint-plugin-unused-imports": "^2.0.0",