Skip to content

benadamstyles/eslint-config

Repository files navigation

@benadamstyles/eslint-config

Various eslint configs for my personal use. My approach with all of these is:

  • Extend the recommended configs for all plugins (including eslint itself)
  • Tweak where it I diagree with the recommended or want extra lints
  • Don't use any stylistic lints, rely on Prettier for those instead

Available configs and inheritance

NOTE: when extending any of these configs, you will need to set parserOptions.ecmaVersion (not required for the TypeScript config as it uses its own parser) and env for your project.

Some of the configs make no sense without another one, in such cases they extend it so you don't need to. Bear in mind that extend order is important – for example, you'll need to extend the TypeScript config after the React one so that the TypeScript one can fix any eslint rules that don't work with TS syntax.

Also note that peer dependencies for eslint configs are set in package.json so you will get warned about the peerDependencies for the React config even if you're not extending it.

Top-level await

Top-level await (TLA) is available in Node v14+, but not currently supported by eslint. To use it with this eslint config, you will need to extend the flow config (because that uses @babel/eslint-parser which does support TLA) and make sure you have the @babel/plugin-syntax-top-level-await plugin in your own project's Babel config.

Contributing

This package uses semantic-release with the default settings applied, to manage releases.