3.2.0 • Published 2 months ago

eslint-plugin-typescript-sort-keys v3.2.0

Weekly downloads
28,154
License
ISC
Repository
github
Last release
2 months ago

Tests

eslint-plugin-typescript-sort-keys

Sort interface and string enum keys

Inspired by and sourced from eslint/sort-keys

Installation

You'll first need to install

yarn add -D eslint typescript @typescript-eslint/parser

Next, install eslint-plugin-typescript-sort-keys:

yarn add -D eslint-plugin-typescript-sort-keys

Note: If you installed ESLint globally then you must also install eslint-plugin-typescript-sort-keys globally.

Usage

Specify the parser for typescript files in your .eslintrc configuration file:

{
  "parser": "@typescript-eslint/parser"
}

Add typescript-sort-keys to the plugins section. You can omit the eslint-plugin- prefix:

{
  "plugins": ["typescript-sort-keys"]
}

Then configure the rules you want to use under the rules section.

{
  "rules": {
    "typescript-sort-keys/interface": "error",
    "typescript-sort-keys/string-enum": "error"
  }
}

Or enable all rules with defaults

{
  "extends": ["plugin:typescript-sort-keys/recommended"]
}

Supported Rules

Key: :heavy_check_mark: = recommended, :wrench: = fixable

NameDescription:heavy_check_mark::wrench:
typescript-sort-keys/interfacerequire interface keys to be sorted:heavy_check_mark::wrench:
typescript-sort-keys/string-enumrequire string enum members to be sorted:heavy_check_mark::wrench:
@tractorzoom/eslint-config@jiralite/eslint-config-neon@alfabank/eslint-config-site@onesimpleone/configs@coreyander/eslint-config-typescripteslint-config-rbowereslint-config-sunrocketzeslint-config-sunrocketz-node@befluent/linter@aldertv/eslint-config@infinitebrahmanuniverse/nolb-eslint-plugin-t@cneuro/eslint-config-alpha@befluentclass/linter@everything-registry/sub-chunk-1615eslint-config-zohy@cpsoinos/eslint-config-typescriptwttj-config@geneticure/util@dkimura/eslint-config@dlwlrma/eslint-plugin-angular@dlwlrma/eslint-plugin-angular-testing@westpac/eslint-config@denaro-config/eslint-config-typescript@foxy.io/eslint-config@cyrilolanolan/eslint-config-ts@cyber-walrus/eslint-configconsequunturdolor@hermeznetwork/eslint-config-react-ts@hillertnext/hx-service-dev-dependencies@hillertnext/hx-storybook-dev-dependencieseslint-config-line@codiverse/eslint-configdzuelu-eslint-configeslint-config-everywhereeslint-config-ethang-testeslint-config-neoneslint-config-pikadude-tseslint-config-phseslint-config-mahireslint-config-jag-nodejseslint-config-gbrachettaeslint-config-gbrachetta-stylisticeslint-config-harriseslint-config-jteslint-config-madoeslint-config-djseslint-config-djs-reacteslint-config-dolmioseslint-config-current-thingeslint-config-canonicaleslint-config-bananaeslint-config-airbnb-typescript-baseeslint-config-aftteslint-config-fabulatoreslint-config-rollupeslint-config-tchoupinaxeslint-config-tidgieslint-config-sentry-reacteslint-config-resourgeeslint-config-resourge-typescripteslint-config-shellscapeeslint-config-usefuleslint-config-rbower-typescripteslint-config-strict-modeeslint-config-vujitafx-styleeslint-config-skylighteslint-config-stemond-beeslint-config-stemond-feeslint-config-snail@nexusmods/eslint-config-nexusmods@nexusmods/eslint-plugin-nexusmodsopenlayer@newsteam/eslint@nkzw/eslint-configparallax-common-config@datacamp/eslint-config@darajs/eslint-config@dan28/eslint-config-typescript@damjack/elm-newrelic-nreum.jskickass-ui@liveauctioneers/eslint-config-hammer-ui@matali/eslint-config@marcbouchenoire/eslint-config@mallowigi/eslint-config@mblabs/eslint-config@micheldever/eslint-config@megabytelabs/eslint-config@mnao305/eslint-config@modiohealth/eslint-config@myposter/eslint-config@lastline/eslint-config-lastline-react@larvit/eslint-config-typescript-esm@lobehub/lint@lioness100/configs@lovverhub/config@lsagetlethias/eslint-config@lottiefiles/eslint-plugin@keegan-lillo/eslint-config-typescript@kentayamada-dev/eslint-config-base
3.2.0

2 months ago

3.1.0

7 months ago

3.0.0

8 months ago

2.3.0

1 year ago

2.2.0

1 year ago

2.1.0

2 years ago

2.0.0

3 years ago

1.8.0

3 years ago

1.7.0

3 years ago

1.6.0

3 years ago

1.5.0

4 years ago

1.4.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.1.0-rc1

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0-rc1

4 years ago

0.10.0

4 years ago

0.9.0

4 years ago

0.8.0

4 years ago

0.7.0

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago