style(eslint): add default-case: 1

`default-case-last`: 2
`unicorn/prefer-spread`: 2->1
`unicorn/prefer-switch`: 2->1
This commit is contained in:
Tony
2024-01-18 15:03:52 +00:00
committed by GitHub
parent cdb6f6f34c
commit 35561ce39c
3 changed files with 14 additions and 9 deletions
+4 -1
View File
@@ -22,6 +22,8 @@
"curly": 2,
"dot-notation": 2,
"eqeqeq": 2,
"default-case": ["warn", { "commentPattern": "^no default$" }],
"default-case-last": 2,
"no-console": 2,
"no-eval": 2,
"no-extend-native": 2,
@@ -76,9 +78,10 @@
"unicorn/prefer-number-properties": ["warn", { "checkInfinity": false }],
"unicorn/prefer-object-from-entries": 1,
"unicorn/prefer-regexp-test": 1,
"unicorn/prefer-spread": 1,
"unicorn/prefer-string-replace-all": 1,
"unicorn/prefer-string-slice": 0,
"unicorn/prefer-switch": ["error", { "emptyDefaultCase": "do-nothing-comment" }],
"unicorn/prefer-switch": ["warn", { "emptyDefaultCase": "do-nothing-comment" }],
"unicorn/prefer-top-level-await": 0,
"unicorn/prevent-abbreviations": 0,
"unicorn/switch-case-braces": ["error", "avoid"],
+6 -4
View File
@@ -9,7 +9,9 @@ updates:
labels:
- dependencies
ignore:
# ESM only packages
- dependency-name: jsrsasign
versions: ['>=11.0.0'] # no longer includes KJUR.crypto.Cipher for RSA
# ESM only packages
- dependency-name: fanfou-sdk
versions: ['>=5.0.0']
- dependency-name: got
@@ -26,9 +28,9 @@ updates:
versions: ['>=1.0.0']
- dependency-name: unified
versions: ['>=10.0.0']
# remark-custom-heading-id is not updated to
# the latest mdast/mdxast which is released from
# the second half of 2023
# remark-custom-heading-id is not updated to
# the latest mdast/mdxast which is released from
# the second half of 2023
- dependency-name: remark
versions: ['>=15.0.0']
- dependency-name: remark-frontmatter
+4 -4
View File
@@ -97,16 +97,16 @@ module.exports = {
target: (params) => {
let type;
switch (params.type) {
case 'cgxxhw':
default:
type = 'cgxx';
break;
case 'cjgshw':
type = 'cjgs';
break;
case 'zfcgyxgk':
type = params.type;
break;
case 'cgxxhw':
default:
type = 'cgxx';
break;
}
return `/nju/zbb/${type}`;
},