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)
- React:
plugin:@beequeue/reactNextJS:plugin:@beequeue/nextjs
- Vue:
plugin:@beequeue/vue- Vue 2:
plugin:@beequeue/vue2
- Vue 2:
- Electron:
plugin:@beequeue/electron - Prettier:
plugin:@beequeue/prettier
Usage
npm i -D @beequeue/eslint-pluginyarn 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",
],
}