# stylomatic

Latest version **0.8.1** (published 2023-10-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install stylomatic
pnpm add stylomatic
yarn add stylomatic
bun add stylomatic
```

Provides the command `stylomatic`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.8.1 |
| Published | 2023-10-17 |
| First published | 2022-02-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 6.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | jondot |

## Links

- npm: https://www.npmjs.com/package/stylomatic
- npm.io page: https://npm.io/package/stylomatic

## Dependencies (6)

- [eslint](https://npm.io/package/eslint.md) ^8.51.0
- [prettier](https://npm.io/package/prettier.md) 3.0.3
- [supertest](https://npm.io/package/supertest.md) ^6.3.3
- [@types/supertest](https://npm.io/package/@types/supertest.md) ^2.0.14
- [@vercel/style-guide](https://npm.io/package/@vercel/style-guide.md) ^5.0.2-canary.1
- [eslint-plugin-tailwindcss](https://npm.io/package/eslint-plugin-tailwindcss.md) ^3.13.0

## Recent versions

- 0.8.1 (latest) — 2023-10-17
- 0.8.0 — 2023-10-17
- 0.7.0 — 2023-04-23
- 0.6.0 — 2023-04-19
- 0.5.1 — 2022-10-21
- 0.5.0 — 2022-10-21
- 0.4.10 — 2022-08-27
- 0.4.9 — 2022-07-13
- 0.4.8 — 2022-07-13
- 0.4.7 — 2022-07-13
- 0.4.6 — 2022-07-11
- 0.4.5 — 2022-06-12
- 0.4.4 — 2022-06-09
- 0.4.3 — 2022-06-09
- 0.4.2 — 2022-06-09
- … 8 more at https://npm.io/package/stylomatic/versions

## README

# stylomatic [![npm version](https://img.shields.io/npm/v/stylomatic?style=flat)](https://npmjs.com/package/stylomatic)

<img src="media/stylomatic.png" width="363" align="right">

> Styles, configs, and tools for modern Typescript with zero configuration

* :lipstick: Core styles based on [@antfu/config](https://github.com/antfu/eslint-config) covering Typescript, React, best practices, and even `package.json` ordering and formatting, and more.
* :high_brightness: formatting is almost similar to Prettier, without the added burden of it on eslint
* :computer: Typescript config for various usecases
* :hammer: Tools: `esno`, `tsup` and intergrations `ts-jest`, and more.


# Install

```
yarn add --dev stylomatic
```

# Usage

Bootstrap quickly:

```
yarn stylomatic
```

Will give you a starter `.eslint.js` and `tsconfig.json`.

Add `prettier` with your package manager (we do this manually because of package manager incompatibilities):

```json
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.8",
```

# Tooling deps

Starting v0.5.0, moved to here, instead of installed by default to be more compatible with how different package managers handle bins. Put these in root of your monorepo if needed:

```json
    "jest": "^28.1.1",
    "ts-jest": "^29.0.3",
    "tsup": "^6.1.0",
    "typescript-cp": "^0.1.5",
    "typescript": "^4.7.3",
    "concurrently": "^7.2.1",
    "rimraf": "^3.0.2",
    "tsc-alias": "^1.6.9"
```


# Quick start

```
$ mkdir myproject && cd myproject
$ yarn init -y && yarn add --dev stylomatic

$ yarn stylomatic
added .eslint.js
added tsconfig.json

$ mkdir src
$ cat > src/index.ts
console.log("hello unstyled world");

$ yarn eslint src/index.ts

src/index.ts
  1:1   error  Unexpected console statement                                       no-console

✖ 2 problems (2 errors, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.
```

# Recommended config

In your `.eslint.js`:

```js
module.exports = require('stylomatic/eslint-preset')
```

And in your `tsconfig.json`:

```json
{
  "extends": "stylomatic/node-library.json",
  "compilerOptions": {
    "outDir": "dist",
    "strict": false,
    "isolatedModules": false
  },
  "include": [
    "./src",
    "./test"
  ],
  "exclude": [
    "**/__tests__/",
    "test/fixtures"
  ]
}
```

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