# @tiagoboeing/create-styleguide

> A CLI to automate style guide configs for JS based projects, this uses ESLint and Prettier.

Latest version **1.0.4** (published 2020-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tiagoboeing/create-styleguide
pnpm add @tiagoboeing/create-styleguide
yarn add @tiagoboeing/create-styleguide
bun add @tiagoboeing/create-styleguide
```

Provides the command `create-styleguide`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2020-11-18 |
| First published | 2020-10-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 19.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Tiago Boeing |
| Maintainers | tiago.boeing |
| Keywords | cli, style guide, frontend, ESLint, Prettier |

## Links

- npm: https://www.npmjs.com/package/@tiagoboeing/create-styleguide
- Repository: https://github.com/tiagoboeing/styleguide-cli
- Homepage: https://github.com/tiagoboeing/styleguide-cli#readme
- Issues: https://github.com/tiagoboeing/styleguide-cli/issues
- npm.io page: https://npm.io/package/@tiagoboeing/create-styleguide

## Dependencies (7)

- [arg](https://npm.io/package/arg.md) ^4.1.3
- [esm](https://npm.io/package/esm.md) ^3.2.25
- [ncp](https://npm.io/package/ncp.md) ^2.0.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [listr](https://npm.io/package/listr.md) ^0.14.3
- [inquirer](https://npm.io/package/inquirer.md) ^7.3.3
- [pkg-install](https://npm.io/package/pkg-install.md) ^1.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@pandacss/eslint-plugin](https://npm.io/package/@pandacss/eslint-plugin.md) — 18.7K weekly downloads

## Recent versions

- 1.0.4 (latest) — 2020-11-18
- 1.0.4-fix.0 — 2020-11-18
- 1.0.3 — 2020-10-19
- 1.0.2 — 2020-10-16
- 1.0.2-0 — 2020-10-16
- 1.0.1 — 2020-10-16
- 1.0.0 — 2020-10-16
- 0.0.0-0 — 2020-10-16

## README

# Style Guide CLI

![npm (scoped)](https://img.shields.io/npm/v/@tiagoboeing/create-styleguide?style=for-the-badge) ![npm](https://img.shields.io/npm/dm/@tiagoboeing/create-styleguide?style=for-the-badge) ![Snyk Vulnerabilities for npm package](https://img.shields.io/snyk/vulnerabilities/npm/@tiagoboeing/create-styleguide?style=for-the-badge) ![NPM](https://img.shields.io/npm/l/@tiagoboeing/create-styleguide?style=for-the-badge)

A CLI to add ESLint + Prettier and enforce a style guide based on `ESLint standard`. **This automatize dependencies install and Prettier + ESLint configs**, adding specific files for different frameworks/languages (in case of JS or TS).

![Adding for JavaScript project](docs/screenshots/3w4IQMsF4r.gif)

## Framework/language support

| Framework / Language                      | Support? |
| ----------------------------------------- | -------- |
| Angular 2+                                | ✅ Yes    |
| JavaScript (Browser + Node)               | ✅ Yes    |
| React / Next.js                           | ✅ Yes    |
| TypeScript (use Angular template for now) | Roadmap  |

> Contribute sending a pull request or can be a sponsor

## SO support

| SO      | Support?   |
| ------- | ---------- |
| Linux   | ✅ Yes      |
| Windows | ✅ Yes      |
| MacOS   | Not tested |

> You can edit this README if test on MacOS. 😁

## Use

Before run, remove following files from your project root if exists:

- `.editorconfig`
- `.eslintignore`
- `.eslintrc.json`
- `.prettierrc`

Run the command on root of your project. (Same folder of `package.json`)

```bash
$ npm init @tiagoboeing/styleguide

# or

$ npx @tiagoboeing/create-styleguide

# or

$ npm i -g @tiagoboeing/create-styleguide
$ create-styleguide

# after run, select a option and be happy! 🎉
? What the type of your project?
❯ JavaScript
  Angular 2+
  React / Next.js (TypeScript)
```

> Before execute, do a backup or commit your files!

## Development

To run local exists two strategies:

1. Using directly `NPM`

```bash
# on root folder, run for register CLI on envs
$ npm link

# create any folder to run the CLI
$ mkdir test
$ cd test

# start a Node project to create a package.json
$ npm init -y

# and... run the CLI for apply magic 🚀
$ create-styleguide
```

2. Using VSCode automated tasks (`tasks.json` and `launch.json`)

Press F5 key to run or use Ctrl + Shift + D to access run side menu and select "Launch" on context menu to run the all predefined tasks.

On `.vscode/tasks.json` you can change the CLI args in:

```json
...
"args": [
  "--project",
  "javascript" <- here
],
```

## Defaults

> Same configs for all projects types

<details>
<summary>Prettier</summary>
<p>

```json
{
  "$schema": "http://json.schemastore.org/prettierrc",
  "semi": false,
  "singleQuote": true,
  "arrowParens": "avoid",
  "trailingComma": "none",
  "endOfLine": "auto",
  "tabWidth": 2,
  "printWidth": 95
}
```
</p>
</details>

<details>
<summary>.editorconfig</summary>
<p>

```conf
# Editor configuration, see https://editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false

```
</p>
</details>

---
_Source: https://npm.io/package/@tiagoboeing/create-styleguide · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
