Browse Source

Switch from jinjalint to curlylint

Thibaud Colas 3 years ago
parent
commit
fc0f76ea9d
4 changed files with 4 additions and 11 deletions
  1. 1 6
      .circleci/config.yml
  2. 1 3
      Makefile
  3. 1 1
      docs/contributing/html_guidelines.rst
  4. 1 1
      setup.py

+ 1 - 6
.circleci/config.yml

@@ -22,13 +22,8 @@ jobs:
       - run: pipenv run flake8
       - run: pipenv run isort --check-only --diff .
       - run: pipenv run black --target-version py37 --check --diff .
-      # Filter out known false positives, while preserving normal output and error codes.
-      # See https://github.com/motet-a/jinjalint/issues/18.
-      # And https://circleci.com/docs/2.0/configuration-reference/#default-shell-options.
       - run: git ls-files '*.html' | xargs pipenv run djhtml --check
-      - run:
-          shell: /bin/bash -e
-          command: pipenv run jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:76' | tee /dev/tty | wc -l | grep -q '0'
+      - run: pipenv run curlylint --parse-only wagtail
       - run: pipenv run doc8 docs
       - run: DATABASE_NAME=wagtail.db pipenv run python -u runtests.py
 

+ 1 - 3
Makefile

@@ -20,9 +20,7 @@ lint:
 	black --target-version py37 --check --diff .
 	flake8
 	isort --check-only --diff .
-	# Filter out known false positives, while preserving normal output and error codes.
-	# See https://github.com/motet-a/jinjalint/issues/18.
-	jinjalint --parse-only wagtail | grep -v 'welcome_page.html:6:76' | tee /dev/tty | wc -l | grep -q '0'
+	curlylint --parse-only wagtail
 	git ls-files '*.html' | xargs djhtml --check
 	npm run lint:css --silent
 	npm run lint:js --silent

+ 1 - 1
docs/contributing/html_guidelines.rst

@@ -6,7 +6,7 @@ We use `Django templates <https://docs.djangoproject.com/en/stable/ref/templates
 Linting HTML
 ~~~~~~~~~~~~
 
-We use `jinjalint <https://github.com/motet-a/jinjalint>`_ to lint templates and `djhtml <https://github.com/rtts/djhtml>`_ to format them.
+We use `curlylint <https://www.curlylint.org/>`_ to lint templates and `djhtml <https://github.com/rtts/djhtml>`_ to format them.
 If you have installed Wagtail's testing dependencies (``pip install -e .[testing]``), you can check your code by running ``make lint``, and format your code by running ``make format``.
 
 Principles

+ 1 - 1
setup.py

@@ -63,7 +63,7 @@ testing_extras = [
     "doc8==0.8.1",
     "flake8-assertive==2.0.0",
     # For templates linting
-    "jinjalint>=0.5",
+    "curlylint==0.13.0",
     # For template indenting
     "djhtml==1.4.13",
     # for validating string formats in .po translation files