mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-09 04:27:47 +08:00
Enable more ESLint rules
This commit is contained in:
parent
c3f8044743
commit
298dfc1064
@ -38,10 +38,26 @@ rules:
|
||||
prefer-const: warn
|
||||
no-var: error
|
||||
eqeqeq: error
|
||||
block-spacing: error
|
||||
brace-style:
|
||||
- error
|
||||
- 1tbs
|
||||
- allowSingleLine: true
|
||||
comma-spacing: error
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
- SwitchCase: 1
|
||||
key-spacing:
|
||||
- error
|
||||
- mode: minimum
|
||||
keyword-spacing: error
|
||||
space-before-blocks: error
|
||||
space-infix-ops: error
|
||||
no-unused-expressions:
|
||||
- error
|
||||
- allowShortCircuit: true
|
||||
allowTernary: true
|
||||
vue/html-closing-bracket-newline:
|
||||
- error
|
||||
- singleline: never
|
||||
|
@ -21,7 +21,7 @@ export function trans(key, parameters = {}) {
|
||||
|
||||
for (const i in parameters) {
|
||||
if (parameters[i] !== undefined) {
|
||||
temp = temp.replace(':'+i, parameters[i]);
|
||||
temp = temp.replace(':' + i, parameters[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,9 +18,9 @@ export function debounce(func, delay) {
|
||||
* @return {string}
|
||||
*/
|
||||
export function queryString(key, defaultValue) {
|
||||
const result = location.search.match(new RegExp('[?&]'+key+'=([^&]+)', 'i'));
|
||||
const result = location.search.match(new RegExp('[?&]' + key + '=([^&]+)', 'i'));
|
||||
|
||||
if (result === null || result.length < 1){
|
||||
if (result === null || result.length < 1) {
|
||||
return defaultValue;
|
||||
} else {
|
||||
return result[1];
|
||||
|
Loading…
Reference in New Issue
Block a user