An open API service indexing awesome lists of open source software.

https://github.com/nihalgonsalves/esconfig

Shared personal ECMAScript Config (TS, Lint, Prettier)
https://github.com/nihalgonsalves/esconfig

Last synced: 3 months ago
JSON representation

Shared personal ECMAScript Config (TS, Lint, Prettier)

Awesome Lists containing this project

README

          

# esconfig

Shared ECMAScript Config (TypeScript, oxlint, oxfmt)

## Usage

1. Install

```sh
pnpm add -D @nihalgonsalves/esconfig typescript oxlint oxlint-tsgolint oxfmt
```

2. `tsconfig.json`

```json
{
"extends": "@nihalgonsalves/esconfig/tsconfig.shared.json",
"compilerOptions": {
"outDir": "./build",
"rootDir": "./src"
},
"include": ["./src"]
}
```

3. copy [`.oxlintrc.json`](./.oxlintrc.json)

4. `.oxlintrc.json`

```jsonc
{
"extends": [
"node_modules/@nihalgonsalves/esconfig/.oxlintrc.json",
// optional:
"node_modules/@nihalgonsalves/esconfig/.oxlintrc.react.json",
],
}
```

5. `package.json`

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