Skip to content

Commit 4c1c5a4

Browse files
committed
docs: update, reword, fix dead links
1 parent e73822e commit 4c1c5a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+672
-651
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

CONTRIBUTING.md

+23-25
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Useful contributions include fixing bugs or inconsistencies, adding or proposing
2121

2222
### Opening a new Pull Request
2323

24-
- **Contributions orientation**: if you want to contribute but don't know where to start, consider checking the [good first issue](https://github.com/AndreaPontrandolfo/sheriff/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) labeled issues. Alternatively, consider checking the [help wanted](https://github.com/AndreaPontrandolfo/sheriff/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) labeled issues.
24+
- **Contributions orientation**: if you want to contribute, but don't know where to start, consider checking for issues labels ["good first issue"](https://github.com/AndreaPontrandolfo/sheriff/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22). Alternatively, consider checking for issues labeled ["help wanted"](https://github.com/AndreaPontrandolfo/sheriff/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22).
2525
- **Issues as pre-requirement policy**: Please ensure there is an open issue before creating a pull request. If an issue does not exist, you need to open one first. After this, the maintainers will discuss your proposed changes and provide feedback. If the issue is approved, you can proceed by creating a pull request. Approved issues will be marked with the green `approved` label. If an issue hasn't been approved yet (it still has the `triaging` label), and you create a pull request, it will be immediately declined.
2626
- **Small and focused**: Keep your pull requests as small and as focused as possible. This will make it easier for maintainers to review and merge your changes.
2727
- **Pass quality checks**: Pull requests will only be merged if they pass the quality checks performed by the `pnpm merge-checks` command.
@@ -32,55 +32,55 @@ Useful contributions include fixing bugs or inconsistencies, adding or proposing
3232

3333
### Requirements
3434

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

39-
```bash
39+
```sh
4040
corepack enable
4141
```
4242

4343
### Step-by-Step Guide
4444

4545
1. Start by forking this repository to your own GitHub account.
46-
2. Clone your fork locally with:
46+
1. Clone your fork locally with:
4747

48-
```bash
48+
```sh
4949
git clone https://github.com/<your-username>/sheriff.git
5050
```
5151

52-
3. Install all required dependencies using:
52+
1. Install all required dependencies using:
5353

54-
```bash
54+
```sh
5555
pnpm i
5656
```
5757

58-
4. Create a new branch for your feature or fix:
58+
1. Create a new branch for your feature or fix:
5959

60-
```bash
60+
```sh
6161
git checkout -b new-feature
6262
```
6363

64-
5. Implement your changes in the codebase.
64+
1. Implement your changes in the codebase.
6565

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

68-
```bash
68+
```sh
6969
pnpm dev
7070
```
7171

7272
The website will be available at `http://localhost:3000`.
7373

7474
- To test `@sherifforg/create-config`, run:
7575

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

8080
or:
8181

82-
```bash
83-
pnpm playground:mimic-monorepo
82+
```sh
83+
pnpm playground:mimic-monorepo
8484
```
8585

8686
- To test `@sherifforg/cli`, run:
@@ -89,26 +89,24 @@ Useful contributions include fixing bugs or inconsistencies, adding or proposing
8989
playground:cli-checks
9090
```
9191

92-
6. If the PR contains a feature or a bugfix (meaning that it's not a chore, a documentation update or a refactoring), add a `changeset`:
92+
1. If the PR contains a feature or a bugfix (meaning that it's not a chore, a documentation update or a refactoring), add a `changeset`:
9393
94-
```bash
94+
```sh
9595
pnpm changeset
9696
```
9797
98-
7. Write clear, concise commit messages. Make sure to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:
98+
1. Write clear, concise commit messages. Make sure to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:
9999
100-
```bash
100+
```sh
101101
git commit -am 'feat(context): added feature'
102102
```
103103
104-
8. Push your branch to your fork:
104+
1. Push your branch to your fork:
105105
106-
```bash
106+
```sh
107107
git push origin new-feature
108108
```
109109
110-
9.
111-
112-
10. **Open a Pull Request**: Submit your changes by creating a pull request to the main repository.
110+
1. **Open a Pull Request**: Submit your changes by creating a pull request to the main repository.
113111
114112
Thank you for helping make Sheriff a better project for everyone!

README.md

+10-14
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
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

1111
[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg?color=1A786D)](CODE_OF_CONDUCT.md)
1212
[![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)
1313

14-
</div>
15-
</div>
16-
17-
1814
## 🥳 Overview
1915

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

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) |
18+
| Link | Source | Description | Version |
19+
| -------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
20+
| [Sheriff docs website](https://www.eslint-config-sheriff.dev) | [docs-website](https://github.com/AndreaPontrandolfo/sheriff/tree/master/apps/docs-website) | Sheriff documentation website | |
21+
| [`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) |
22+
| [`@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) |
23+
| [`@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) |
2824

2925
## 🚀 Quickstart
3026

@@ -44,7 +40,7 @@ You can follow the latest updates on the project in the [official blog](https://
4440

4541
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. 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`.
4642

47-
I don't take any attribution for the rules in the various eslint-plugins used here (except for the few that I personally created).
43+
I don't take any attribution for the rules in the various eslint-plugins used here (except for the few that I personally created).
4844

4945
Please consider starring the respective projects for the awesome work their authors made. Sheriff wouldn't be possible without their efforts.
5046

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)