openreachtech / eslint-rules-default-jest

A showcasing package all the Jest plugin rules of ESLint.
MIT License
0 stars 0 forks source link

๐Ÿงน Fix type error of exported object #16

Closed StewEucen closed 5 months ago

StewEucen commented 5 months ago

Overview

Resolve

declare module '@openreachtech/eslint-rules-default-jest' {
  const config: import('eslint').ESLint.ConfigData<import('eslint').ESLint.LintOptions>

  export = config
}
import {
  ESLint,
} from 'eslint'

declare module '@openreachtech/eslint-rules-default-jest' {
  const config: ESLint.ConfigData<ESLint.LintOptions>

  export = config
}

Reference

Tasks

StewEucen commented 5 months ago
// @ts-check

/** @typedef {import('eslint').ESLint.ConfigData} ConfigData */

/** @type {ConfigData} */
const config = {
  extends: [
    '@munierujp/eslint-config-typescript'
  ],
  parserOptions: {
    project: './tsconfig.json'
  }
}

module.exports = config