git-log--graph icon indicating copy to clipboard operation
git-log--graph copied to clipboard

Internal: Code formatter

Open lens0021 opened this issue 2 years ago • 2 comments

There are trailing whitespaces and my vscode complained about it.

lens0021 avatar May 23 '23 16:05 lens0021

Are you using some kind of extension that warns you about it? I wanna use it too.

It's probably not possible to apply semantic language-agnostic code formatting due to the amount of preprocessors: Vue/SLM/Coffee/Stylus. For example, there's coffeelint but it doesn't work in Vue files. So all that could be done is integrating some generic language-indifferent checker which I'd then integrate in the build script release.sh. The whole process is still pretty manual, after all.

phil294 avatar May 25 '23 17:05 phil294

What I am using is not an extension but VSCode's files.trimTrailingWhitespace setting.

When enabled, will trim trailing whitespace when saving a file.

But, if you prefer, pre-commit could help you by the trailing-whitespace hook I think. Anyway, I didn't know the limitation you mentioned, sorry.

lens0021 avatar May 25 '23 18:05 lens0021

This has become obsolete since the removal of coffeescript etc and the addition of eslint which does indeed enforce a unified code style

phil294 avatar Oct 03 '24 19:10 phil294