Sheriff
📜 Table of Contents
- Table of Contents
- Description
- Philosophy
- Installation
- Usage
- Techs
- Requirements
- Eslint plugins
- Roadmap
- Acknowledgments
📖 Description
sheriff
is a comprehensive Eslint configuration.
It takes into account various technologies (see: techs).
⚠️ At the moment, sheriff
supports only Typescript codebases with modern Ecmascript standards. Maybe in the future i'll take in consideration support for vanilla Javascript. Refer to the roadmap.
💭 Philosophy / Why / Motivations
This library is very opinionated, but it's for the better. I took a lot of decisions so you don't have too 1. You can now quickstart static analysis in all your Typescript projects with ease. It's just 1 npm install
.
You can think of sheriff
like prettier
or create-react-app
. It's a tool that tool that comes battery-packed with optimal defaults. It remove configuration decisions from the equation, so you or your team can focus on developing the actual product.
And if you don't like something, you can easily override it, and just as easily you can extend it (see: usage).
🛠️ Installation
npm install -D eslint-config-sheriff
yarn add -D eslint-config-sheriff
pnpm add -D eslint-config-sheriff
✨ Usage
This config is highly opinionated, so make sure to meet the hard requirements in your project.
Then, follow these steps:
-
Install the package from npm.
-
Create a eslint.config.js
2 file and copy/paste the contents of this snippet:
import sheriff from 'eslint-config-sheriff/recommended';
export default [
...sheriff,
{
files: ['**/*{js,ts,jsx,tsx}'],
},
];
or, if you already have a eslint.config.js
in your project, just append sheriff
to the configs array, like this:
import sheriff from 'eslint-config-sheriff/recommended';
export default [
...sheriff,
];
-
Configure sheriff
as desired in the sheriff.config.js
file. (optional)
-
Override any sheriff rule as desired in the eslint.config.js
file. (optional)
🖥️ Techs
🔑 Requirements
Hard requirements
Recommendations
🐙 Eslint plugins
🚀 Roadmap
🙏 Acknowledgments
For some of this config i partially used eslint-config-red as a base.
I don't take any attribution for the rules in the various eslint-plugins used here. Please consider starring the respective projects for the awesome work their authors made. The full list of the plugins used is here.