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

Recommended rules are configured with numbers, but TS-eslint expects strings #377

Open
ChrisMBarr opened this issue Dec 18, 2024 · 0 comments
Labels

Comments

@ChrisMBarr
Copy link

Describe the bug

When using @ts-check in my eslint config file, it complains about the recommended rules from this plugin not matching the expected typedefs

To Reproduce
my config:

// @ts-check

import globals from 'globals';
import tseslint from 'typescript-eslint';
import eslintPluginJasmine from 'eslint-plugin-jasmine';

export default tseslint.config(
  {
    files: ['**/*.spec.ts'],
    plugins: { jasmine: eslintPluginJasmine },
    languageOptions: {
      globals: {
        ...globals.node,
        ...globals.jasmine,
      },
    },
    extends: [ eslintPluginJasmine.configs.recommended ],
  },
);

Produces this error

image

Basically what I interpret it to be saying is that the rules should be configured with strings, not numbers

Expected behaviour
Recommended rules should be configured with 'off' instead of 0, 'warn' instead of 1, and 'error' instead of 2

A workaround for me right now is to simply add a @ts-ignore comment:

extends: [
  //@ts-ignore -- This does not match the expected typedefs, however it DOES work
  eslintPluginJasmine.configs.recommended,
],

Context

  • Node.js version: 20.17.0
  • eslint-plugin-jasmine version: 4.2.2
  • eslint version: 9.17.0
  • Operating system: Windows 11
@ChrisMBarr ChrisMBarr added the bug label Dec 18, 2024
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