-
-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
acceptedbugSomething isn't workingSomething isn't workingrepro:yesIssues with a reproducible exampleIssues with a reproducible example
Description
Environment
ESLint version: 9.39.0
@eslint/json version: 0.13.2
Node version: v20.19.1
npm version: 10.8.2
Operating System: Stackblitz webcontainer
Which language are you using?
json
What did you do?
Just as from the README
Configuration
import { defineConfig } from 'eslint/config';
import json from '@eslint/json';
/**
* @returns {import('eslint').Linter.Config[]}
*/
export function createJsonConfig() {
return defineConfig([
{
name: 'JSON files',
files: ['**/*.json'],
ignores: ['package-lock.json'],
plugins: { json },
language: 'json/json',
extends: [json.configs.recommended],
},
{
name: 'JSONC files',
files: [
'**/*.jsonc',
'**/tsconfig.json',
'**/tsconfig.*.json',
'.vscode/**/*.json',
'renovate.json',
],
plugins: { json },
language: 'json/jsonc',
extends: [json.configs.recommended],
},
{
name: 'JSON5 files',
files: ['**/*.json5'],
plugins: { json },
language: 'json/json5',
extends: [json.configs.recommended],
},
]);
}
What did you expect to happen?
no typescript errors
What actually happened?
Typescript error
eslint.config.mjs:7:7 - error TS2322: Type 'typeof plugin' is not assignable to type 'Plugin'.
Types of property 'rules' are incompatible.
See https://stackblitz.com/edit/stackblitz-starters-4dbwc63k
Link to Minimal Reproducible Example
https://stackblitz.com/edit/stackblitz-starters-4dbwc63k
Participation
- I am willing to submit a pull request for this issue.
Additional comments
We ran into this at mui/mui-public#774
Metadata
Metadata
Assignees
Labels
acceptedbugSomething isn't workingSomething isn't workingrepro:yesIssues with a reproducible exampleIssues with a reproducible example
Type
Projects
Status
Complete