Skip to content

Commit dba14dc

Browse files
silverwindlunnywxiaoguang
authored
Update JS dependencies, adjust eslint (#20659)
* Update JS dependencies - Update all JS dependencies minus vue-* - Improve eslint restricted globals - Tested build, lint and swagger * few more lint improvements Co-authored-by: Lunny Xiao <[email protected]> Co-authored-by: wxiaoguang <[email protected]>
1 parent fe78d35 commit dba14dc

10 files changed

+940
-697
lines changed

Diff for: .eslintrc.yaml

+9-9
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ overrides:
3030
env:
3131
worker: true
3232
rules:
33-
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
33+
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
3434
- files: ["build/generate-images.js"]
3535
rules:
3636
import/no-unresolved: [0]
@@ -109,7 +109,7 @@ rules:
109109
import/no-extraneous-dependencies: [2]
110110
import/no-import-module-exports: [0]
111111
import/no-internal-modules: [0]
112-
import/no-mutable-exports: [2]
112+
import/no-mutable-exports: [0]
113113
import/no-named-as-default-member: [0]
114114
import/no-named-as-default: [2]
115115
import/no-named-default: [0]
@@ -121,7 +121,7 @@ rules:
121121
import/no-restricted-paths: [0]
122122
import/no-self-import: [2]
123123
import/no-unassigned-import: [0]
124-
import/no-unresolved: [2, {commonjs: true}]
124+
import/no-unresolved: [2, {commonjs: true, ignore: ["\\?.+$"]}]
125125
import/no-unused-modules: [2, {unusedExports: true}]
126126
import/no-useless-path-segments: [2, {commonjs: true}]
127127
import/no-webpack-loader-syntax: [2]
@@ -211,7 +211,7 @@ rules:
211211
no-compare-neg-zero: [2]
212212
no-cond-assign: [2, except-parens]
213213
no-confusing-arrow: [0]
214-
no-console: [1, {allow: [info, warn, error]}]
214+
no-console: [1, {allow: [debug, info, warn, error]}]
215215
no-const-assign: [2]
216216
no-constant-binary-expression: [2]
217217
no-constant-condition: [0]
@@ -287,7 +287,7 @@ rules:
287287
no-redeclare: [2]
288288
no-regex-spaces: [2]
289289
no-restricted-exports: [0]
290-
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
290+
no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top, __dirname, __filename]
291291
no-restricted-imports: [0]
292292
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
293293
no-return-assign: [0]
@@ -321,7 +321,7 @@ rules:
321321
no-unused-labels: [2]
322322
no-unused-private-class-members: [2]
323323
no-unused-vars: [2, {args: all, argsIgnorePattern: ^_, varsIgnorePattern: ^_, caughtErrorsIgnorePattern: ^_, destructuredArrayIgnorePattern: ^_, ignoreRestSiblings: false}]
324-
no-use-before-define: [2, nofunc]
324+
no-use-before-define: [2, {functions: false, classes: true, variables: true, allowNamedExports: true}]
325325
no-useless-backreference: [0]
326326
no-useless-call: [2]
327327
no-useless-catch: [2]
@@ -347,7 +347,7 @@ rules:
347347
padded-blocks: [2, never]
348348
padding-line-between-statements: [0]
349349
prefer-arrow-callback: [2, {allowNamedFunctions: true, allowUnboundThis: true}]
350-
prefer-const: [2, {destructuring: all}]
350+
prefer-const: [2, {destructuring: all, ignoreReadBeforeAssign: true}]
351351
prefer-destructuring: [0]
352352
prefer-exponentiation-operator: [2]
353353
prefer-named-capture-group: [0]
@@ -449,7 +449,7 @@ rules:
449449
unicorn/no-new-array: [0]
450450
unicorn/no-new-buffer: [0]
451451
unicorn/no-null: [0]
452-
unicorn/no-object-as-default-parameter: [2]
452+
unicorn/no-object-as-default-parameter: [0]
453453
unicorn/no-process-exit: [0]
454454
unicorn/no-reduce: [2]
455455
unicorn/no-static-only-class: [2]
@@ -475,7 +475,7 @@ rules:
475475
unicorn/prefer-array-index-of: [2]
476476
unicorn/prefer-array-some: [2]
477477
unicorn/prefer-at: [0]
478-
unicorn/prefer-code-point: [2]
478+
unicorn/prefer-code-point: [0]
479479
unicorn/prefer-dataset: [2]
480480
unicorn/prefer-date-now: [2]
481481
unicorn/prefer-default-parameters: [0]

0 commit comments

Comments
 (0)