Last active
June 8, 2019 14:45
-
-
Save corysimmons/d6ee1c9c4a5e557980e4da20ce01e1d3 to your computer and use it in GitHub Desktop.
With ESLint, eslint-plugin-autofix, and eslint-plugin-import you can replace VSCode's buggy `organizeImports` setting with ESLint and organize imports for an entire project in one CLI `$ yarn lint --fix`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"lint": "eslint '{,!(node_modules)/**/}*.js'" | |
}, | |
"eslintConfig": { | |
"plugins": [ | |
"autofix", | |
"import" | |
], | |
"rules": { | |
"autofix/no-unused-vars": "error", | |
"import/order": [ | |
"error", | |
{ | |
"groups": [ | |
[ | |
"builtin", | |
"external" | |
], | |
[ | |
"parent", | |
"sibling", | |
"index" | |
] | |
], | |
"newlines-between": "always" | |
} | |
] | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment