@compeon/eslint-plugin-compeon

Eslint plugin for compeon rules

Usage no npm install needed!

<script type="module">
  import compeonEslintPluginCompeon from 'https://cdn.skypack.dev/@compeon/eslint-plugin-compeon';
</script>

README

eslint-plugin-compeon rules

sort-imports

This rule checks the order of (ES-) module imports. The default order is:

1. External dependencies (everything from `/node_modules/`)
2. Internal dependencies
3. CSS imports

NOTE: This is totally up for discussion, just felt like this is the order that makes the most sense.

Each of those groups has to be padded by a blank line. All errors reported by this rule are fixable with the --fix flag.

The order can be specified by setting an order option:

"compeon/sort-imports": [2, { "order": ["internal", "external", "css"] }]

sort-keys

This rule lets you specify files where you want your object keys sorted. (imagine locales, configs etc). Currently supported orders:

  • ascending
"compeon/sort-keys": [2, { "files": ["./src/config/locales/de.js"] }]

All errors reported by this rule are fixable with the --fix flag.