Shareable ESLint Rules


yarn add --dev @ferocia-oss/eslint-plugin


In your ESLint config file…

plugins: [
  // ...

rules: {
  // ...

  // Enforce `Readonly<{...}>` over `{readonly ...}` when there are multiple props.
  '@ferocia-oss/prefer-generic-readonly': 'error',

  // Enforce use of smart-quotes.
  '@ferocia-oss/prefer-special-apostrophe': 'error',

  // Enforce `Nullable<X>` over `X | null | undefined`.
  // requires adding `declare type Nullable<T> = T | null | undefined`
  // to your `global.d.ts`.
  '@ferocia-oss/prefer-nullable': 'error',


To work on this, check out the ESLint Plugin docs.

To run the tests in watch mode, run:

yarn dev


  1. Bump the version in package.json and commit to main.
  2. Create a new release, creating a new tag with the same value as the package.json. Publish.
  3. An action will be triggered to automatically publish the package.


View Github