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

[BUG] [Formatter] Nunjucks .njk files not being recognised as needing to be linted by linter #810

Open
3 tasks done
rmccar opened this issue Jan 26, 2024 · 0 comments
Open
3 tasks done
Labels
🦠 bug Something isn't working 🧽 formatter

Comments

@rmccar
Copy link

rmccar commented Jan 26, 2024

System Info

  • OS: OSX 14.3
  • Python Version: N/A (using with Node v20.10.0)
  • djLint Version: 1.34.1
  • template language: Nunjucks

Issue

Nunjucks .njk files aren't being recognised by the formatter/linter. When running djlint . --profile=nunjucks via the command line I get "No files to check! 😢".

If I change one of the files to a .html file then run the same command it will then format/lint the file I have changed. I have tried using djlint . --extension=html.njk --check but this has the same result. I have also tried setting the profile, extension and files params in a .djlintrc file which also doesn't solve the issue.

The only way I have managed to get a .njk file formatted/linted is to specify the exact file and path I want to format/lint like running djlint path/nunjucksFile.njk --profile=nunjucks

How To Reproduce

  • Install djlint using npm
  • Run djlint . --profile=nunjucks in a folder structure that contains nunjucks files with the extension .njk
  • This should result in "No files to check! 😢" being returned
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦠 bug Something isn't working 🧽 formatter
Projects
None yet
Development

No branches or pull requests

1 participant