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

[typscript: no-useless-constructor] For constructor with parameter #147

Closed
tobiasdiez opened this issue Mar 8, 2021 · 1 comment
Closed
Labels
nuxt2-legacy Issues related to the legacy Nuxt 2 eslint config

Comments

@tobiasdiez
Copy link

Using extends: ['@nuxtjs/eslint-config-typescript'] with no further plugins or extensions enabled, the following code

export default class AuthService {
  constructor (private prisma: PrismaClient) { }
}

produces a "Useless constructor no-useless-constructor" error.

This error disappears with the plain typescript config:

parser: '@typescript-eslint/parser',
  plugins: [
    '@typescript-eslint',
  ],
  extends: [
    'eslint:recommended',
    'plugin:@typescript-eslint/recommended',
  ],
@antfu antfu added the nuxt2-legacy Issues related to the legacy Nuxt 2 eslint config label Mar 19, 2024
@antfu
Copy link
Member

antfu commented Jan 30, 2025

This issue was created for the legacy configs for Nuxt 2, which have been deprecated for a while and removed recently in #534. The issue is likely no longer relevant to the latest version. If you still have a similar issue with the latest config, please open a new issue with minimal reproduction. Thanks.

@antfu antfu closed this as completed Jan 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nuxt2-legacy Issues related to the legacy Nuxt 2 eslint config
Projects
None yet
Development

No branches or pull requests

2 participants