-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
10348e0
commit 2986219
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |