aboutsummaryrefslogtreecommitdiffstats
path: root/package.json
Commit message (Collapse)AuthorAgeFilesLines
* Add markdownlint (#20512)silverwind2022-07-281-0/+1
| | | | Add `markdownlint` linter and fix issues. Config is based on the one from electron's repo with a few rules relaxed.
* Add eslint-plugin-sonarjs (#20431)silverwind2022-07-221-0/+1
| | | | | | | We had this plugin before but it was removed as it became outdated, now it was updated again, so it's compatible again. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Update JS dependencies (#20423)silverwind2022-07-201-17/+17
| | | | | | - Update all JS dependencies minus vue ones - Remove workaround for case-insensitive attribute selector - Add new linter rules and fix issues - Tested SVG display and swagger
* Use tippy.js for context popup (#20393)silverwind2022-07-191-0/+1
| | | | | By appending the tooltips to `document.body`, we can avoid any stacking context issues caused by surrounding element's CSS. This uses [tippy.js](https://github.com/atomiks/tippyjs) instead of Fomantic popups. We should aim to replace all Fomantic popups with this eventually and then get rid of the Fomantic `popup` module completely.
* Fix eslint parsing errors, remove eslint-plugin-html (#20323)silverwind2022-07-151-1/+0
| | | | | | | | | | | Introduce a separate .eslintrc in the Vue components folder to selectively enable vue-eslint-parser there, so that the rest of the files can use eslint's core parser which can deal with hashbangs. The fact that the eslint-disable comments worked in HTML was a unintended side-effect of the files being parsed via vue-eslint-parser, so I had to disable the parsing of these files in .eslintrc.yaml to make it work, and finally decided to remove eslint-plugin-html as it causes more issues than it solves.
* Fix versions check for busybox `sh` (#20358)silverwind2022-07-141-1/+1
| | | | | | `printf` in busybox emits a ugly 'invalid number' error when formatting string variables are present. Avoid that by reducing the go version check to just two digits, which ought to be enough as patch-level go versions are meant to be compatible. Avoid error on node-check as well.
* Add spectral linter for Swagger (#20321)silverwind2022-07-111-0/+1
| | | | | | | | | | [spectral](https://github.com/stoplightio/spectral) lints openapi/swagger files for mistakes of which it has identified a few and which I've fixed. I had to put it into `lint-frontend` because it depends on node_modules so can not run on Drone during the backend target. I plan to refactor these targets later to `lint-js` and `lint-go` so that they are categorized based on the tool dependencies.
* Bump mermaid from 9.1.1 to 9.1.2 (#20256)dependabot[bot]2022-07-061-1/+1
| | | | | | | | | | | | | | | | Bumps [mermaid](https://github.com/knsv/mermaid) from 9.1.1 to 9.1.2. - [Release notes](https://github.com/knsv/mermaid/releases) - [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/CHANGELOG.md) - [Commits](https://github.com/knsv/mermaid/compare/9.1.1...9.1.2) --- updated-dependencies: - dependency-name: mermaid dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Update JS dependencies (#19767)silverwind2022-05-201-7/+7
| | | | | | - Update all JS dependencies minus Vue - Tested mermaid, swagger, build Co-authored-by: 6543 <6543@obermui.de>
* Introduce eslint-plugin-jquery (#19690)silverwind2022-05-121-0/+1
| | | | | | | | Introduce the plugin that allows us to gradually forbid jQuery code. I've enabled all rules that already pass. Next step will be to go through each rule and fix the issues by using native DOM equivalents, which I think can be done in separate PRs, but if prefered I could also start here.
* Update JS dependencies (#19675)silverwind2022-05-101-14/+14
| | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies minus vue and vue-loader - Adapt to jest 28 - Add new eslint rules - Tested Mermaid and Swagger-UI * switch to @happy-dom/jest-environment for faster tests * bump eslint env to es2022
* node12 is EOL (#19451)techknowlogick2022-04-201-1/+1
| | | | | * node12 is EOL * fix lockfile
* Update JS dependencies (#19281)silverwind2022-04-011-13/+13
| | | | | | - Upgrade all JS dependencies minus vue and vue-loader - Adapt to breaking change of octicons - Update eslint rules - Tested Swagger UI, sortablejs and prod build
* Remove CodeMirror dependencies (#18911)silverwind2022-02-261-1/+0
| | | EasyMDE already loads all the modes and plugins it needs, so there is no reason for neither the webpack dependency nor the vendored copy
* Update JS dependencies (#18898)silverwind2022-02-251-13/+13
| | | | | - Updated all JS dependencies minus Vue (update 2 to 3 requires a ton of work and is probably blocked by dependencies) - Tested editor, swagger-ui
* Move editorconfig-checker to lint-backend and remove JS wrapper (#18793)silverwind2022-02-181-1/+0
| | | | | | | | | * Move editorconfig-checker to lint-backend It makes more sense there as templates are considered backend code. * User golang version of the tool * remove dependency
* Various Mermaid improvements (#18776)silverwind2022-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Various Mermaid improvments - Render into iframe for improved security - Use built-in dark theme instead of color inversion - Remove flexbox attributes, resulting in more consistent size rendering - Update API usage and update to latest version * restart ci * misc tweaks * remove unneccesary declaration * make it work without allow-same-origin, add loading=lazy * remove loading attribute, does not seem to work * rename variable * skip roundtrip to DOM for rendering * don't guess chart height * update comment to make it clear it's intentional * tweak * replace deprecated 'scrolling' property * remove unused css file Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update JS dependencies (#18636)silverwind2022-02-061-10/+10
|
* Update JS dependencies, fix lint (#18389)silverwind2022-02-011-6/+6
| | | | | | | | | | - Update all JS dependencies, including a security issue in mermaid - Fix new linter errors related to value-keyword-case - Tested Mermaid and Swagger Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Update JS dependencies, remove eslint-plugin-github (#18317)silverwind2022-01-181-19/+18
| | | | | | | | - Update all JS dependencies - Add new lint rules - Regenerate SVGs - Tested Monaco and Mermaid * Remove eslint-plugin-github
* Add lockfile-check (#18285)silverwind2022-01-151-0/+1
| | | | | | | * Add lockfile-check This check runs `npm install` which will rewrite the lockfile in case it is inconsistent with package.json. This check detects this and will fail the CI in such a case.
* Upgrade EasyMDE to 2.16.1 (#18278)wxiaoguang2022-01-151-1/+1
|
* Support webauthn (#17957)Lunny Xiao2022-01-141-0/+1
| | | | | | | Migrate from U2F to Webauthn Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Bump mermaid from 8.13.4 to 8.13.8 (#18198)dependabot[bot]2022-01-061-1/+1
| | | | | | | | | | | | | | | | Bumps [mermaid](https://github.com/knsv/mermaid) from 8.13.4 to 8.13.8. - [Release notes](https://github.com/knsv/mermaid/releases) - [Changelog](https://github.com/mermaid-js/mermaid/blob/develop/docs/CHANGELOG.md) - [Commits](https://github.com/knsv/mermaid/compare/8.13.4...8.13.8) --- updated-dependencies: - dependency-name: mermaid dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Bump swagger-ui-dist from 4.1.2 to 4.1.3 (#17965)dependabot[bot]2021-12-121-1/+1
|
* Update JS dependencies, adjust eslint config (#17904)silverwind2021-12-041-16/+16
| | | | | - Update all JS dependencies to latest versions - Add new lint rules, enable es2022 eslint parser features - Disable github/no-then, I feel the rule was too restricting
* Add new JS linter rules (#17699)silverwind2021-11-221-0/+1
| | | | | | | | | | | | | | | | | | | | * Add new JS linter rules Adds a few useful rules from eslint-plugin-github. Notable changes: - Forbid dataset usage, its camel-casing behaviour makes it hard to grep for attributes. - Forbid .then() and .catch(), we should generally prefer await for new code. For rare cases where they are useful, a eslint-disable-line directive can be set. - Add docs js to linting * also enable github/array-foreach * small tweak Co-authored-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add copy button to markdown code blocks (#17638)silverwind2021-11-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add copy button to markdown code blocks Done mostly in JS because I think it's better not to try getting buttons past the markup sanitizer. * add svg module tests * fix sanitizer regexp * remove outdated comment * vertically center button in issue comments as well * add comment to css * fix undefined on view file line copy * combine animation less files * Update modules/markup/markdown/markdown.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * add test for different sizes * add cloneNode and add tests for it * use deep clone * remove useless optional chaining * remove the svg node cache * unify clipboard copy string and i18n * remove unused var * remove unused localization * minor css tweaks to the button * comment tweak * remove useless attribute Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update JS dependencies (#17611)silverwind2021-11-111-16/+17
| | | | | | | | | - Update monaco, adapting to breaking changes - Update dropzone, adapting to breaking changes - Update linters, fix new issues, disable opinionated stylelint rules - Rebuild SVGs and images - Tested Dropzone and Monaco Replaces: https://github.com/go-gitea/gitea/pull/17574
* Upgrade webpack to 5.59.1 to resolve the `waitFor` bug with `watch-frontend` ↵wxiaoguang2021-10-251-1/+1
| | | | | (#17428) Webpack < 5.59 has a bug, which makes watch-frontend fail when editing .less files.
* Update JS dependencies (#17357)silverwind2021-10-191-25/+25
| | | | | | | | | | | | | * Update JS dependencies - Upgrade to eslint 8 and add new plugin rules - Adapt to various API changes - Rebuild SVGs * fix webpack warning on license * order options alphabetically Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Update JS dependencies (#16708)silverwind2021-08-171-26/+26
| | | | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies - Adapt to recent webpack changes - Add new lint rules and fix issues - Regenerate SVGs and update svgo api usage Fixes: https://github.com/go-gitea/gitea/pull/16492 * adapt jest config and sort keys Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Replace clipboard.js with async clipboard api (#15899)silverwind2021-05-301-1/+0
| | | | | | | | | | | Use async clipboard api [1] over this dependency, saving around 10kB bundle size before minify while delivering the same functionality. The issue comment button works but does not have a popup indication. We could add some toast-style notifications in the future to fix that but I think it's out of scope of this PR. [1] https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
* Update JS dependencies, use Node 16 (#15804)silverwind2021-05-131-16/+16
| | | | | | | | - Update all JS dependencies to latest version - Use Node 16 on CI - Add new lint rules - Add some gitignore entries for debug files Co-authored-by: Lauris BH <lauris@nix.lv>
* Use esbuild to minify CSS (#15756)silverwind2021-05-071-2/+0
| | | | | | | | It's about a 30% speedup in webpack build time with neglible differences in the output size. We do lose the ability for CSS source maps, but I rarely have a use for them anyways. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
* Update JS dependencies (#15591)silverwind2021-04-241-18/+18
| | | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies - Regenerate SVGs - Remove unused postcss dependency - Remove removed webpack option * re-add postcss Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Enforce tab indentation in templates (#15289)silverwind2021-04-101-0/+1
| | | | | | | | | | | | | | | | | | * Enforce tab indendation in templates This adds editorconfig-checker [1] to lint the template files so they conform the editorconfig files. I fixed all current identation issues using the fix mode of eclint [2] and some manual corrections. We can extend this linting to other files later, for now I'd like this PR to focus on HTML template files only. [1] https://github.com/editorconfig-checker/editorconfig-checker [2] https://github.com/jedmao/eclint * fix indendation Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add frontend testing, require node 12 (#15315)silverwind2021-04-081-1/+4
| | | | | | | | | | - Add basic frontend unit testing infrastructure using jest in ESM mode - Rename 'make test' to 'make test-backend' - Introduce 'make test-frontend' and 'make test' that runs both - Bump Node.js requirement to v12. v10 will be EOL in less than a month. - Convert all build-related JS files to ESM. I opted to run frontend tests run as part of the compliance pipeline because they complete fast and are not platform-specific like the golang tests.
* Update JS dependencies (#15290)silverwind2021-04-061-12/+10
| | | | | | | - Update all JS dependencies to latest version, no functional changes. - Remove unused direct dependencies core-js and terser-webpack-plugin. Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: 6543 <6543@obermui.de>
* Introduce esbuild on webpack (#14578)Lunny Xiao2021-04-021-5/+1
| | | | | | | | | | | | | | | * Vendor node mods as cache; fix esbuild/fomantic offline build * Fix --exclude; use bsdtar for consistent globbing * Fall back to GNU tar; forward-compatible for APT 2.0 * Avoid having extd. attrs with bsdtar * Dependency and misc. optimizations * Remove extra code after esbuild-loader update Co-authored-by: Mike L <cl.jeremy@qq.com>
* Remove file-loader dependency (#15196)silverwind2021-03-301-2/+1
| | | | | | | | - Upgrade webpack to 5.28 to enable publicPath option - Use asset modules in place of deprecated file-loader Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Remove raw-loader dependency (#15112)silverwind2021-03-221-1/+0
| | | | | | | Webpack now includes this functionality, allowing us to drop this now-deprecated dependency. Ref: https://webpack.js.org/guides/asset-modules/ Ref: https://webpack.js.org/loaders/raw-loader/
* Update JS dependencies (#15033)silverwind2021-03-221-38/+38
| | | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies - For octicons, rename trashcan to trash - For svgo, migrate to v2 api, output seems to have slightly changed but icons look the same - For stylelint, update config, fix custom property duplicates - For monaco, drop legacy Edge support - For eslint, enable new rules, fix new issues - For less-loader, remove deprecated import syntax * update svgo usage in generate-images and rebuild logo.svg with it
* Upgrade 'css-minimizer-webpack-plugin' to the latest version (#14527)Atilla Lonny2021-01-301-1/+1
| | | This patch resolves #14520
* Display current stopwatch in navbar (#14122)Norwin2021-01-211-0/+1
| | | | | | | | | | | | | | | | | * add notification about running stopwatch to header * serialize seconds, duration in stopwatches api * ajax update stopwatch i should get my testenv working locally... * new variant: hover dialog * noscript compatibility * js: live-update stopwatch time * js live update robustness
* Update JS dependencies and webpack (#14118)silverwind2020-12-271-27/+26
| | | | | | | | | | | | | | | | | | * Update JS dependencies - Update all JS dependencies - Adapt webpack config for version 5 - Update to Less 4.0, adapting usage of removed mixin syntax - Enable new ESLint rules and fix discovered issues * update license-webpack-plugin to fix missing licenses * update license-webpack-plugin once more to get webpack into the license output * switch to license-checker-webpack-plugin again for performance * update deps again Co-authored-by: Lauris BH <lauris@nix.lv>
* Swap swagger-ui with swagger-ui-dist (#13777)silverwind2020-12-011-1/+1
| | | | | | | | | * Swap swagger-ui with swagger-ui-dist The prebuilt version of swagger-ui is identical to the regular one but brings the benefit of faster webpack compilation and less npm dependencies so it npm installs will speed up too. * use bundle file directly
* Fix webpack build warnings (#13752)silverwind2020-11-301-3/+0
| | | | | Turns out some of the dependencies make use of optional dependencies like the vue-template-compiler. Install them again and install fomantic-ui only when it's being build to fix webpack warnings.
* Update JS dependencies and misc tweaks (#13741)silverwind2020-11-291-14/+16
| | | | | | | | | | | | | | | | | * Update JS dependencies and misc tweaks - Update all JS dependencies minus webpack - Adapt CodeMirrors styling to new CSS parent introduced by EasyMDE - Set eslint parser to latest and add new eslint 7.14 rule - Speed up npm install by disabling audit and fund checks - Move fomantic-ui to optional dependencies to further speed up npm - Enable syntax highlighting on GH for .eslintrc and .stylelintrc - Makefile cleanups * disable audit in npmrc * add missing dash Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Enable linting of JS inside templates (#13708)silverwind2020-11-281-0/+1
| | | | | | | | | | Indentation-related rules are disabled because indent templates with tabs but our lint rules expect spaces. Also had to exclude a few files where using template variables in the JS is causing syntax errors for the JS parser. I don't think there's a way to solve this otherwise. Co-authored-by: Lauris BH <lauris@nix.lv>