Skip to content

Commit

Permalink
style(eslint): add default-case: 1
Browse files Browse the repository at this point in the history
`default-case-last`: 2
`unicorn/prefer-spread`: 2->1
`unicorn/prefer-switch`: 2->1
  • Loading branch information
TonyRL authored Jan 18, 2024
1 parent cdb6f6f commit 35561ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"],
Expand Down
10 changes: 6 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/v2/nju/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
},
Expand Down

0 comments on commit 35561ce

Please sign in to comment.