eslint-plugin-import-order-autofix
This plugin is an extension of the lovely and more stable eslint-plugin-import to enable --fix
for import/order.
With this change import order set by "groups"
and "newlines-between
" will when run with --fix
attempt to reorder and properly newline your imports.
Setup
npm install --save eslint-plugin-
Configuration
In your .eslintrc
add "import-order-autofix"
to your plugins, and
add "import-order-autofix/order"
to your rules. For additional information see the docs order
Examples
const fs = ;const get = ;const path = ;const uniq = ;const generateDemo = ; const extensionize stripBasename } = ;
will be turned into
const path = ; const fs = ;const get = ;const uniq = ; const generateDemo = ;const extensionize stripBasename } = ;