# saber-spec

> eslint/stylelint/editorconfig

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

## Install

```sh
npm install saber-spec
pnpm add saber-spec
yarn add saber-spec
bun add saber-spec
```

## 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-04-18 |
| First published | 2020-04-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 10.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | wfatec |

## Links

- npm: https://www.npmjs.com/package/saber-spec
- Repository: https://github.com/wfatec/saber/tree/master/packages/saber-spec
- Homepage: https://github.com/wfatec/saber/tree/master/packages/saber-spec#readme
- Issues: https://github.com/wfatec/saber/issues
- npm.io page: https://npm.io/package/saber-spec

## Dependencies (16)

- [babel-eslint](https://npm.io/package/babel-eslint.md) ^10.0.2
- [stylelint-scss](https://npm.io/package/stylelint-scss.md) ^3.14.2
- [stylelint-order](https://npm.io/package/stylelint-order.md) ^4.0.0
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.14.2
- [eslint-config-airbnb](https://npm.io/package/eslint-config-airbnb.md) ^18.0.1
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.18.0
- [eslint-config-prettier](https://npm.io/package/eslint-config-prettier.md) ^6.0.0
- [eslint-plugin-jsx-a11y](https://npm.io/package/eslint-plugin-jsx-a11y.md) ^6.2.3
- [@typescript-eslint/parser](https://npm.io/package/@typescript-eslint/parser.md) ^2.20.0
- [eslint-plugin-react-hooks](https://npm.io/package/eslint-plugin-react-hooks.md) ^2.4.0
- [stylelint-config-prettier](https://npm.io/package/stylelint-config-prettier.md) ^8.0.1
- [stylelint-config-standard](https://npm.io/package/stylelint-config-standard.md) ^20.0.0
- [stylelint-config-css-modules](https://npm.io/package/stylelint-config-css-modules.md) ^2.2.0
- [@commitlint/config-conventional](https://npm.io/package/@commitlint/config-conventional.md) ^8.1.0
- [stylelint-config-rational-order](https://npm.io/package/stylelint-config-rational-order.md) ^0.1.2
- [@typescript-eslint/eslint-plugin](https://npm.io/package/@typescript-eslint/eslint-plugin.md) ^2.20.0

## Recent versions

- 1.0.4 (latest) — 2020-04-18

## README

# spec

[![NPM version](https://img.shields.io/npm/v/saber-spec.svg?style=flat)](https://npmjs.org/package/saber-spec) [![NPM downloads](http://img.shields.io/npm/dm/saber-spec.svg?style=flat)](https://npmjs.org/package/saber-spec)

Easy to use eslint/stylelint/prettier. And spec means specification.

## Features

- [x] eslint
- [x] stylelint
- [x] eslint support TypeScript
- [x] commitlint
- [x] prettier

## Install

```bash
$ npm i --save-dev saber-spec eslint stylelint @commitlint/cli
```

## Usage

### eslint [rules](/lib/eslint.js)

Create a `.eslintrc.js`

```js
const { eslint } = require('saber-spec');

module.exports = eslint;
```

### eslint support TypeScript [rules](/lib/tslint.js)

Create a `.eslintrc.js`

```js
const { tslint } = require('saber-spec');

module.exports = tslint;
```

### stylelint [rules](/lib/eslint.js)

in `.stylelintrc.js`

```js
const { stylelint } = require('saber-spec');

module.exports = stylelint;
```

### prettier [rules](/lib/prettier.js)

in `.prettierrc.js`

```js
const { prettier } = require('saber-spec');

module.exports = prettier;
```

### commitlint [rules](https://github.com/conventional-changelog/commitlint/tree/master/@commitlint/config-conventional)

in `.commitlintrc.js`

```js
const { commitlint } = require('saber-spec');

module.exports = commitlint;
```

## FAQ

### Custom config

```js
const { eslint, deepmerge } = require('saber-spec');

module.exports = deepmerge(eslint, {
  rules: {
    // custom config
  },
});
```

### Error: Cannot find module 'eslint-plugin-foo'

Eslint is not yet supported having plugins as dependencies in shareable config. [issue](https://github.com/eslint/eslint/issues/3458). As a temporary solution, you need add the plugin to devDependencies in your project, like `npm i --save-dev eslint-plugin-jsx-a11y`.

### Warning: incorrect peer dependency "eslint-plugin-react-hooks@^1.7.0"

[issue](https://github.com/airbnb/javascript/issues/2084)

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