ESLint JSON processor and rules
With the recent official support of ESLint TypeScript config ([ref](https://eslint.org/docs/latest/use/configure/configuration-files#typescript-configuration-files)), when trying to use `eslint-plugin-json-files` with this simple config in my `eslint.config.ts` (flatfile format): ```js { files: ['**/package.json'], plugins: { 'json-files': jsonFilesPlugin, }, processor: jsonFilesPlugin.processors.json, rules: { // Requires the `license` field in package.json. // @see https://github.com/kellyselden/eslint-plugin-json-files/blob/master/docs/rules/require-license.md 'json-files/require-license': ['error', 'allow-unlicensed'], // Prevents dependency collisions between `dependencies` and `devDependencies` in package.json. // @see https://github.com/kellyselden/eslint-plugin-json-files/blob/master/docs/rules/require-unique-dependency-names.md 'json-files/require-unique-dependency-names': ['error'], // Use sort-package-json to keep your keys in a predictable order. // @see https://github.com/kellyselden/eslint-plugin-json-files/blob/master/docs/rules/sort-package-json.md 'json-files/sort-package-json': ['error'], }, }, ``` I'm getting `Unsafe assignment of an error typed value` errors both when assigning the `plugins` and the `processor` as well as a `Unsafe member access .processors on an 'error' typed value` error on the processor value. I think that both these error are cause by the lack of type file. I created a tempoary `d.ts` file to work around this issue but it would be great if this would be part of the original package: ```ts declare module 'eslint-plugin-json-files' { import type { Linter, Rule } from 'eslint' const plugin: { processors: { json: Linter.Processor } configs?: Record<string, Linter.Config> rules?: Record<string, Rule.RuleModule> } export default plugin } ```
This issue appears to be discussing a feature request or bug report related to the repository. Based on the content, it seems to be still under discussion. The issue was opened by nbouvrette and has received 0 comments.