Skip to content

📚 Basic TypeScript types #142

@scagood

Description

@scagood

We should probably look to add some super basic types I currently use:

declare module 'eslint-plugin-n' {
    import type { ESLint, Linter, Rule } from 'eslint';

    export default {} as {
        meta: {
            name: string;
            version: string;
        };
        rules: Record<string, Rule.RuleModule>;
        configs: {
            'recommended-module': ESLint.ConfigData
            'recommended-script': ESLint.ConfigData
            'recommended': ESLint.ConfigData
            'flat/recommended-module': Linter.FlatConfig
            'flat/recommended-script': Linter.FlatConfig
            'flat/recommended': Linter.FlatConfig
            'flat/mixed-esm-and-cjs': Linter.FlatConfig
        }
    };
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions