sindresorhus / eslint-plugin-unicorn

More than 100 powerful ESLint rules
MIT License
4.16k stars 359 forks source link

With type check, I'm getting `Types of property 'name' are incompatible. Type 'boolean' is not assignable to type 'string'.` #2399

Closed huseeiin closed 1 month ago

huseeiin commented 2 months ago
// @ts-check

import js from '@eslint/js'
import stylistic from '@stylistic/eslint-plugin'
import svelte from 'eslint-plugin-svelte'
import eslintPluginUnicorn from 'eslint-plugin-unicorn'
import globals from 'globals'
import ts from 'typescript-eslint'

export default ts.config(stylistic.configs['recommended-flat'],
  eslintPluginUnicorn.configs['flat/recommended'],
  js.configs.recommended,
  ...ts.configs.recommended,
  ...svelte.configs['flat/recommended'],
  {
    plugins: {
      '@stylistic': stylistic,
    },
    languageOptions: { globals: { ...globals.browser, ...globals.node } } },
  {
    files: ['**/*.svelte'],
    languageOptions: { parserOptions: { parser: ts.parser } },
  },
  { ignores: ['build/', '.svelte-kit/', 'dist/'] })
ST-DDT commented 1 month ago

FFR: Will likely be fixed by https://github.com/sindresorhus/eslint-plugin-unicorn/pull/2382

But there is no release with that commit yet.

fregante commented 1 month ago

Try the latest version

https://github.com/sindresorhus/eslint-plugin-unicorn/releases/tag/v55.0.0