Skip to content

Package

eslint-plugin v0.4.3

Changelog

seedcordseedcord

The whole Discord bot, typed end to end

Website · Guide · Reference · Discord

npm node bun license

About

@seedcord/eslint-plugin holds the ESLint rules for seedcord bots. The seedcord preset layers these over eslint-plugin-discordjs's recommended, so one entry covers the framework rules and the discord.js rules together.

The preset suits a project carrying its own ESLint config. A project on @seedcord/eslint-config turns the same rules on with registerSeedcordPlugin and registerDiscordjsPlugin.

Until v1.0.0, minor versions can break.

Installation

pnpm add -D @seedcord/eslint-plugin

Usage

// eslint.config.js
import { defineConfig } from 'eslint/config';
import seedcord from '@seedcord/eslint-plugin';
import tseslint from 'typescript-eslint';

export default defineConfig(
    // ...your existing config
    {
        files: ['**/*.ts'],
        extends: [seedcord.configs.seedcord],
        languageOptions: {
            parser: tseslint.parser,
            parserOptions: {
                projectService: true,
                tsconfigRootDir: import.meta.dirname
            }
        }
    }
);

The rules read types, so they need typed linting (projectService). If your config already sets it up, drop the languageOptions block and keep the scoped extends entry.