Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: azat-io/eslint-plugin-perfectionist
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.0
Choose a base ref
...
head repository: azat-io/eslint-plugin-perfectionist
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.3.0
Choose a head ref
  • 12 commits
  • 23 files changed
  • 3 contributors

Commits on Oct 17, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8eb32c2 View commit details
  2. style: formatter fix

    azat-io committed Oct 17, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    82ff603 View commit details

Commits on Oct 23, 2023

  1. chore: update dependencies

    azat-io committed Oct 23, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    e53171f View commit details

Commits on Oct 31, 2023

  1. chore: update dependencies

    azat-io committed Oct 31, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    63aa102 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    64396b2 View commit details

Commits on Nov 11, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    4b81340 View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8654e44 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    48532ef View commit details
  4. Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    563c815 View commit details
  5. chore: update dependencies

    azat-io committed Nov 11, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    41c5248 View commit details
  6. chore: ignore coverage folder

    azat-io committed Nov 11, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    a0aa8f3 View commit details
  7. build: publish v2.3.0

    azat-io committed Nov 11, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    azat-io Azat S.
    Copy the full SHA
    75cd84f View commit details
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage/
43 changes: 0 additions & 43 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -13,29 +13,6 @@ jobs:
- name: checkout
uses: actions/checkout@v3

- name: set outputs
id: vars
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"

- name: start build notification
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT }}
token: ${{ secrets.TELEGRAM_TOKEN }}
disable_web_page_preview: true
format: html
message: |
⏳ <a href="${{ github.server_url }}/${{ github.repository }}"><b>${{ github.repository }}</b></a>
${{ github.workflow }}
by: ${{ github.actor }}
branch: ${{ github.ref }}
commit: ${{ github.event.head_commit.message }}
sha: ${{ steps.vars.outputs.sha_short }}
<a href="${{ github.event.head_commit.url }}">link</a>
- name: install pnpm
uses: pnpm/action-setup@v2
with:
@@ -66,23 +43,3 @@ jobs:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1

- name: finish build notification
uses: appleboy/telegram-action@master
if: always()
with:
to: ${{ secrets.TELEGRAM_CHAT }}
token: ${{ secrets.TELEGRAM_TOKEN }}
disable_web_page_preview: true
format: html
message: |
${{ job.status == 'success' && '✅' || '🆘' }} <a href="${{ github.server_url }}/${{ github.repository }}"><b>${{ github.repository }}</b></a>
${{ github.workflow }}
by: ${{ github.actor }}
branch: ${{ github.ref }}
commit: ${{ github.event.head_commit.message }}
sha: ${{ steps.vars.outputs.sha_short }}
<a href="${{ github.event.head_commit.url }}">link</a>
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Node.js
node_modules/
.nvmrc

# Build
dist/
17 changes: 17 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
# Changelog


## v2.3.0

[compare changes](https://github.com/azat-io/eslint-plugin-perfectionist/compare/v2.2.0...v2.3.0)

### 🚀 Features

- Add max line length option for multiline imports sorting ([4b81340](https://github.com/azat-io/eslint-plugin-perfectionist/commit/4b81340))
- Add partition by new line option to sort-objects rule ([8654e44](https://github.com/azat-io/eslint-plugin-perfectionist/commit/8654e44))
- Add partition by new line option to sort-interfaces rule ([48532ef](https://github.com/azat-io/eslint-plugin-perfectionist/commit/48532ef))
- Add partition by new line option to sort-object-typea rule ([563c815](https://github.com/azat-io/eslint-plugin-perfectionist/commit/563c815))

### ❤️ Contributors

- Azat S. ([@azat-io](http://github.com/azat-io))
- Azat S ([@azat-io](http://github.com/azat-io))
- Tthornton3-chwy

## v2.2.0

[compare changes](https://github.com/azat-io/eslint-plugin-perfectionist/compare/v2.1.0...v2.2.0)
15 changes: 12 additions & 3 deletions docs/rules/sort-imports.md
Original file line number Diff line number Diff line change
@@ -127,6 +127,7 @@ interface Options {
}
'internal-pattern'?: string[]
'newlines-between'?: 'always' | 'ignore' | 'never'
'max-line-length'?: number
```
### type
@@ -244,6 +245,14 @@ The [minimatch](https://github.com/isaacs/minimatch) library is used for pattern
- `always` - one new line between each group will be enforced, and new lines inside a group will be forbidden.
- `never` - no new lines are allowed in the entire import section.
### max-line-length\*
<sub>(default: `undefined`)</sub>
You can use this to sort by the import name only, excluding the elements, when the line length is greater than this number.
**\*Note:** Only available for `line-length` type.
## ⚙️ Usage
::: code-group
@@ -318,7 +327,7 @@ export default [
'internal',
['parent-type', 'sibling-type', 'index-type'],
['parent', 'sibling', 'index'],
'side-effect'
'side-effect',
'style',
'object',
'unknown',
@@ -329,8 +338,8 @@ export default [
nanostores: '@nanostores/**',
},
type: {
react: 'react'
}
react: 'react',
},
},
'newlines-between': 'always',
'internal-pattern': [
9 changes: 8 additions & 1 deletion docs/rules/sort-interfaces.md
Original file line number Diff line number Diff line change
@@ -103,8 +103,9 @@ interface Options {
order?: 'asc' | 'desc'
'ignore-case'?: boolean
groups?: (Group | Group[])[]
'custom-groups': { [key: Group]: string[] | string }
'custom-groups'?: { [key: Group]: string[] | string }
'ignore-pattern'?: string[]
'partition-by-new-line'?: boolean
}
```

@@ -159,6 +160,12 @@ If you need to ignore a rule for some interfaces, you can specify their names or

The [minimatch](https://github.com/isaacs/minimatch) library is used for pattern matching.

### partition-by-new-line

<sub>(default: `false`)</sub>

When `true`, does not sort the interface's element if there is an empty string between them.

## ⚙️ Usage

::: code-group
9 changes: 8 additions & 1 deletion docs/rules/sort-object-types.md
Original file line number Diff line number Diff line change
@@ -81,7 +81,8 @@ interface Options {
order?: 'asc' | 'desc'
'ignore-case'?: boolean
groups?: (Group | Group[])[]
'custom-groups': { [key: Group]: string[] | string }
'custom-groups'?: { [key: Group]: string[] | string }
'partition-by-new-line'?: boolean
}
```

@@ -128,6 +129,12 @@ Example:
}
```

### partition-by-new-line

<sub>(default: `false`)</sub>

When `true`, does not sort the object type's members if there is an empty string between them.

## ⚙️ Usage

::: code-group
13 changes: 10 additions & 3 deletions docs/rules/sort-objects.md
Original file line number Diff line number Diff line change
@@ -84,9 +84,10 @@ interface Options {
order?: 'asc' | 'desc'
'ignore-case'?: boolean
groups?: (string | string[])[]
'custom-groups': { [key: string]: string[] | string }
'styled-components': boolean
'partition-by-comment': string[] | string | boolean
'custom-groups'?: { [key: string]: string[] | string }
'styled-components'?: boolean
'partition-by-comment'?: string[] | string | boolean
'partition-by-new-line'?: boolean
}
```

@@ -147,6 +148,12 @@ You can set comments that would separate the properties of objects into logical

The [minimatch](https://github.com/isaacs/minimatch) library is used for pattern matching.

### partition-by-new-line

<sub>(default: `false`)</sub>

When `true`, does not sort the object's keys if there is an empty string between them.

## ⚙️ Usage

::: code-group
47 changes: 24 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "eslint-plugin-perfectionist",
"description": "ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.",
"version": "2.2.0",
"version": "2.3.0",
"homepage": "https://eslint-plugin-perfectionist.azat.io",
"repository": "https://github.com/azat-io/eslint-plugin-perfectionist",
"author": "Azat S. <to@azat.io>",
@@ -75,54 +75,55 @@
"vue-eslint-parser": ">=9.0.0"
},
"dependencies": {
"@typescript-eslint/utils": "^6.7.5",
"@typescript-eslint/utils": "^6.10.0",
"minimatch": "^9.0.3",
"natural-compare-lite": "^1.4.0"
},
"devDependencies": {
"@azat-io/eslint-config-typescript": "^1.6.0",
"@azat-io/stylelint-config": "^0.1.0",
"@commitlint/cli": "^17.7.2",
"@commitlint/config-conventional": "^17.7.0",
"@types/natural-compare-lite": "^1.4.0",
"@types/node": "^20.8.4",
"@typescript-eslint/eslint-plugin": "^6.7.5",
"@typescript-eslint/parser": "^6.7.5",
"@typescript-eslint/rule-tester": "^6.7.5",
"@typescript-eslint/types": "^6.7.5",
"@commitlint/cli": "^18.4.0",
"@commitlint/config-conventional": "^18.4.0",
"@types/natural-compare-lite": "^1.4.2",
"@types/node": "^20.9.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"@typescript-eslint/rule-tester": "^6.10.0",
"@typescript-eslint/types": "^6.10.0",
"@vitest/coverage-v8": "^0.34.6",
"ajv": "^6.12.6",
"astro-eslint-parser": "^0.16.0",
"changelogen": "^0.5.5",
"clean-publish": "^4.2.0",
"eslint": "^8.51.0",
"eslint-doc-generator": "^1.5.0",
"eslint": "^8.53.0",
"eslint-doc-generator": "^1.5.4",
"eslint-plugin-eslint-plugin": "^5.1.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-n": "^16.3.1",
"eslint-plugin-node-import": "^1.0.4",
"eslint-plugin-perfectionist": "^2.1.0",
"eslint-plugin-perfectionist": "^2.2.0",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-prefer-let": "^3.0.1",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-sonarjs": "^0.21.0",
"eslint-plugin-unicorn": "^48.0.1",
"eslint-plugin-vitest": "^0.3.2",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-unicorn": "^49.0.0",
"eslint-plugin-vitest": "^0.3.9",
"postcss-html": "^1.5.0",
"prettier": "^3.0.3",
"simple-git-hooks": "^2.9.0",
"stylelint": "^15.10.3",
"stylelint": "^15.11.0",
"stylelint-config-recess-order": "^4.3.0",
"stylelint-gamut": "^1.3.3",
"stylelint-order": "^6.0.3",
"stylelint-plugin-logical-css": "^0.13.2",
"svelte": "^4.2.1",
"svelte": "^4.2.3",
"svelte-eslint-parser": "^0.33.1",
"ts-dedent": "^2.2.0",
"typescript": "^5.2.2",
"vite": "^4.4.11",
"vite": "^4.5.0",
"vite-plugin-lightningcss": "^0.0.5",
"vitepress": "1.0.0-rc.21",
"vitepress": "1.0.0-rc.25",
"vitest": "^0.34.6",
"vue": "^3.3.4"
"vue": "^3.3.8"
}
}
Loading