Skip to content
 
 

Repository files navigation

esconfig

Shared ECMAScript Config (TypeScript, oxlint, oxfmt)

Usage

  1. Install

    pnpm add -D @revenuecat/esconfig typescript oxlint oxlint-tsgolint oxfmt
  2. tsconfig.json

    {
      "extends": "@revenuecat/esconfig/tsconfig.shared.json",
      "compilerOptions": {
        "outDir": "./build",
        "rootDir": "./src"
      },
      "include": ["./src"]
    }
  3. copy .oxfmtrc.json (does not support extends)

  4. .oxlintrc.json

    {
      "extends": [
        "node_modules/@revenuecat/esconfig/.oxlintrc.json",
        // optional:
        "node_modules/@revenuecat/esconfig/.oxlintrc.react.json",
      ],
    }
  5. package.json

    {
      "scripts": {
        "build": "tsc",
        "lint": "oxlint",
        "format": "oxfmt",
        "format:check": "oxfmt --check"
      }
    }
  6. Done! Don't forget to run build, lint and format:check in your CI workflow.

About

Shared ECMAScript Config (TypeScript, oxfmt, oxlint, etc)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages