Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flat config types with typescript #299

Closed
Slessi opened this issue Jun 21, 2024 · 1 comment
Closed

Flat config types with typescript #299

Slessi opened this issue Jun 21, 2024 · 1 comment
Labels

Comments

@Slessi
Copy link

Slessi commented Jun 21, 2024

README says to do:

import playwright from 'eslint-plugin-playwright';

export default [
  {
    ...playwright.configs['flat/recommended'],

However I'm getting:

Property 'configs' does not exist on type 'typeof import("/Users/edward/Projects/frontend/node_modules/eslint-plugin-playwright/dist/index")'.

Maybe because I used require since I'm using CJS still? 🤷

const playwright = require('eslint-plugin-playwright');

module.exports = [
  {
    ...playwright.configs['flat/recommended'], // error

Are the docs wrong or the types wrong? Should I be doing playwright.default.configs['flat/recommended']? As the dist/index.d.ts has:

import * as eslint from 'eslint';

declare const _default: { /*stuff*/ };

export { _default as default };
Copy link

🎉 This issue has been resolved in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant