Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SearXNG JavaScript Style Guide #538

Merged
merged 5 commits into from Dec 14, 2021
Merged

SearXNG JavaScript Style Guide #538

merged 5 commits into from Dec 14, 2021

Commits on Dec 14, 2021

  1. [emacs] .dir-locals.el: in json-mode use indentation of 4

    In JS + JSON we use indentation of 4.
    
    Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
    return42 committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    07e9d95 View commit details
    Browse the repository at this point in the history
  2. [mod] SearXNG JavaScript Style Guide (eslint:recommended)

    The SearXNG JavaScript Style Guide is a set of eslint rules [1] based on the
    eslint:recommended [2] rules.
    
        "extends": "eslint:recommended"
    
    The additional rules adopted from the JavaScript Standard Style [3][4].
    
    [1] https://eslint.org/docs/rules/
    [2] https://github.com/kunalgolani/eslint-config/tree/master/packages/recommended
    [3] https://standardjs.com/rules.html#javascript-standard-style
    [4] https://github.com/standard/eslint-config-standard/blob/master/.eslintrc.json
    
    Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
    return42 committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    0673058 View commit details
    Browse the repository at this point in the history
  3. [mod] eslint: add gruntfile.js to the files to lint

    Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
    return42 committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    32cf24a View commit details
    Browse the repository at this point in the history
  4. [fix] eslint --fix

    automatically fix some of the problems reported by eslint rules::
    
        $ ./manage nvm.bash
        nvm-env$ npm --prefix searx/static/themes/simple run eslint-fix
    
    Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
    return42 committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    34f5e9c View commit details
    Browse the repository at this point in the history
  5. [simple theme] activate - SearXNG JavaScript Style Guide

    Add the 'SearXNG JavaScript Style Guide' as one quality gate in the build chain
    of the simple theme::
    
        make themes.simple
        make themes.simple.test
    
    In the github CI the `themes.all` target enforce a `themes.simple`.
    
    BTW: Remove 'jshint' left overs from 0ee316f
    
    Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
    return42 committed Dec 14, 2021
    Configuration menu
    Copy the full SHA
    f287787 View commit details
    Browse the repository at this point in the history