Registry /
testing / eslint-plugin-sort-export-all
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslnode 18–226 runs
build_error
glibcnode 18–226 runs
build_error
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
sortExportAllConfig
✓ import sortExportAllConfig from 'eslint-plugin-sort-export-all/config'
✗ const sortExportAllConfig = require('eslint-plugin-sort-export-all/config')
The config export is provided as a named default from a separate sub-path. In CommonJS using require() may still work but is untested; prefer ESM syntax as the plugin is ESM-first.
eslintPluginSortExportAll
✓ import eslintPluginSortExportAll from 'eslint-plugin-sort-export-all'
✗ const eslintPluginSortExportAll = require('eslint-plugin-sort-export-all').default
The main plugin export is a default ESM export. Using require() with .default works but is not recommended; use ESM imports for compatibility with ESLint 9 flat config.
sort-export-all/sort-export-all
✓ 'sort-export-all/sort-export-all': 'warn'
✗ 'sort-export-all': 'warn'
The rule must be referenced with its full name including the plugin namespace prefix. Mistakenly using just the rule name will not trigger the rule.
sort-export-all
✓ plugins: { 'sort-export-all': eslintPluginSortExportAll }
✗ plugins: { sortExportAll: eslintPluginSortExportAll }
The plugin key in the plugins object must be 'sort-export-all' (kebab-case) to match the rule prefix. Using camelCase will cause rule resolution failure.
Shows ESLint flat config setup using the provided config helper or manual plugin registration, with an example of how the rule sorts star exports.
// eslint.config.js
import sortExportAllConfig from 'eslint-plugin-sort-export-all/config';
export default [
sortExportAllConfig(),
// additional config...
];
// Or manually:
import eslintPluginSortExportAll from 'eslint-plugin-sort-export-all';
export default [
{
plugins: {
'sort-export-all': eslintPluginSortExportAll,
},
rules: {
'sort-export-all/sort-export-all': 'warn',
},
},
];
// Example file that will be fixed:
// input: export * from 'c'; export * from 'a';
// output: export * from 'a'; export * from 'c';
Errors
Common errors & fixes
Error: Cannot find module 'eslint-plugin-sort-export-all/config'
Mistakenly trying to require() the config sub-path in a CommonJS context.
fixUse dynamic import or switch to ESM: `const sortExportAllConfig = (await import('eslint-plugin-sort-export-all/config')).default;` ESLint: Configuration for rule "sort-export-all/sort-export-all" is invalid. Value "error" should be string.
Rule configured with a severity number or object instead of a string like 'error' or 'warn'.
fixUse rule: 'sort-export-all/sort-export-all': 'warn' or ['warn', { ...options }]. TypeError: eslintPluginSortExportAll is not a function
Using require('eslint-plugin-sort-export-all') in CJS without .default.
fixUse `const eslintPluginSortExportAll = require('eslint-plugin-sort-export-all').default;` or switch to ESM import. ESLint couldn't find the plugin "sort-export-all".
Plugin key in flat config is misspelled or not correctly registered under plugins object.
fixEnsure plugins: { 'sort-export-all': eslintPluginSortExportAll } exactly as shown. Audit
Dependencies
eslintrequiredESLint plugin, requires ESLint to run