Skip to content

Commit

Permalink
Merge pull request #51 from ChoTotOSS/feat/update-readme
Browse files Browse the repository at this point in the history
chore: update readme
  • Loading branch information
tunguyen-ct authored Sep 15, 2023
2 parents 260dcee + b086c37 commit 058f5fa
Showing 1 changed file with 12 additions and 33 deletions.
45 changes: 12 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
![npm (scoped)](https://img.shields.io/npm/v/%40chotot/eslint-config-next?label=%40chotot%2Feslint-config-next&color=green)
![npm (scoped)](https://img.shields.io/npm/v/%40chotot/eslint-config-base?label=%40chotot%2Feslint-config-base&color=green)
![npm (scoped)](https://img.shields.io/npm/v/%40chotot/eslint-plugin-chotot?label=%40chotot%2Feslint-plugin-chotot&color=green)


# Chotot Web Standards

A set of documents and npm packages to impose Chotot's coding styles and standards.

Currently:

- [JavaScript style guide](https://github.com/ChoTotOSS/chotot-web-standards/tree/master/javascript)
- [`eslint-config-chotot`](https://www.npmjs.com/package/eslint-config-chotot)
- [`eslint-config-chotot-base`](https://www.npmjs.com/package/eslint-config-chotot-base)
- [`eslint-plugin-chotot`](https://www.npmjs.com/package/eslint-plugin-chotot)
- [`@chotot/eslint-config-next`](https://www.npmjs.com/package/@chotot/eslint-config-next)
- [`@chotot/eslint-config-base`](https://www.npmjs.com/package/@chotot/eslint-config-base)
- [`@chotot/eslint-plugin-chotot`](https://www.npmjs.com/package/@chotot/eslint-plugin-chotot)
- [Editors' baseline set-up](https://github.com/ChoTotOSS/chotot-web-standards/tree/master/editors), currently:
- Visual Studio Code
- Sublime Text 3
Expand All @@ -18,49 +23,23 @@ Currently:

## HOW-TO

### Configure `eslint-config-chotot`

```sh
yarn add --dev eslint-config-chotot@latest
```

After adding `eslint-config-chotot` package to `devDependencies`, execute below command to install peer dependencies automatically:
### Configure `@chotot/eslint-config-next`

```sh
# yarn or npm will be detected automatically by `install-peerdeps`
npx install-peerdeps --dev eslint-config-chotot@latest
pnpm add --dev @chotot/eslint-config-next@latest
```

Create a `.eslintrc` at root of project with following content:

```json
{
"extends": "chotot"
}
```

If your project uses `babel-plugin-module-resolver` (alias of project root with `~` character), install following package:

```sh
yarn add --dev eslint-import-resolver-babel-module
```

Then update `.eslintrc` with following config:

```json
{
"extends": "chotot",
"settings": {
"import/resolver": {
"babel-module": {}
}
}
"extends": "@chotot/next"
}
```

---

© 2020-2022 - Chotot.vn
© 2020-2023 - Chotot.vn

Code is licensed under [MIT license](https://opensource.org/licenses/MIT). Document is licensed under [Creative Commons Attribution-ShareAlike 4.0 International License.](http://creativecommons.org/licenses/by-sa/4.0/)

Expand Down

0 comments on commit 058f5fa

Please sign in to comment.