ESLint Config Automator

ESLint 9+ rules for ESM projects.

Prequisites

  1. Use Volta to install Node/npm
  2. If you don't have a package.json do npm init -y first
  3. Run npm pkg set type=module
  4. Create an eslint.config.js next to the package.json
  5. Run npm pkg set scripts.lint="eslint *.js src"
    • Change *.js src to your files and folders you want to be linted

6. Check the boxes below for what linting rules/plugins you want: Show details

JS TJW JS ESM Import TJW Import Import Alias Vue 2 Vue 3 TJW Vue Vue A11Y TJW JSDoc TJW Jest TJW Vitest

Important:

You will also need to create an empty .eslintrc.cjs file next to your package.json, due to a known bug with the import linting plugin.

7. Run this:

8. Put this in your eslint.config.js:

9. Run npm run lint


Documentation links