Skip to content

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

@ChrisMBarr

Description

@ChrisMBarr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions