diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0bfd9ad --- /dev/null +++ b/.editorconfig @@ -0,0 +1,17 @@ +; http://editorconfig.org + +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true + +[*.{go,py,rb,php}] +indent_size = 4 + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/ISSUE_TEMPLATE/bugreport.yml b/.github/ISSUE_TEMPLATE/bugreport.yml index da05a4d..3ad157a 100644 --- a/.github/ISSUE_TEMPLATE/bugreport.yml +++ b/.github/ISSUE_TEMPLATE/bugreport.yml @@ -1,39 +1,77 @@ -name: 'Сообщение о проблеме' -description: 'Issue для сообщения о проблеме или баге' -title: 'Проблема: ' -labels: ['bug'] +name: "Bug Report" +description: "Report a bug or unexpected behavior" +title: "Bug: " +labels: ["bug"] body: - type: markdown attributes: value: | - Спасибо, что помогаете улучшить наш проект! Пожалуйста, заполните следующую информацию: + Thanks for reporting! Please fill in the details below. + + - type: dropdown + id: linthtml-version + attributes: + label: LintHTML version + options: + - 0.10.x + - 0.9.x + - Other + validations: + required: true + + - type: dropdown + id: node-version + attributes: + label: Node.js version + options: + - 24.x + - 22.x + - 20.x + - 18.x + - Other + validations: + required: true + + - type: input + id: package-version + attributes: + label: Package version + placeholder: e.g., 2.0.0 + validations: + required: true - type: textarea - id: terminal-error + id: error-output attributes: - label: Ошибка из терминала - description: Введите ошибку из терминала + label: Error output + description: Paste the linter output from terminal placeholder: | - ```bash File: test/index.html - Config file: index.js - 8:3 error The
element must contain a heading of any level. htmlacademy/section-has-heading - ✖ 1 problem (1 error, 0 warning) - ``` + 8:3 error The
element must contain... + validations: + required: true + - type: textarea - id: example + id: code-sample attributes: - label: Часть кода на котором произошла ошибка - description: Скопируйте часть кода на который неправильно реагирует линтер - placeholder: | - ```html -
-

Title

-
- ``` + label: Code sample + description: HTML code that triggers the issue + render: html + validations: + required: true + + - type: textarea + id: expected-actual + attributes: + label: Expected vs Actual + description: What should happen vs what happens + validations: + required: true - type: textarea - id: description + id: steps attributes: - label: Описание проблемы - description: Пожалуйста, подробно опишите проблему или баг + label: Steps to reproduce + description: Only if not obvious from above + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/new-rule.yml b/.github/ISSUE_TEMPLATE/new-rule.yml index ce03d24..63b208c 100644 --- a/.github/ISSUE_TEMPLATE/new-rule.yml +++ b/.github/ISSUE_TEMPLATE/new-rule.yml @@ -1,56 +1,44 @@ -name: 'Новое правило' -description: 'Issue для предложения нового правила в линтер' -title: 'Правило: ' -labels: ["enhancement"] +name: 'New Rule' +description: 'Propose a new lint rule' +title: 'Rule: ' +labels: ['enhancement'] body: - type: markdown attributes: value: | - Спасибо, что нашли временем поделиться новым правилом + Thanks for your rule proposal! - type: textarea id: description attributes: - label: Краткое описание - description: Опишите коротко, что будет проверять правило своими словами - placeholder: Проверяет наличие заголовка любого уровня в `
`. + label: Rule description + description: What does this rule check? + placeholder: Checks that
elements contain a heading + validations: + required: true - type: textarea - id: bad-example + id: invalid-examples attributes: - label: Плохие примеры - description: Напишите примеры кода, на которые правило должно выдавать ошибку - placeholder: | - Без заголовка - ```html -
-
- ``` + label: Invalid code examples + description: Code that should trigger errors + render: html + validations: + required: true - type: textarea - id: good-example + id: valid-examples attributes: - label: Хорошие примеры - description: Напишите примеры кода, на которые правило не должно реагировать - placeholder: | - C заголовком - ```html -
-

-
- ``` - - С любой вложенностью - ```html -
-
-

-
-
- ``` + label: Valid code examples + description: Code that should pass + render: html + validations: + required: true - type: textarea - id: free + id: context attributes: - label: Поле со свободным описанием. - description: Добавьте сюда всё остальное, что хотели рассказать + label: Additional context + description: Links to specs, edge cases, etc. + validations: + required: false diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml deleted file mode 100644 index 6457c96..0000000 --- a/.github/workflows/eslint.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: ESLint - -on: - pull_request: - branches: - - main -jobs: - eslint: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3.5.3 - - - name: Setup Node.js - uses: actions/setup-node@v3.7.0 - with: - node-version: 18 - - - name: Install dependencies - run: npm ci - - - name: Run ESLint - run: npm run eslint diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1fe2971 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,16 @@ +name: Test +on: + push: + branches: [main] + pull_request: + branches: [main] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + - run: npm ci + - run: npm test diff --git a/.gitignore b/.gitignore index 4e13ab3..8d0502c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,6 @@ -/node_modules -yarn.lock +node_modules/ .DS_Store Thumbs.db -.idea +.idea/ *.sublime* -*.lock -.publish +.vscode/ diff --git a/CHANGELOG.md b/CHANGELOG.md index f06b16d..f9a9ed7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 2.0.0 — ??? + +### Breaking Changes +- Renames `htmlacademy/img-svg-req-dimensions` → `htmlacademy/replaced-elements-req-dimensions`. Now also checks `