eslint-plugin-sort-destructure-keys-typescript
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

eslint-plugin-sort-destructure-keys-typescript

npm version npm downloads

ESLint plugin rules to sort destructure keys by typescript type order. This rule requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

demo.gif

Rules List

Configuration

pnpm add -D eslint-plugin-sort-destructure-keys-typescript

Add to your eslint.config.js

export default {
  files: ["**/*.?([cm])tsx", "**/*.?([cm])ts"],
  languageOptions: {
    parserOptions: {
      project: true,
      tsconfigRootDir: import.meta.dirname,
    },
  },
  plugins: {
    "sort-destructure-keys-typescript": sortDestructureKeysPlugin,
  },
  rules: {
    "sort-destructure-keys-typescript/sort-destructure-keys-by-type": "error",
  },
};

License

MIT License © 2024-PRESENT Nir Tamir

Thanks

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-sort-destructure-keys-typescript

Weekly Downloads

11

Version

0.0.3

License

MIT

Unpacked Size

16.8 kB

Total Files

8

Last publish

Collaborators

  • nirtamir2