# fecs

> Front End Code Style Suite

Latest version **1.6.4** (published 2018-11-07) · MIT license · 0 weekly downloads

## Install

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

Provides the command `fecs`.

## 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.6.4 |
| Published | 2018-11-07 |
| First published | 2014-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=5 |
| Dependencies | 31 |
| Unpacked size | 448.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 637 |
| Author | chris |
| Maintainers | ecomfe-core |
| Keywords | fecs, jscs, jshint, jslint, eslint, csslint, csshint, htmllint, htmlhint, jsbeautify, cssbeautify, htmlbeautify |

## Links

- npm: https://www.npmjs.com/package/fecs
- Repository: https://github.com/ecomfe/fecs
- Issues: https://github.com/ecomfe/fecs/issues
- npm.io page: https://npm.io/package/fecs

## Dependencies (31)

- [msee](https://npm.io/package/msee.md) ^0.3.3
- [chalk](https://npm.io/package/chalk.md) ^2.1.0
- [manis](https://npm.io/package/manis.md) ^0.3.4
- [vinyl](https://npm.io/package/vinyl.md) ^2.2.0
- [eslint](https://npm.io/package/eslint.md) ^4.8.0
- [htmlcs](https://npm.io/package/htmlcs.md) stable
- [csscomb](https://npm.io/package/csscomb.md) ^4.2.0
- [csshint](https://npm.io/package/csshint.md) stable
- [lesslint](https://npm.io/package/lesslint.md) stable
- [loophole](https://npm.io/package/loophole.md) ^1.1.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [vinyl-fs](https://npm.io/package/vinyl-fs.md) ^3.0.3
- [doctrine2](https://npm.io/package/doctrine2.md) latest
- [minimatch](https://npm.io/package/minimatch.md) ^3.0.2
- [map-stream](https://npm.io/package/map-stream.md) ^0.1.0
- [esformatter](https://npm.io/package/esformatter.md) ^0.10.0
- [babel-eslint](https://npm.io/package/babel-eslint.md) ^8.0.1
- [reserved-words](https://npm.io/package/reserved-words.md) ^0.1.2
- [esformatter-fecs](https://npm.io/package/esformatter-fecs.md) latest
- [esformatter-braces](https://npm.io/package/esformatter-braces.md) ^1.2.1
- [esformatter-quotes](https://npm.io/package/esformatter-quotes.md) ^1.1.0
- [eslint-plugin-html](https://npm.io/package/eslint-plugin-html.md) ^3.2.2
- [eslint-plugin-babel](https://npm.io/package/eslint-plugin-babel.md) ^4.1.2
- [eslint-plugin-react](https://npm.io/package/eslint-plugin-react.md) ^7.4.0
- [esformatter-parseint](https://npm.io/package/esformatter-parseint.md) ^1.0.3
- [eslint-plugin-import](https://npm.io/package/eslint-plugin-import.md) ^2.7.0
- [esformatter-semicolons](https://npm.io/package/esformatter-semicolons.md) ^1.1.2
- [esformatter-dot-notation](https://npm.io/package/esformatter-dot-notation.md) ^1.3.1
- [esformatter-limit-linebreaks](https://npm.io/package/esformatter-limit-linebreaks.md) 0.0.3
- [esformatter-spaced-lined-comment](https://npm.io/package/esformatter-spaced-lined-comment.md) ^2.0.1
- [esformatter-remove-trailing-commas](https://npm.io/package/esformatter-remove-trailing-commas.md) ^1.0.1

## 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.6.4 (latest) — 2018-11-07
- 1.7.0-beta.1 (beta) — 2018-11-12
- 1.4.1 (stable) — 2017-07-30
- 1.6.3 — 2018-11-07
- 1.6.2 — 2018-10-09
- 1.6.1 — 2018-07-31
- 1.6.0 — 2018-07-04
- 1.5.5 — 2018-01-30
- 1.5.4 — 2017-12-11
- 1.5.3 — 2017-11-24
- 1.5.2 — 2017-11-05
- 1.5.2-beta.2 — 2017-10-11
- 1.5.2-beta.1 — 2017-10-11
- 1.5.1 — 2017-10-11
- 1.5.0 — 2017-10-11
- … 209 more at https://npm.io/package/fecs/versions

## README

FECS
==========

FECS 是基于 Node.js 的前端代码风格工具。

[![Build Status](https://img.shields.io/travis/ecomfe/fecs.svg?style=flat)](http://travis-ci.org/ecomfe/fecs)
[![Build Status](https://img.shields.io/appveyor/ci/chriswong/fecs.svg?style=flat)](https://ci.appveyor.com/project/chriswong/fecs)
[![NPM version](https://img.shields.io/npm/v/fecs.svg?style=flat)](https://www.npmjs.com/package/fecs)
[![Coverage Status](https://img.shields.io/coveralls/ecomfe/fecs.svg?style=flat)](https://coveralls.io/r/ecomfe/fecs)
[![Dependencies](https://img.shields.io/david/ecomfe/fecs.svg?style=flat)](https://david-dm.org/ecomfe/fecs)
[![DevDependencies](https://img.shields.io/david/dev/ecomfe/fecs.svg?style=flat)](https://david-dm.org/ecomfe/fecs)


### 安装

```
    $ [sudo] npm install fecs -g
```

### 使用

```
    fecs
    fecs -v
    fecs check --help
    fecs format --help
```

更多参数见 wiki: [CLI](https://github.com/ecomfe/fecs/wiki/CLI)

### API

#### fecs.leadName

设置或获取控制台输出信息前的名称，默认值为 `fecs`。

```javascript
var fecs = require('fecs');
fecs.leadName = 'edp';
...
```

#### fecs.getOptions(Array argv)

获取经 `minimist` 解释后的命令行参数对象，可用于 `fecs.check` 和 `fecs.format` 方法。

```javascript
var options = fecs.getOptions(process.argv.slice(2));

console.log(options.command); // 'check'
...
```

#### fecs.check(Object options[, Function done])

检查文件或输入流的代码规范。

```javascript
// 设置检查的文件路径
options._ = ['/path/to/check'];

// 或者设置为 stream
// options.stream = yourReadableStream;

// 设置文件类型
// options.type = 'js,css';


/**
 * callback after check finish
 *
 * @param {boolean} success true as all files ok, or false.
 * @param {Object[]} errors data for check result.
 */
function done(success, errors) {
    // blablabla
}

fecs.check(options, done);
```

#### fecs.format(Object options)

格式化、修复文件或输入流的代码。

```javascript
fecs.check(options);
```


### 工具支持

 - [x] [VIM](https://github.com/hushicai/fecs.vim)
 - [x] [WebStorm](https://github.com/leeight/Baidu-FE-Code-Style#webstorm)
 - [x] [Eclipse](https://github.com/ecomfe/fecs-eclipse)
 - [x] Sublime Text 2/3 [Baidu FE Code Style](https://github.com/leeight/Baidu-FE-Code-Style) [Sublime Helper](https://github.com/baidu-lbs-opn-fe/Sublime-fecsHelper) [SublimeLinter-contrib-fecs](https://github.com/robbenmu/SublimeLinter-contrib-fecs)
 - [x] Visual Studio Code [fecs-visual-studio-code](https://github.com/21paradox/fecs-visual-studio-code) [vscode-fecs(中文)](https://github.com/MarxJiao/VScode-fecs)
 - [x] [Atom](https://github.com/8427003/atom-fecs)
 - [x] [Emacs](https://github.com/Niandalu/flycheck-fecs)

 - [x] [Grunt](https://github.com/ecomfe/fecs-grunt)
 - [x] [Gulp](https://github.com/ecomfe/fecs-gulp)

 - [x] [Git Hook](https://github.com/cxtom/fecs-git-hooks)


### 常见问题

- <https://github.com/ecomfe/fecs/wiki/FAQ>
- <https://github.com/ecomfe/fecs/wiki/HowToFix>

更多信息请访问 <https://github.com/ecomfe/fecs/wiki>

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