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

Update linters for VS Code, move files from kobo-common into kpi #4985

Merged
merged 4 commits into from
Jun 27, 2024

Commits on Jun 25, 2024

  1. Configuration menu
    Copy the full SHA
    177b573 View commit details
    Browse the repository at this point in the history
  2. Upgrade linter packages, move linters from kobo-common into kpi

    - Linter packages are updated to the last versions supported before
        deprecating Node 16. (so, these will be updated again soon.)
    
    - Extensions for VS Code are working again.
        (recent auto-updates dropped support for the versions we were on)
    
    Moving these support files directly into the kpi repo makes it easier
    to:
    
    - edit the files -- less indirection; can include linter updates as part
        of regular commits during feature work)
    
    - keep dependencies up to date -- there are ways to manage these npm
        packages between multiple repos in lockstep but it's a lot more
        complicated to do it like that
    
    - support VS Code -- there's an unstated assumption among the standard
        extensions that your language- and build-related npm packages are
        installed at the top level of your projects. it's one more reason
        an extension might be broken at any given time. your options are:
    
        (1) install once, at the root level of the project, and rule out
            that this is a problem
    
        (2) install in your nested module and install a copy with a
            matching version at the root level, too, update them in lockstep
            and cross your fingers
    
        shout out to Sublime / Neovim for not having this problem
    p2edwards committed Jun 25, 2024
    Configuration menu
    Copy the full SHA
    d49eb74 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5f34eee View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2024

  1. Upgrade TS, fix error, prompt to use local TS in VS Code

    Show the prompt that lets VS Code run the local TypeScript version in
    your workspace, so it matches the output of `npx tsc`.
    
    ---
    
    The error in formGallery/utils.ts is weird. This StackOverflow snippet
    checks if something is an instance of an Object or Array. TS2358 aptly
    notices that the right-hand side of
    
       value instanceof Object || value instanceof Array
    
    will never be reached, since an array is also an instanceof Object.
    
    So this could become
    
       value instanceof Object
    
    …but to preserve the meaning of the code, I've just switched their
    order around.
    
    ---
    
    Updated TS while I'm at it, since the code still builds without an issue
    and it's nice to keep on top of it.
    p2edwards committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    15a4d37 View commit details
    Browse the repository at this point in the history