MCPcopy Index your code
hub / github.com/ecomfe/fecs

github.com/ecomfe/fecs @1.6.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.6.4 ↗ · + Follow
205 symbols 398 edges 142 files 53 documented · 26% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

FECS

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

Build Status Build Status NPM version Coverage Status Dependencies DevDependencies

安装

    $ [sudo] npm install fecs -g

使用

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

更多参数见 wiki: CLI

API

fecs.leadName

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

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

fecs.getOptions(Array argv)

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

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

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

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

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

// 设置检查的文件路径
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)

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

fecs.check(options);

工具支持

常见问题

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

Core symbols most depended-on inside this repo

done
called by 35
lib/checker.js
getNodeIndent
called by 14
lib/js/rules/indent.js
checkNodesIndent
called by 6
lib/js/rules/indent.js
isSameScope
called by 5
lib/js/rules/no-global-require.js
isPureValue
called by 5
lib/js/rules/prefer-assign-pattern.js
buildReporter
called by 5
lib/reporter/index.js
checkLastNodeLineIndent
called by 4
lib/js/rules/indent.js
isPureObject
called by 4
lib/js/rules/valid-map-set.js

Shape

Function 205

Languages

TypeScript100%

Modules by API surface

lib/js/rules/valid-jsdoc.js18 symbols
lib/js/rules/prefer-class.js12 symbols
lib/js/rules/valid-class-jsdoc.js11 symbols
lib/js/rules/valid-var-jsdoc.js9 symbols
lib/js/rules/prefer-async-await.js9 symbols
lib/js/rules/no-global-require.js9 symbols
lib/js/rules/indent.js9 symbols
lib/js/rules/camelcase.js8 symbols
lib/js/rules/valid-map-set.js7 symbols
test/lib/util.spec.js5 symbols
lib/js/rules/valid-constructor.js5 symbols
lib/js/rules/prefer-destructure.js5 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add fecs \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact