-
Notifications
You must be signed in to change notification settings - Fork 4
Description
✨ Description
ESLint allows the reuse of existing rules to provide centralized and shareable configs: ESLint Shareable Configs, Gems should provide a shareable ESLint config of existing rules to "enforce" the use of checklists.
With such a shared config, developer would only need to install ESLint and this shared config to lint their project according to Gems practices:
npm install eslint @ekino/eslint-config-gemsAnd in eslint.config.js:
import { defineConfig } from "eslint/config";
import gems from "@ekino/eslint-config-gems";
export default defineConfig([
{
extends: [gems],
rules: {
// custom rules here...
},
},
]);Note: I think these rules should be set to warning level, the idea is not disgust developer but to help them.
Best-effort: Make sure this shared config is usable with oxlint and/or Biome.
🚀 Motivation
The idea of Gems is to make everybody follow the same coding styles around different projects, but nothing "forces" people to actually follow rules.
As ESLint and many of its famous plugins are named in several Gems checklists around the repository to enforce certain coding styles, I believe we could easily provide a shared ESLint configuration that "picks" common well-known rules from our checklists, like the famous eslint-plugin-airbnb does.