GithubHelp home page GithubHelp logo

baidu-fe-code-style's Introduction

Well Hello Friends.

baidu-fe-code-style's People

Contributors

chestnutchen avatar leeight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

baidu-fe-code-style's Issues

win8 sublime 2 安装后没有效果

求助:

win8 64位
sublime2 v2.0.2 build 2221
fecs 0.1.1

命令行下执行有效果

C:\>fecs
fecs  INFO aa.js (12 messages)
fecs  WARN → line 1, col 0: Missing JSDoc @file.
fecs  WARN → line 1, col 0: Missing JSDoc @author.
fecs  WARN → line 1, col 9: Missing semicolon.
fecs  WARN → line 4, col 1: Bad indentation (0 instead 4).
fecs  WARN → line 5, col 1: Bad indentation (0 instead 4).
fecs  WARN → line 6, col 1: Bad indentation (0 instead 4).
fecs  WARN → line 7, col 1: Bad indentation (0 instead 4).
fecs  WARN → line 7, col 1: Expression called with trailing whitespace before se
micolon
fecs  WARN → line 8, col 1: Bad indentation (0 instead 4).
fecs  WARN → line 8, col 6: There should be no spaces inside this paren.
fecs  WARN → line 8, col 10: There should be no spaces inside this paren.
fecs  WARN → line 9, col 1: Newline required at end of file but not found.

fecs: 113ms

但是装了插件后,保存时没有任何提示。

配置如下(用username代替我的用户名):

{
    "env": {
        "fecs_bin": "C:\\Users\\username\\AppData\\Roaming\\npm\\node_modules\\fecs\\bin\\fecs",
        "node_bin": "D:\\Program Files\\nodejs\\node"
    }
}

或者

{
    "env": {
        "fecs_bin": "C:\\Users\\username\\AppData\\Roaming\\npm\\fecs",
        "node_bin": "D:\\Program Files\\nodejs\\node"
    }
}

一开始配错了还会弹个 "Error 5",这会完全没有任何效果。

求大神给看看是不是还是路径没配对?

Sublime 3 安装以后信息栏提示是乱码,无法查看

Sublime Build 3065
如:

30:4 b'rule 038: [\xe5\xbc\xba\xe5\x88\xb6] \xe5\xbf\x85\xe9\xa1\xbb\xe7\x8b\xac\xe5\x8d\xa0\xe4\xb8\x80\xe8\xa1\x8c\xe3\x80\x82`//` \xe5\x90\x8e\xe8\xb7\x9f\xe4\xb8\x80\xe4\xb8\xaa\xe7\xa9\xba\xe6\xa0\xbc\xef\xbc\x8c\xe7\xbc\xa9\xe8\xbf\x9b\xe4\xb8\x8e\xe4\xb8\x8b\xe4\xb8\x80\xe8\xa1\x8c\xe8\xa2\xab\xe6\xb3\xa8\xe9\x87\x8a\xe8\xaf\xb4\xe6\x98\x8e\xe7\x9a\x84\xe4\xbb\xa3\xe7\xa0\x81\xe4\xb8\x80\xe8\x87\xb4\xe3\x80\x82'
32:0 b'rule 038: [\xe5\xbc\xba\xe5\x88\xb6] \xe5\xbf\x85\xe9\xa1\xbb\xe7\x8b\xac\xe5\x8d\xa0\xe4\xb8\x80\xe8\xa1\x8c\xe3\x80\x82`//` \xe5\x90\x8e\xe8\xb7\x9f\xe4\xb8\x80\xe4\xb8\xaa\xe7\xa9\xba\xe6\xa0\xbc\xef\xbc\x8c\xe7\xbc\xa9\xe8\xbf\x9b\xe4\xb8\x8e\xe4\xb8\x8b\xe4\xb8\x80\xe8\xa1\x8c\xe8\xa2\xab\xe6\xb3\xa8\xe9\x87\x8a\xe8\xaf\xb4\xe6\x98\x8e\xe7\x9a\x84\xe4\xbb\xa3\xe7\xa0\x81\xe4\xb8\x80\xe8\x87\xb4\xe3\x80\x82'
41:1 b'rule 002: [\xe5\xbb\xba\xe8\xae\xae] \xe5\x9c\xa8\xe6\x96\x87\xe4\xbb\xb6\xe7\xbb\x93\xe5\xb0\xbe\xe5\xa4\x84\xef\xbc\x8c\xe4\

js文件内容

//Step 1. 取消下面的注释开启simple插件,注意需要先进行插件安装 npm install -g fis-postpackager-simple
fis.config.set('modules.postpackager', 'simple');
var now = new Date();
fis.config.set('timestamp', [now.getFullYear(), now.getMonth() + 1, now.getDate(), now.getHours()].join(''));
//通过pack设置干预自动合并结果,将公用资源合并成一个文件,更加利于页面间的共用

// //Step 2. 取消下面的注释开启pack人工干预
// fis.config.set('pack', {
//     'pkg/lib.js': [
//         '/lib/mod.js',
//         '/modules/underscore/**.js',
//         '/modules/backbone/**.js',
//         '/modules/jquery/**.js',
//         '/modules/vendor/**.js',
//         '/modules/common/**.js'
//     ]
// });

// //Step 3. 取消下面的注释可以开启simple对零散资源的自动合并
fis.config.set('settings.postpackager.simple.autoCombine', true);

// //Step 4. 取消下面的注释开启图片合并功能
fis.config.set('roadmap.path', [{
    reg: '**.css',
    useSprite: true,
    useHash: false
}, {
    reg: /.*\.(js|css|png|gif)$/,
    query: '?t=${timestamp}',
    //useSprite: true
    useHash: false
//}, {
    // reg: '**.jsp',
    // isHtmlLike:true
}]);


// fis.config.set('settings.spriter.csssprites.margin', 80);
// fis.config.set('modules.parser.less', 'less');
// //将less文件编译为css
// fis.config.set('roadmap.ext.less', 'css');

没有生效

用package control安装该插件后,没有任何效果
使用的是mac下的sublime 3,请问是需要什么配置才会生效么?

Windows 下问题

  • 没有错误提示, 控制台永远都是:
Congratulations! Everything is OK!
  • 保存调用 node 时会弹出 cmd 窗口

sublime 3 / win7

{
  "env": {
    "fecs_bin": "tools/npm/node_modules/fecs/bin/fecs",
    "node_bin": "tools/npm/node.exe"
  }
}

在sublime text 3配置好后不生效

尝试了package Control安装和手动安装两种方式。修改user-setting为:

{
"env": {
"fecs_bin": "/usr/local/bin/fecs",
"node_bin": "/usr/local/bin/node"
}
}
修改完成后使用右键可见到Baidu FE Code Style Formatter。但是选择后没有效果,重启sublime也没有效果。
怀疑是user-setting写的有问题,在/usr/local/bin路径下没有找到fecs。如果是这个问题,请问fecs默认在哪里?

可以添加对vue的支持吗

我想在webstorm中直接对vue项目进行格式规范,vue不起效果啊,现在的做法师用chrome的fecs中的html格式化,不方便,可以考虑做vue的支持么

Sublime配置完了没效果

安装成功之后,按照本地目录配置了环境:
{
"env": {
"fecs_bin": "C:/Users/Administrator/AppData/Roaming/npm/node_modules/fecs/bin/fecs",
"node_bin": "D:/Program Files/nodejs/node.exe"
}
}
但是,插件用不了,没任何反应~
6 n iuo013 n2 29o _ i 8
求助~

安装后无可执行命令

第一次安装时有Formatter和Linter两个命令,不知道为什么现在又没这两个命令了,remove以后重新install仍然没有这个命令

报两个插件问题:分别对应代码规范rule94与rule 29

针对Rule 94对应的是,我一个对象里定义如下

var obj = {
    showSpecs: service.runService('getShowSpecs', params),
    productsBySpec: service.runService('getProductsBySpec', params),
    $allSpecs: _.map(commonConfig.PRODUCT_OVERALL_ITEMS, function(item) {
        var result = {
            value: item,
            name: itemMap[item]
        };
        return result;
    })
};

只要有$开头就会报违反rule94,·[强制] [RULE094] 对象创建时,如果一个对象的所有 属性 均可以不添加引号,则所有 属性 不得添加引号。
实际上上面代码里面我认为应该没有违反,$开头的变量是因为在使用avalon once-binding的变量要求用$开头的情况。

针对Rule 29对应的是,我一个对象里定义如下

var deferred = $.Deferred();

实际没有类定义,但是这里就rule 29错误

辛苦相关人员跟进一下这两个情况,谢谢

执行 formatter 菜单命令时报错

Traceback (most recent call last):
  File "fecs in D:\program files\Sublime Text Build 3065 x64\Data\Installed Packages\Baidu FE Code Style.sublime-package", line 167, in cb
TypeError: begin_edit() missing 2 required positional arguments: 'edit_token' and 'cmd'

windows 7、sublimeText3

windows下配置弹出如下错误

保存之后会弹出node.exe的启动框,其它没任何反应,关闭启动框后弹出错误:No Json object could be decoded

配置如下:
{
"env": {
"fecs_bin": "C:/Users/zhangzengwei/AppData/Roaming/npm/node_modules/fecs/bin/fecs",
"node_bin": "C:/Program Files/nodejs/node.exe"
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.