-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from AndreaPontrandolfo/AndreaPontrandolfo/is…
…sue167 feat(blog): Release 25
- Loading branch information
Showing
2 changed files
with
97 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
--- | ||
slug: sheriff-v-25 | ||
title: Full v9 compatibility achieved internally | ||
authors: [andrea] | ||
tags: [sheriff, eslint, remeda, types] | ||
image: /img/sheriff_blog_post_3.png | ||
--- | ||
|
||
import ThemedImage from "@theme/ThemedImage"; | ||
import useBaseUrl from "@docusaurus/useBaseUrl"; | ||
|
||
<ThemedImage | ||
alt="Sheriff BlogPost Poster" | ||
sources={{ | ||
light: useBaseUrl("/img/sheriff_blog_post_3.png"), | ||
dark: useBaseUrl("/img/sheriff_blog_post_3.png"), | ||
}} | ||
/> | ||
|
||
{/* truncate */} | ||
|
||
## Sheriff release v25 | ||
|
||
This release introduces key updates to Sheriff: | ||
|
||
## ESLint V9 APIs Compatibility | ||
Sheriff now fully supports ESLint V9 APIs for all plugins. [Milestone](https://github.com/AndreaPontrandolfo/sheriff/milestone/1?closed=1). | ||
|
||
There were some [problematic](https://github.com/facebook/react/issues/28313) plugins that could cause crashes in some instances, like [eslint-plugin-react-hooks](https://www.npmjs.com/package/eslint-plugin-react-hooks) and [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import/tree/main). | ||
|
||
Now all plugins have been updated to their V9-compatible versions, resolving these issues. | ||
|
||
## Added `eslint-plugin-remeda` | ||
Added support for [remeda](https://github.com/remeda/remeda) with [eslint-plugin-remeda](https://github.com/AndreaPontrandolfo/eslint-plugin-remeda). | ||
|
||
If you use Remeda instead of Lodash, you should now disable `lodash` in the config and enable `remeda`. | ||
|
||
```js title="eslint.config.js" | ||
import sheriff from "eslint-config-sheriff"; | ||
import { defineFlatConfig } from "eslint-define-config"; | ||
|
||
const sheriffOptions = { | ||
react: false, | ||
next: false, | ||
astro: false, | ||
// highlight-start | ||
lodash: false, | ||
remeda: true, | ||
// highlight-end | ||
playwright: false, | ||
jest: false, | ||
vitest: false, | ||
}; | ||
|
||
export default defineFlatConfig([...sheriff(sheriffOptions)]); | ||
``` | ||
|
||
## Unified Type Exports | ||
The types previously exported from `@sherifforg/types` are now exported directly from `eslint-config-sheriff`. | ||
|
||
The `@sherifforg/types` package is now deprecated. You can safely remove it and update your imports accordingly. | ||
|
||
## Compliance with the native Typescript support for the `eslint.config.ts` file | ||
|
||
Sheriff moved away from [eslint-ts-patch](https://github.com/antfu/eslint-ts-patch) and adopted the [native support for TypeScript](https://eslint.org/blog/2024/08/eslint-v9.9.0-released/#experimental-typescript-configuration-files) in the `eslint.config.ts` file. | ||
|
||
You can enable it by setting `unstable_ts_config`, both in the CLI commands and in the [VSCode extension settings](https://www.eslint-config-sheriff.dev/docs/vscode-support#eslintconfigts-support). | ||
|
||
## New syntax for bootstrapping Sheriff projects | ||
|
||
Now you can do `pnpm create @sherifforg/config` instead of `pnpm dlx create-sheriff-config` to bootstrap a new Sheriff project. | ||
|
||
## Minor improvements | ||
|
||
- Astro linting is now configurable | ||
- the `SheriffOptions` object is now optional. If not specified, all options will default to `false`. | ||
- general fixes and improvements to the CLI. The experience should be much better now. | ||
- reworked the `noRestrictedSyntaxOverride` option | ||
- exposed more useful variables from the main package | ||
|
||
For more details, see the [release notes](https://github.com/AndreaPontrandolfo/sheriff/releases). | ||
|
||
## Acknowledgments | ||
|
||
Shoutout to [all the people that contributed](https://github.com/AndreaPontrandolfo/sheriff/graphs/contributors) to these releases and special big thanks to [lishaduck](https://github.com/lishaduck) for his big help on a lot of Issues and PRs! | ||
|
||
## How to Contribute | ||
|
||
Sheriff thrives on community support. Here is how you can help: | ||
|
||
- Contribute and Share Feedback: Fix bugs, suggest features, improve documentation, or join discussions. Start contributing today! | ||
- Give a Star: Found Sheriff useful? ⭐ the project on GitHub to show your support. | ||
|
||
Your support helps Sheriff move forward. Thank you! | ||
|
||
|
||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.