@beequeue/eslint-plugin

My opinionated, modular ESLint configs

Usage no npm install needed!

<script type="module">
  import beequeueEslintPlugin from 'https://cdn.skypack.dev/@beequeue/eslint-plugin';
</script>

README

@beequeue/eslint-plugin

My extensive, opinionated ESLint configs.

Modular config presets that can be mixed and matched!

  • Basic Javascript: plugin:@beequeue/base
  • TypeScript: plugin:@beequeue/typescript
  • Node: plugin:@beequeue/node
  • GraphQL (requires additional configuration, see Usage)
    • Client: plugin:@beequeue/graphql-client
    • Server: plugin:@beequeue/graphql-server
  • React: plugin:@beequeue/react
    • NextJS: plugin:@beequeue/nextjs
  • Vue: plugin:@beequeue/vue
    • Vue 2: plugin:@beequeue/vue2
  • Electron: plugin:@beequeue/electron
  • Prettier: plugin:@beequeue/prettier

Usage

  • npm i -D @beequeue/eslint-plugin
  • yarn add -D @beequeue/eslint-plugin
// .eslintrc.js
module.exports = {
  root: true,
  // If you use a GraphQL preset you need to provide additional data for the plugin to work with
  parserOptions: {
    // Path or link to the GraphQL schema
    schema: "https://graphql.example.com",
    // If you use the Client preset you also need to provide globs to your operation files
    operations: ["src/**/*.{js,ts,graphql}"],
  },
  extends: [
    // The base rules are always required
    "plugin:@beequeue/base",
    
    // Any other presets you need
    "plugin:@beequeue/graphql",
    "plugin:@beequeue/typescript",
    
    // Add the prettier preset **at the end** if you use it
    "plugin:@beequeue/prettier",
  ],
}