-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support ESLint 9 and typescript-eslint 7 (#249)
## PR Checklist - [x] Addresses an existing open issue: fixes #142 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Adds an `eslint-plugin-expect-type/configs/recommended` export with the new shape. Touches up the README.md to emphasize flat config over legacy too. Also prefers `context.filename` over `context.getFilename()` per https://eslint.org/blog/2023/05/eslint-v8.40.0-released.
- Loading branch information
1 parent
d8dbbec
commit 039e3d8
Showing
8 changed files
with
133 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { plugin, recommendedRuleSettings } from "../plugin.js"; | ||
|
||
const recommended = { | ||
plugins: { | ||
"expect-type": plugin, | ||
}, | ||
rules: recommendedRuleSettings, | ||
}; | ||
|
||
export default recommended; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import { rules } from "./rules/index.js"; | ||
import { recommendedRuleSettings } from "./plugin.js"; | ||
|
||
export { rules } from "./rules/index.js"; | ||
|
||
export const configs = { | ||
recommended: { | ||
rules: Object.keys(rules).reduce<Record<string, "error">>( | ||
(acc, name) => ({ ...acc, [`expect-type/${name}`]: "error" as const }), | ||
{}, | ||
), | ||
plugins: ["expect-type"], | ||
rules: recommendedRuleSettings, | ||
}, | ||
}; |
Oops, something went wrong.