Closed balazs-endresz closed 1 month ago
Rebased and added some minor ruff fixes that came up after pre-commit run --all-files
. (I guess those went unnoticed after adding ruff
because pre-commit checks only modified files by default.)
Hello @balazs-endresz
Trying to run pre-commit
yields this error. Could you please provide a minimal config file, ideally as a hidden dotfile in the root of the project?
Oops! Something went wrong! :(
ESLint: 8.56.0
ESLint couldn't find a configuration file. To set up a configuration file for this project, please run:
npm init @eslint/config
ESLint looked for configuration files in /home/marco/Code/django-rosetta/rosetta/static/admin/rosetta/js and its ancestors. If it found none, it then looked in your home directory.
If you think you already have a configuration file or if you need more help, please stop by the ESLint Discord server: https://eslint.org/chat
Turns out it worked for me because I had a default eslint config file in my home directory. I tried again with eslint version 9 but still couldn't get that working with ~prettier~ pre-commit
, but at least the older v8 config file should work now with a new .eslintrc.js
file added to the first commit.
Thank you, merged!
pip install tox && tox
)Tests passed locally with
tox
and I these shouldn't require any test or docs changes. Also tested manually with thetestproject
.This PR adds auto formatting with pre-commit for js/css/html, and some minor linting tweaks:
flake8
url, which has been changed a while ago fromgitlab
togithub
rosetta.css
androsetta.js
withprettier
eslint
config (using v8 because couldn't get the newer v9 config working)eslint
warnings inrosetta.js
djhtml
trimmed
toblocktrans
intest.html
since the indentation was changed, but I guess this would be done in practice too to ignore the newlines.prettier
works foryaml
files too but not added that hereI tried to stick to the defaults mostly, but I'm happy to redo this with different settings if needed.