3.3.0 • Published 1 year ago

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

Weekly downloads
28,154
License
ISC
Repository
github
Last release
1 year 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-zohyeslint-config-ethang-test@wonse/eslint-configsysgears-linter-configswttj-config@ygorconfig/eslintkickass-ui@washingtondc/eslint@westpac/eslint-config@websummit/codestyle@websummit/eslint-config@websummit/eslint-config-codestyle@wonse/eslint-config-react@xeraph-dev/eslint-config@tuling-ai/lint@u3u/eslint-config@termsurf/task@todomir/eslint-config@thedaviddias/eslint-config@voltiso/eslint-config@voltiso/eslint-config-fast@youversion/eslint-config-typescript@termsurf/base@pandora-box/eslint-config-typescript@parsleyhealth/eslint-config-cephalopod@npmextras/eslint-config@hillertnext/hx-service-dev-dependencies@hillertnext/hx-storybook-dev-dependencies@hermeznetwork/eslint-config-react-ts@nimashoghi/eslint-config@ineedj/eslintrc@ijlee2-frontend-configs/eslint-config-ember@ijlee2-frontend-configs/eslint-config-node@iden3/eslint-config-react-ts@powership/babel-plugins@powership/boilerplatefx-style@shiftsmartinc/dotfiles@storiny/eslint-config@techsky/eslint-config@spotmonkeystudios/eslint-config@swind/babel-plugins@swind/boilerplatedzuelu-eslint-configeslint-config-rbower-typescripteslint-config-pikadude-tseslint-config-phseslint-config-resourgeeslint-config-resourge-typescripteslint-config-rollupeslint-config-tidgieslint-config-usefuleslint-config-snaileslint-config-unioneslint-config-strict-modeeslint-config-stemond-beeslint-config-stemond-feeslint-config-skylighteslint-config-tchoupinaxeslint-config-shellscapeeslint-config-vujitaeslint-config-djseslint-config-djs-reacteslint-config-bananaeslint-config-aftteslint-config-fabulatoreslint-config-everywhereeslint-config-jag-nodejseslint-config-mahireslint-config-madoeslint-config-jteslint-config-neoneslint-config-harriseslint-config-gbrachettaeslint-config-gbrachetta-stylisticeslint-config-sandokaneslint-config-sentry-react@1pedro/eslint-config@abizzle/eslint-config-abizzle@primarykids/eslint-config-typescript@ptb/eslint-config@psdevs/eslint-config@blake.regalia/eslint-config-elite@brionmario/eslint-plugin@byintera/eslint-config@centreon/js-config
3.3.0

1 year ago

3.2.0

2 years ago

3.1.0

2 years ago

3.0.0

2 years ago

2.3.0

3 years ago

2.2.0

3 years ago

2.1.0

4 years ago

2.0.0

4 years ago

1.8.0

4 years ago

1.7.0

4 years ago

1.6.0

5 years ago

1.5.0

5 years ago

1.4.0

5 years ago

1.3.0

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.1.0-rc1

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0-rc1

5 years ago

0.10.0

5 years ago

0.9.0

5 years ago

0.8.0

6 years ago

0.7.0

6 years ago

0.6.0

6 years ago

0.5.0

6 years ago

0.4.0

6 years ago

0.3.0

6 years ago

0.2.0

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago