0

During my linting test in Github Actions I've met an issue that looks like this:

   Config loaded: /action/lib/.automation/.htmlhintrc

   /github/workspace/consoleLogQuiz.html
      L45 |        <input type="text" id="userAnswer" placeholder="Enter your answer here">
                                     ^ The id and class attribute values must be in lowercase and split by a dash. (id-class-value)

      L47 |        <button onclick="nextTask()" id="nextButton" style="display: none;">Next</button>
                                               ^ The id and class attribute values must be in lowercase and split by a dash. (id-class-value)

The syntax test suggests that the id and class names should be written in a different way. Now since that isn't a mandatory rule, and since I prefer naming id and class names the way I already did I want to update the test with the rule that won't show issue for the naming convention.

What I have tried to do is to update the .htmlhintrc file to the repository and update with with the following rule:

{
  "id-class-value": false
}

Also I've updated my Super-Linter YML file:

name: Super-Linter

on: push

jobs:
  super-lint:
    name: Lint code base
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Run Super-Linter
        uses: github/super-linter@v4
        env:
          DEFAULT_BRANCH: main
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          VALIDATE_HTML: true
          HTML_HINT_CONFIG_FILE: .htmlhintrc

After all these updates I've run the test again but received the same error suggesting that the id and class naming convention is wrong.

Feel free to check out the repository I'm referring to here: https://github.com/NoToolsNoCraft/Console.log-Test-App/tree/main

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.