Skip to content

Commit

Permalink
Configured eslint-plugin-sort-exports ⛴️ (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
01taylop authored Jul 16, 2024
1 parent 404dde0 commit 276092b
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
1 change: 1 addition & 0 deletions .depcheckrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
ignores: [
"eslint-plugin-inclusive-language",
"eslint-plugin-sort-destructure-keys",
"eslint-plugin-sort-exports",
"rimraf",
"@types/jest"
]
Expand Down
11 changes: 7 additions & 4 deletions config/eslint/build-config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
import InclusiveLanguageRules from './rules/inclusive-language'
import SortDestructureKeysRules from './rules/sort-destructure-keys'
import InclusiveLanguage from './rules/inclusive-language'
import SortDestructureKeys from './rules/sort-destructure-keys'
import SortExports from './rules/sort-exports'

const buildConfig = () => ({
plugins: [
'inclusive-language',
'sort-destructure-keys',
'sort-exports',
],
rules: {
...InclusiveLanguageRules,
...SortDestructureKeysRules,
...InclusiveLanguage,
...SortDestructureKeys,
...SortExports,
},
})

Expand Down
8 changes: 8 additions & 0 deletions config/eslint/rules/sort-exports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// https://github.com/jrdrg/eslint-plugin-sort-exports

export default {
'sort-exports/sort-exports': [2, {
sortDir: 'asc',
sortExportKindFirst: 'type',
}],
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"eslint": "9.4.0",
"eslint-plugin-inclusive-language": "2.2.1",
"eslint-plugin-sort-destructure-keys": "2.0.0",
"eslint-plugin-sort-exports": "0.9.1",
"glob": "10.4.1",
"markdownlint": "0.34.0",
"node-notifier": "10.0.1",
Expand Down Expand Up @@ -57,6 +58,7 @@
"eslint",
"eslint-plugin-inclusive-language",
"eslint-plugin-sort-destructure-keys",
"eslint-plugin-sort-exports",
"lint",
"markdownlint",
"stylelint"
Expand Down
14 changes: 14 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,13 @@ [email protected]:
dependencies:
natural-compare-lite "^1.4.0"

[email protected]:
version "0.9.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-sort-exports/-/eslint-plugin-sort-exports-0.9.1.tgz#f9641d80d8237e0994bfd9aad38fa8e6d07dfa91"
integrity sha512-2w6jHusdF2K60bcGKpa9HEinETwNzVrvplZipVculCfu3ZDd5IW3xL54XVEnVkGIPJnp/LitFCg7owL4DOtuHg==
dependencies:
minimatch "^9.0.3"

eslint-scope@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-8.0.1.tgz#a9601e4b81a0b9171657c343fb13111688963cfc"
Expand Down Expand Up @@ -3625,6 +3632,13 @@ minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

minimatch@^9.0.3:
version "9.0.5"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.5.tgz#d74f9dd6b57d83d8e98cfb82133b03978bc929e5"
integrity sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==
dependencies:
brace-expansion "^2.0.1"

minimatch@^9.0.4:
version "9.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51"
Expand Down

0 comments on commit 276092b

Please sign in to comment.