diff options
author | silverwind <me@silverwind.io> | 2024-07-11 12:20:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-11 10:20:51 +0000 |
commit | 228c354b16ce12735a901481d6d1c62611c1b245 (patch) | |
tree | 34a01e06d3539cbcbc4847ac849451dee281393e /.eslintrc.yaml | |
parent | 1b0ccf4bea3d5c0ef573eee89c5fd5f4de90b0e8 (diff) | |
download | gitea-228c354b16ce12735a901481d6d1c62611c1b245.tar.gz gitea-228c354b16ce12735a901481d6d1c62611c1b245.zip |
Add types for js globals (#31586)
Adds types for `window.config` and jQuery/htmx globals, eliminating 48
`tsc` errors.
Diffstat (limited to '.eslintrc.yaml')
-rw-r--r-- | .eslintrc.yaml | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 59eff85dc3..47f4eaa2d2 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -47,7 +47,6 @@ overrides: - files: ["web_src/**/*"] globals: __webpack_public_path__: true - htmx: true process: false # https://github.com/webpack/webpack/issues/15833 - files: ["web_src/**/*", "docs/**/*"] env: @@ -58,7 +57,15 @@ overrides: worker: true rules: 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] - - files: ["*.config.*", "**/*.d.ts"] + - files: ["*.config.*"] + rules: + i/no-unused-modules: [0] + - files: ["**/*.d.ts"] + rules: + i/no-unused-modules: [0] + "@typescript-eslint/consistent-type-definitions": [0] + "@typescript-eslint/consistent-type-imports": [0] + - files: ["web_src/js/types.ts"] rules: i/no-unused-modules: [0] - files: ["**/*.test.*", "web_src/js/test/setup.ts"] |