tslint-rule-sorted-lines

Ensure that a range of lines is in alphabetical order. If they aren't, run `tslint --fix` to fix them. Nice!

Usage no npm install needed!

<script type="module">
  import tslintRuleSortedLines from 'https://cdn.skypack.dev/tslint-rule-sorted-lines';
</script>

README

tslint-rule-sorted-lines

Ensure that a range of lines is in alphabetical order. If they aren't, run tslint --fix to fix them. Nice!

Example:

// BEGIN SORTED BLOCK
const a = "a";
const b = "b";
const c = "c";
// END SORTED BLOCK

Example tsconfig:

{
  "extends": ["tslint-rule-sorted-lines"],
  "rules": {
    "sortedLines": true
  }
}