]> git.koha-community.org Git - koha.git/commit
Bug 36400: Centralize {js,ts,vue} formatting config in .prettierrc.js
authorPaul Derscheid <paul.derscheid@lmscloud.de>
Fri, 22 Mar 2024 11:29:50 +0000 (12:29 +0100)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Mon, 22 Apr 2024 06:57:39 +0000 (08:57 +0200)
commitd58dfd1cef6dc1bde62106a165ab98179ef80347
tree4bb8a07b8ab41b61b66f55a830bbfc39d16ee7f5
parent411f49a9b9057822d52253253a9e187f31cf7ab2
Bug 36400: Centralize {js,ts,vue} formatting config in .prettierrc.js

    Let's centralize all formatting for js, ts and vue files in a .prettierrc.js.
    The goal here is to preserve eslint's linting but ignore all of its formatting options.

    Seems to work for vue files in vscode, vscodium and neovim w/ vscode-eslint-language-server.

    To test:
    1) Pick any vue file for example.
    2) Run format via your editor and either npx prettier -c .prettierrc.js <PATH_TO_VUE_FILE> [you can also use the -w flag to directly write].
    3) Look for unexpected changes: vue files should be already formatted w/ these inline flags (see: https://wiki.koha-community.org/wiki/Coding_Guidelines#JS14:_Prettier_JavaScript): [--trailing-comma es5, --arrow-parens avoid].
    4) Sign off if you're happy and comment or show what went wrong in a comment.

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
.eslintrc.json
.prettierrc.js [new file with mode: 0644]
package.json
yarn.lock