summaryrefslogtreecommitdiff
path: root/.editorconfig
AgeCommit message (Collapse)Author
2025-09-03[mod] addition of various type hints / tbcMarkus Heiser
- pyright configuration [1]_ - stub files: types-lxml [2]_ - addition of various type hints - enable use of new type system features on older Python versions [3]_ - ``.tool-versions`` - set python to lowest version we support (3.10.18) [4]_: Older versions typically lack some typing features found in newer Python versions. Therefore, for local type checking (before commit), it is necessary to use the older Python interpreter. .. [1] https://docs.basedpyright.com/v1.20.0/configuration/config-files/ .. [2] https://pypi.org/project/types-lxml/ .. [3] https://typing-extensions.readthedocs.io/en/latest/# .. [4] https://mise.jdx.dev/configuration.html#tool-versions Signed-off-by: Markus Heiser <markus.heiser@darmarit.de> Format: reST
2025-08-18[mod] theme/simple: migrate codebase to TypeScriptIvan Gabaldon
TypeScript is a superset of JavaScript, converting the entire theme to TypeScript allows us to receive much more feedback on possible issues made in package updates or our own typos, furthermore, it allows to transpile properly to lower specs. This PR couldn't be done in smaller commits, a lot of work needed to make everything *work properly*: - A browser baseline has been set that requires minimum **Chromium 93, Firefox 92 and Safari 15** (proper visuals/operation on older browser versions is not guaranteed) - LightningCSS now handles minification and prefix creation for CSS. - All hardcoded polyfills and support for previous browser baseline versions have been removed. - Convert codebase to TypeScript. - Convert IIFE to ESM, handling globals with IIFE is cumbersome, ESM is the standard for virtually any use of JS nowadays. - Vite now builds the theme without the need for `vite-plugin-static-copy`. - `searxng.ready` now accepts an array of conditions for the callback to be executed. - Replace `leaflet` with `ol` as there were some issues with proper Vite bundling. - Merged `head` with `main` script, as head was too small now. - Add `assertElement` to properly check the existence of critical DOM elements. - `searxng.on` renamed to `searxng.listen` with some handling improvements.
2025-07-28[enh] CI - add shell script formatterMarkus Heiser
Implement rules and functions to format shell scripts: $ make format.shell or alternatively to format all source code: $ make format The formatter `shfmt` reads the rules from the editorconfig[1] If any EditorConfig files are found, they will be used to apply formatting options. If any parser or printer flags are given to the tool, no EditorConfig files will be used. [1] https://github.com/patrickvane/shfmt?tab=readme-ov-file#description Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-06-09[fix] .editorconfig: correction of the settings from the realities (#4892)Markus Heiser
The code formatter allows up to 120 characters per line, but for better readability the editor should prefer 80 characters per line In the HTML templates (jinja) we usually use an indentation of two and no tabs. Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2025-02-28[web-client] simple theme: build & development env based on vite.Markus Heiser
Vite is a build tool, it consists of two major parts [1]: - A dev server that provides rich feature enhancements over native ES modules, for example extremely fast Hot Module Replacement (HMR). - A build command that bundles your code with Rollup, pre-configured to output highly optimized static assets for production. [1] https://vite.dev/guide/ Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
2024-04-08[enh] add editorconfig rules for javascript filesYaksh Bariya
SearXNG has a bunch of javascript files which have an indentation of two, but the '*' rule tells my editor to use 4 spaces.
2023-03-20[enh] add .editorconfigMarkus Heiser
EditorConfig [1] helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig specification [2] support is pre installed in common IDEs [3] and plugins for many others are available [4]. [1] https://editorconfig.org [2] https://editorconfig-specification.readthedocs.io/ [3] https://editorconfig.org/#pre-installed [4] https://editorconfig.org/#download Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>