Skip to content

Commit

Permalink
feat: add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nihalgonsalves committed Apr 25, 2021
1 parent 10348e0 commit 2986219
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
# esconfig

Shared ECMAScript Config (TS, Lint, Prettier)

## Usage

1. Install

```sh
yarn add -D @nihalgonsalves/esconfig typescript eslint prettier
```

2. `tsconfig.json`

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

3. `.eslintrc`

```json
{
"extends": "./node_modules/@nihalgonsalves/esconfig/.eslintrc"
}
```

4. `.prettierrc`

```json
"@nihalgonsalves/esconfig/.prettierrc"
```

5. `package.json`

```json
{
"scripts": {
"build": "tsc",
"lint": "eslint --ext .js,.jsx,.ts,.tsx ./src/",
"format": "prettier . --write",
"format:check": "prettier . --check"
}
}
```

6. Done! Don't forget to run `build`, `lint` and `format:check` in your CI workflow.

0 comments on commit 2986219

Please sign in to comment.