Commit graph

4 commits

Author SHA1 Message Date
silverwind 50133b02bd
Add eslint-plugin-regexp (#24361)
Add
[`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp)
and fix discovered issues. Config is mostly the recommended one, but I
relaxed a few rules.
2023-04-26 22:08:16 -04:00
silverwind a159c3175f
Add new JS linter rules (#17699)
* 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>
2021-11-22 16:19:01 +08:00
silverwind d6657644a9
Modernize docs/assets/js/search.js (#10621)
- reformated file with eslint's --fix
- did some minor rule adjustments
- removed unneccesary console debug
- fixed a typo
2020-03-08 21:41:52 -03:00
John Olheiser 3b0303a4fc Implement documentation search (#8937)
* Implement documentation search

Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-Authored-By: guillep2k <18600385+guillep2k@users.noreply.github.com>
2019-11-13 18:03:18 +00:00