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

Open
tobiasdiez opened this issue Mar 8, 2021 · 0 comments
Open
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
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