Skip to content

[FEATURE]: Provide an ESLint shareable config to "enforce" checklists #32

@mdubourg001

Description

@mdubourg001

✨ 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-gems

And 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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions