0.3.0 • Published 3 months ago

eslint-plugin-sort-destructure-keys-typescript v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

eslint-plugin-sort-destructure-keys-typescript

npm version npm downloads

ESLint plugin rules to sort destructure keys, JSX attributes, and object properties by TypeScript type order. The plugin requires parserServices to be generated. You must therefore provide a value for the parserOptions.project property for @typescript-eslint/parser.

demo-combined.gif

sort-object-properties-by-type.png

Rules List

Configuration

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

Add to your eslint.config.js

import typescriptEslintParser from "@typescript-eslint/parser";
import sortDestructureKeysConfig from "eslint-plugin-sort-destructure-keys-typescript/config";

export default [
  // other settings...
  {
    // set up typescript-eslint
    languageOptions: {
      parser: typescriptEslintParser,
      parserOptions: {
        project: true,
        tsconfigRootDir: import.meta.dirname,
      },
    },
  },
  sortDestructureKeysConfig(),
];

License

MIT License © 2024-PRESENT Nir Tamir

Thanks

0.3.0

3 months ago

0.2.0

4 months ago

0.1.0

4 months ago

0.0.8

4 months ago

0.0.7

4 months ago

0.0.5

5 months ago

0.0.4

5 months ago

0.0.6

4 months ago

0.0.1

11 months ago

0.0.3

10 months ago

0.0.2

10 months ago

2.3.4

11 months ago