Skip to content

Commit f76d88e

Browse files
committed
docs: update, reword, fix dead links
1 parent 9c7d0c9 commit f76d88e

39 files changed

+529
-480
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,6 @@ apps/cli-playground/*
5555
!apps/cli-playground/tsconfig.json
5656

5757
# tsx trash files
58-
apps/sheriff-webservices/undefined
58+
apps/sheriff-webservices/undefined
59+
60+
README.md

.prettierignore

-2
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,3 @@ pnpm-lock.yaml
4343

4444
# MDX v3
4545
*.mdx
46-
47-
README.md

CONTRIBUTING.md

+22-24
Original file line numberDiff line numberDiff line change
@@ -20,77 +20,75 @@ Sheriff thrives on community input. If you have ideas for new rules to implement
2020

2121
### Requirements
2222

23-
- make sure Git is installed in your system
24-
- make sure Nodejs 20.10.X is installed in your system
25-
- make sure [Pnpm is installed](https://pnpm.io/installation) in your system. If you are not sure how to install it, use corepack:
23+
- Ensure Git is installed in your system.
24+
- Ensure Node.js 20.10.x is installed in your system.
25+
- Ensure [pnpm is installed](https://pnpm.io/installation) in your system. If you are not sure how to install it, use Corepack:
2626

27-
```bash
27+
```sh
2828
corepack enable
2929
```
3030

3131
### Step-by-Step Guide
3232

3333
1. Start by forking this repository to your own GitHub account.
34-
2. Clone your fork locally with:
34+
1. Clone your fork locally with:
3535

36-
```bash
36+
```sh
3737
git clone https://github.com/<your-username>/sheriff.git
3838
```
3939

40-
3. Install all required dependencies using:
40+
1. Install all required dependencies using:
4141

42-
```bash
42+
```sh
4343
pnpm i
4444
```
4545

46-
4. Create a new branch for your feature or fix:
46+
1. Create a new branch for your feature or fix:
4747

48-
```bash
48+
```sh
4949
git checkout -b new-feature
5050
```
5151

52-
5. Implement your changes in the codebase.
52+
1. Implement your changes in the codebase.
5353

5454
- If you need to update the documentation website, you can run it locally with:
5555

56-
```bash
56+
```sh
5757
pnpm dev:norebuild
5858
```
5959

6060
The website will be available at `http://localhost:3000`.
6161

6262
- If you need test the CLI, you can run:
6363

64-
```bash
64+
```sh
6565
pnpm playground
6666
```
6767

6868
or:
6969

70-
```bash
71-
pnpm playground:mimic-monorepo
70+
```sh
71+
pnpm playground:mimic-monorepo
7272
```
7373

74-
6. Add a `changeset`:
74+
1. Add a `changeset`:
7575

76-
```bash
76+
```sh
7777
pnpm changeset
7878
```
7979

80-
7. Write clear, concise commit messages. Make sure to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:
80+
1. Write clear, concise commit messages. Make sure to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:
8181

82-
```bash
82+
```sh
8383
git commit -am 'feat(context): added feature'
8484
```
8585

86-
8. Push your branch to your fork:
86+
1. Push your branch to your fork:
8787

88-
```bash
88+
```sh
8989
git push origin new-feature
9090
```
9191

92-
9.
93-
94-
10. **Open a Pull Request**: Submit your changes by creating a pull request to the main repository.
92+
1. **Open a Pull Request**: Submit your changes by creating a pull request to the main repository.
9593

9694
Thank you for helping make Sheriff a better project for everyone!

README.md

+29-16
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,55 @@
11
<div align="center">
22
<a href="https://www.eslint-config-sheriff.dev">
3-
<img src="https://github.com/AndreaPontrandolfo/sheriff/blob/master/apps/docs-website/static/img/sheriff-logo.svg" width="240">
3+
<img alt="Sheriff logo" src="https://github.com/AndreaPontrandolfo/sheriff/blob/master/apps/docs-website/static/img/sheriff-logo.svg" width="240" />
44
<h1 align="center">Sheriff</h1>
55
</a>
66
<p align="center">
77
✨ A comprehensive and opinionated TypeScript-first ESLint configuration ✨
88
</p>
9-
<div>
9+
<div>
1010

11-
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?color=1A786D)](CODE_OF_CONDUCT.md)
12-
[![npm downloads](https://img.shields.io/npm/dm/eslint-config-sheriff.svg?label=npm%20downloads&color=1A786D)](https://www.npmjs.com/package/eslint-config-sheriff)
11+
[![Contributor Covenant][conduct-badge]](CODE_OF_CONDUCT.md)
12+
[![npm downloads][downloads-badge]][config-pkg]
1313

1414
</div>
1515
</div>
1616

17-
1817
## 🥳 Overview
1918

20-
This repository is a monorepo that hosts the sourcecode of the following projects:
19+
This repository is a monorepo that hosts the source code of the following projects:
2120

22-
| Link | Source | Description | Version |
23-
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
24-
| [Sheriff docs website](https://www.eslint-config-sheriff.dev) | [docs-website](https://github.com/AndreaPontrandolfo/sheriff/tree/master/apps/docs-website) | Sheriff documentation website | |
25-
| [`eslint-config-sheriff`](https://www.npmjs.com/package/eslint-config-sheriff) | [eslint-config-sheriff](https://github.com/AndreaPontrandolfo/sheriff/tree/master/packages/eslint-config-sheriff) | A comprehensive and opinionated TypeScript-first ESLint configuration | [![npm](https://img.shields.io/npm/v/eslint-config-sheriff.svg?color=1A786D)](https://www.npmjs.com/package/eslint-config-sheriff) |
26-
| [`@sherifforg/create-config`](https://www.npmjs.com/package/@sherifforg/create-config) | [sheriff-create-config](https://github.com/AndreaPontrandolfo/sheriff/tree/master/packages/sheriff-create-config) | Package used to create Sheriff-based ESLint configs | [![npm](https://img.shields.io/npm/v/@sherifforg/create-config.svg?color=1A786D)](https://www.npmjs.com/package/@sherifforg/create-config) |
27-
| [`@sherifforg/cli`](https://www.npmjs.com/package/@sherifforg/cli) | [sheriff-cli](https://github.com/AndreaPontrandolfo/sheriff/tree/master/packages/sheriff-cli) | The Sheriff CLI. Used to manage Sheriff-based ESLint configs | [![npm](https://img.shields.io/npm/v/@sherifforg/cli.svg?color=1A786D)](https://www.npmjs.com/package/@sherifforg/cli) |
21+
| Link | Source | Description | Version |
22+
| ----------------------------------------- | ----------------------------------- | --------------------------------------------------------------------- | ---------------------------------- |
23+
| [Sheriff docs website][docs] | [docs-website][docs-dir] | Sheriff documentation website | |
24+
| [`eslint-config-sheriff`][config-pkg] | [eslint-config-sheriff][config-dir] | A comprehensive and opinionated TypeScript-first ESLint configuration | [![npm][config-badge]][config-pkg] |
25+
| [`@sherifforg/create-config`][create-pkg] | [sheriff-create-config][create-dir] | Package used to create Sheriff-based ESLint configs | [![npm][create-badge]][create-pkg] |
26+
| [`@sherifforg/cli`][cli-pkg] | [sheriff-cli][cli-dir] | The Sheriff CLI. Used to manage Sheriff-based ESLint configs | [![npm][cli-badge]][cli-pkg] |
2827

2928
## 🚀 Getting Started
3029

31-
Visit the [official docs](https://www.eslint-config-sheriff.dev) to get started with Sheriff.
30+
Visit the [official docs][docs] to get started with Sheriff.
3231

3332
## 📝 Updates
3433

3534
You can follow the latest updates on the project in the [official blog](https://www.eslint-config-sheriff.dev/blog).
3635

3736
## 💌 Acknowledgments
3837

39-
For some of this configuration, [eslint-config-red](https://github.com/GrosSacASac/JavaScript-Set-Up/blob/master/js/red-javascript-style-guide/index.js) was partially used as a base.<br>
40-
Additionally, inspiration was drawn from [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) for some of the rules in `no-restricted-syntax`.<br>
41-
I don't take any attribution for the rules in the various eslint-plugins used here (except for the few that I personally created). Please consider starring the respective projects for the awesome work their authors made. Sheriff wouldn't be possible without their efforts.<br>
38+
For some of this configuration, [eslint-config-red](https://github.com/GrosSacASac/JavaScript-Set-Up/blob/master/js/red-javascript-style-guide/index.js) was partially used as a base.<br />
39+
Additionally, inspiration was drawn from [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb) for some of the rules in `no-restricted-syntax`.<br />
40+
I dont take any attribution for the rules in the various ESLint plugins used here (except for the few that I personally created). Please consider starring the respective projects for the awesome work their authors made. Sheriff wouldnt be possible without their efforts.<br />
4241
The full list of the plugins used is [here](https://www.eslint-config-sheriff.dev/docs/eslint-plugins).
42+
43+
[docs]: https://www.eslint-config-sheriff.dev
44+
[docs-dir]: https://github.com/AndreaPontrandolfo/sheriff/tree/master/apps/docs-website
45+
[config-pkg]: https://www.npmjs.com/package/eslint-config-sheriff
46+
[config-dir]: https://github.com/AndreaPontrandolfo/sheriff/tree/master/packages/eslint-config-sheriff
47+
[config-badge]: https://img.shields.io/npm/v/eslint-config-sheriff.svg?color=1A786D
48+
[create-pkg]: https://www.npmjs.com/package/@sherifforg/create-config
49+
[create-dir]: https://github.com/AndreaPontrandolfo/sheriff/tree/master/packages/sheriff-create-config
50+
[create-badge]: https://img.shields.io/npm/v/@sherifforg/create-config.svg?color=1A786D
51+
[cli-pkg]: https://www.npmjs.com/package/@sherifforg/cli
52+
[cli-dir]: https://github.com/AndreaPontrandolfo/sheriff/tree/master/packages/sheriff-cli
53+
[cli-badge]: https://img.shields.io/npm/v/@sherifforg/cli.svg?color=1A786D
54+
[downloads-badge]: https://img.shields.io/npm/dm/eslint-config-sheriff.svg?label=npm%20downloads&color=1A786D
55+
[conduct-badge]: https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?color=1A786D

apps/docs-website/blog/2023-08-16-sheriff-reboot.mdx

+8-8
Original file line numberDiff line numberDiff line change
@@ -27,41 +27,41 @@ Let's walkthrough the key changes of this release.
2727

2828
## Restructured Codebase in a monorepo
2929

30-
The codebase has been restructured into a monorepo setup with [Turborepo](https://turbo.build/repo) + [pnpm workspaces](https://pnpm.io/workspaces), as it allows for the management of multiple related packages under a single repository, streamlining the development process and enabling better coordination between different parts of the project.
30+
The codebase has been restructured into a monorepo setup with [Turborepo](https://turbo.build/repo/docs) + [pnpm workspaces](https://pnpm.io/workspaces), as it allows for the management of multiple related packages under a single repository, streamlining the development process and enabling better coordination between different parts of the project.
3131

3232
As a side-effect, the project now relies on [changesets](https://github.com/changesets/changesets) to manage semantic versioning, in place of [semantic-release](https://github.com/semantic-release/semantic-release).
3333

3434
## Complete Rebranding
3535

3636
### New Docs
3737

38-
The documentation has been fully revamped, moving on from [Gitbook](https://www.gitbook.com/) to [Docusaurus](https://docusaurus.io/), a modern documentation framework.<br/>
39-
Whether a newcomer or a seasoned user, the documentation is more accessible and easier to navigate, with a sidebar that allows for quick access to the different sections.<br/>
38+
The documentation has been fully revamped, moving on from [GitBook](https://www.gitbook.com/) to [Docusaurus](https://docusaurus.io/), a modern documentation framework.<br />
39+
Whether a newcomer or a seasoned user, the documentation is more accessible and easier to navigate, with a sidebar that allows for quick access to the different sections.<br />
4040
Also, a special [Rules page](https://www.eslint-config-sheriff.dev/docs/rules) was carefully crafted to let users explore in detail all the rules that Sheriff enables.
4141

4242
Visit the new docs at this [link](https://www.eslint-config-sheriff.dev).
4343

4444
### New Logo
4545

46-
The beginning of a fresh era for Sheriff is marked by a new logo, that features the iconic ESLint logo and a shield.
46+
The beginning of a fresh era for Sheriff is marked by a new logo that features the iconic ESLint logo and a shield.
4747

4848
![Sheriff Logo](/img/sheriff-logo.svg)
4949

5050
### New Blog
5151

52-
A [brand-new blog](https://www.eslint-config-sheriff.dev/blog) is now available, where I'll keep sharing updates on the projects as it grows along.
52+
A [brand-new blog](https://www.eslint-config-sheriff.dev/blog) is now available, where I'll keep sharing updates as it grows along.
5353

5454
## What's Next
5555

5656
The focus remains on continuously improving the tool, making it more adaptable, and responding to the evolving needs of the development community.<br />
5757
Looking ahead, several exciting developments are in store:
5858

59-
- **Astro Support**: In the continuous effort to integrate more eslint-plugins into Sheriff, the next in line is [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro).
59+
- **Astro Support**: In the continuous effort to integrate more ESLint plugins into Sheriff, the next in line is [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro).
6060
- **Searchbar**: full-text search, powered by [Algolia](https://www.algolia.com/) in the new docs.
6161
- **Ask AI**: along with the new searchbar will come an "Ask AI bot" feature. Details on this one are still being worked on.
6262

6363
## Conclusion
6464

65-
With this much-needed facelift, Sheriff is ready to keep growing. With a new documentation hub powered by Docusaurus, logo, and blog in place, Sheriff is set to provide an even more exceptional ESLint sharable config experience.<br/>
66-
If you want to help feel free to propose new features, both for the config and the docs, or report any bug you might come across.<br/>
65+
With this much-needed facelift, Sheriff is ready to keep growing. With a new documentation hub powered by Docusaurus, logo, and blog in place, Sheriff is set to provide an even more exceptional ESLint sharable config experience.<br />
66+
If you want to help feel free to propose new features, both for the config and the docs, or report any bug you might come across.<br />
6767
Stay tuned for updates and insights on the new blog!

apps/docs-website/blog/2023-11-01-astro-support-landed.mdx

+11-5
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,25 @@ import useBaseUrl from "@docusaurus/useBaseUrl";
2121

2222
## Sheriff release v16
2323

24-
Sheriff continues his quest to conquer the JS ecosystem.
24+
Sheriff continues its quest to conquer the JS ecosystem.
2525

2626
## Sheriff extends support for Astro
2727

28-
This release introduces support for [Astro.js](https://astro.build/), thanks to [ota-meshi](https://github.com/ota-meshi) libraries, [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro) and [astro-eslint-parser](https://github.com/ota-meshi/astro-eslint-parser).
28+
This release introduces support for [Astro](https://astro.build/), thanks to [ota-meshi](https://github.com/ota-meshi)’s libraries, [eslint-plugin-astro](https://github.com/ota-meshi/eslint-plugin-astro) and [astro-eslint-parser](https://github.com/ota-meshi/astro-eslint-parser).
2929

3030
The integration is provided out-of-the-box, meaning nothing has to be configured on the user side. Sheriff will automatically detect Astro projects and run the appropriate rules. All you have to do is upgrade Sheriff to this version.
3131

32+
:::important
33+
34+
As of Sheriff v19, Astro support has been moved behind an option.
35+
36+
:::
37+
3238
This integration presented significant challenges, as the pertinent ESLint plugins are still in experimental status and also because this integration provides JSX-relevant ESLint rules inside `.astro` files, meaning that we are now parsing `.astro` files (in a Typescript-aware way) and provide Astro and React relevant rules inside them. This has not been trivial.
3339

3440
## Sheriff meets Algolia
3541

36-
The Sheriff documentation website has now a full-text search powered by [Algolia Docsearch](https://docsearch.algolia.com/), generously provided for free by the open-source projects sponsorship by [Algolia](https://www.algolia.com/) . The documentation is now easier than ever to navigate.
42+
The Sheriff documentation website has now a full-text search powered by [Algolia Docsearch](https://docsearch.algolia.com/), generously provided for free by the open-source projects sponsorship by [Algolia](https://www.algolia.com/). The documentation is now easier than ever to navigate.
3743

3844
The "Ask AI" feature, instead, didn't make it in this release. There aren't yet solid solutions in this space, for now.
3945

@@ -44,7 +50,7 @@ Finally, as the last treat, my newest `eslint-plugin`, [fsecond](https://github.
4450
Fsecond adds 2 new rules:
4551

4652
- `fsecond/prefer-destructured-optionals`: enforce placing optional parameters to the end of the function signature as destructured objects
47-
- `fsecond/valid-event-listener`: enforce using a `useEventListener` utility function instead of `addEventListener` methods, or, optionally, you can disable that behaviour and the rule will just warn against incorrect usage of addEventListener methods
53+
- `fsecond/valid-event-listener`: enforce using a `useEventListener` utility function instead of `addEventListener` methods, or, optionally, you can disable that behavior and the rule will just warn against incorrect usage of addEventListener methods
4854

4955
## What's Next
5056

@@ -58,6 +64,6 @@ The commitment to improving Sheriff remains strong. Here's a glimpse of what's o
5864

5965
## Conclusion
6066

61-
As always, if you feel like contributing, feel free to propose suggestions or pull-requests. And if you just want to show appreciation, leave a star on Github.
67+
As always, if you feel like contributing, feel free to propose suggestions or pull-requests. And if you just want to show appreciation, leave a star on GitHub.
6268

6369
Sheriff is actively dedicated to becoming even more adaptable and feature-rich. Stay tuned for further updates and enhancements!

0 commit comments

Comments
 (0)