aboutsummaryrefslogtreecommitdiffstats
path: root/tsconfig.json
Commit message (Collapse)AuthorAgeFilesLines
* Update JS and PY deps, misc tweaks (#33903)silverwind8 days1-0/+2
| | | | | | | | | - Update all updateable dependencies - Add a few more unupgradable ones to updates blocklist - Adapt to breaking changes - Update to typescript 5.8, enable `erasableSyntaxOnly` which necessitated a change because of forbidden syntax - Misc cleanups - Tested htmx, easymde, swagger, chart.js
* Enable eslint for commonjs (#33575)silverwind2025-02-121-4/+8
|
* Enable two more strict options in tsconfig (#33438)silverwind2025-01-301-0/+2
| | | | | | These have no violations so are safe to enable - https://www.typescriptlang.org/tsconfig/#strictBindCallApply - https://www.typescriptlang.org/tsconfig/#strictBuiltinIteratorReturn
* Enable Typescript `noImplicitAny` (#33322)silverwind2025-01-221-0/+1
| | | | | | | Enable `noImplicitAny` and fix all issues. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enable Typescript `noImplicitThis` (#33250)silverwind2025-01-161-0/+1
| | | | | | | | | | | | - Enable https://www.typescriptlang.org/tsconfig/#noImplicitThis - Wrap Vue Template-Syntax SFCs in [`defineComponent`](https://vuejs.org/api/general#definecomponent) which makes type inference and linter work better - Move `createApp` calls outside the SFCs into separate files - Use [`PropType`](https://vuejs.org/api/utility-types#proptype-t) where appropriate - Some top-level component properties changed order as dictated by the linter - Fix all tsc and lint issues that popped up during these refactors
* Enable Typescript `strictFunctionTypes` (#32911)silverwind2024-12-221-0/+1
| | | | | | | | 1. Enable [strictFunctionTypes](https://www.typescriptlang.org/tsconfig/#strictFunctionTypes) 2. Introduce `DOMEvent` helper type which sets `e.target`. Surely not totally correct with that `Partial` but seems to work. 3. Various type-related refactors, change objects in `eventsource.sharedworker.ts` to `Map`.
* Fix remaining typescript issues, enable `tsc` (#32840)silverwind2024-12-161-1/+2
| | | | | | | | | | | | Fixes 79 typescript errors. Discovered at least two bugs in `notifications.ts`, and I'm pretty sure this feature was at least partially broken and may still be, I don't really know how to test it. After this, only like ~10 typescript errors remain in the codebase but those are harder to solve. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Change typescript `module` to `nodenext` (#32757)silverwind2024-12-101-2/+1
| | | | | | | | | | | | | | | | | Typescript 5.7 changed semantics around JSON imports and `nodenext` is now [treated differently](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/#validated-json-imports-in---module-nodenext) than `node16` for JSON imports and it requires the import attribute, so change the value to that and add the attribute to eliminate this typescript error. [`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution) is treated as an alias when `module` is `nodenext`, so we don't need to specify it. Also see https://github.com/microsoft/TypeScript/issues/60589. It appears the next Typescript release will fix this for `node16`, but I guess it'll still be good to switch to `nodenext`.
* Move web globals to `web_src/js/globals.d.ts` (#31943)silverwind2024-08-301-1/+1
| | | This file serves exclusively to support `web_src/js`, so move it there.
* Convert frontend code to typescript (#31559)silverwind2024-07-071-0/+5
| | | | | | | | | | | None of the frontend js/ts files was touched besides these two commands (edit: no longer true, I touched one file in https://github.com/go-gitea/gitea/pull/31559/commits/61105d0618e285d97e95044bfb64415f364a4526 because of a deprecation that was not showing before the rename). `tsc` currently reports 778 errors, so I have disabled it in CI as planned. Everything appears to work fine.
* Add initial typescript config and use it for eslint,vitest,playwright (#31186)silverwind2024-06-281-0/+30
This enables eslint to use the typescript parser and resolver which brings some benefits that eslint rules now have type information available and a tsconfig.json is required for the upcoming typescript migration as well. Notable changes done: - Add typescript parser and resolver - Move the vue-specific config into the root file - Enable `vue-scoped-css/enforce-style-type` rule, there was only one violation and I added a inline disable there. - Fix new lint errors that were detected because of the parser change - Update `i/no-unresolved` to remove now-unnecessary workaround for the resolver - Disable `i/no-named-as-default` as it seems to raise bogus issues in the webpack config - Change vitest config to typescript - Change playwright config to typescript - Add `eslint-plugin-playwright` and fix issues - Add `tsc` linting to `make lint-js`