Skip to content

Commit

Permalink
fix(types): fix types of flat configs
Browse files Browse the repository at this point in the history
  • Loading branch information
CHC383 committed Jan 14, 2025
1 parent e6b5b41 commit 063db21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,14 @@ const configs = {
'react/jsx-uses-react': SEVERITY_OFF,
},
},
flat: /** @type {Record<string, ReactFlatConfig>} */ ({
flat: /** @type {Record<"recommended"|"all"|"jsx-runtime", ReactFlatConfig>} */ ({
__proto__: null,
}),
};

/** @typedef {{ plugins: { react: typeof plugin }, rules: import('eslint').Linter.RulesRecord, languageOptions: { parserOptions: import('eslint').Linter.ParserOptions } }} ReactFlatConfig */

/** @type {{ deprecatedRules: typeof deprecatedRules, rules: typeof allRules, configs: typeof configs & { flat: Record<string, ReactFlatConfig> }}} */
/** @type {{ deprecatedRules: typeof deprecatedRules, rules: typeof allRules, configs: typeof configs & { flat: Record<"recommended"|"all"|"jsx-runtime", ReactFlatConfig> }}} */
const plugin = {
deprecatedRules,
rules: allRules,
Expand Down

0 comments on commit 063db21

Please sign in to comment.