Skip to content

test: sort import statements in test files - #2983

Merged
web-padawan merged 3 commits into
masterfrom
sort-import-statements-in-tests
Nov 5, 2021
Merged

web-padawan merged 3 commits into
masterfrom
sort-import-statements-in-tests

Conversation

@vursen

@vursen vursen commented Nov 5, 2021 •

Copy link
Copy Markdown
Contributor

Description

The PR sorts import statements in the unit and visual tests with the simple-import-sort ESLint plugin.

The following configuration is used:

"overrides": [
  {
    "files": ["packages/**/test/**"],
    "rules": {
      "simple-import-sort/imports": [
        "error",
        {
          "groups": [
            [
              // Testing tools group
              "^(@esm-bundle|@web|@vaadin/testing-helpers|sinon)",
              // Side-effects group
              "^\\u0000",
              // External group
              "^",
              // Vaadin group
              "^@vaadin",
              // Parent group
              "^\\.\\.",
              // Sibling group
              "^\\."
            ]
          ]
        }
      ]
    }
  }
]

Part of #2537

Type of change

  • Internal change

Checklist

  • I have read the contribution guide: https://vaadin.com/docs-beta/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.

@vursen vursen mentioned this pull request Nov 5, 2021
7 tasks done
@vursen vursen changed the title refactor: sort import statements in unit and visual tests refactor: sort import statements in tests Nov 5, 2021
@vursen
vursen requested a review from web-padawan November 5, 2021 12:09
@vursen vursen added refactor Internal improvement internal labels Nov 5, 2021
@web-padawan web-padawan changed the title refactor: sort import statements in tests test: sort import statements in unit and visual tests Nov 5, 2021
@sonarqubecloud

sonarqubecloud Bot commented Nov 5, 2021

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@web-padawan web-padawan changed the title test: sort import statements in unit and visual tests test: sort import statements in test files Nov 5, 2021
@web-padawan
web-padawan merged commit 1046c2c into master Nov 5, 2021
@web-padawan
web-padawan deleted the sort-import-statements-in-tests branch November 5, 2021 13:34
@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with platform 22.0.0.beta2 and is also targeting the upcoming stable 22.0.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants