Well Hello Friends.
leeight / baidu-fe-code-style Goto Github PK
View Code? Open in Web Editor NEWBaidu FE Code Style Sublime(2,3) Plugin
License: MIT License
Baidu FE Code Style Sublime(2,3) Plugin
License: MIT License
Well Hello Friends.
JS代码检测正常,CSS和HTML不行。。fecs不是可以检测css和HTML么
webstorm8
nodejs 12
按照图示配置好,保存没有检测出来
请问会是什么问题呢?
求助:
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 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,请问是需要什么配置才会生效么?
RT
console提示: error: String required
如题,与jsFormat不兼容,卸载Baidu-FE-Code-Style后jsFormat可以正常使用
RT
每次重启sublime后,插件就失效了。
目前的解决方案有两个:
但是重启后依然失效,需要再次禁用启用
求助大神!
Congratulations! Everything is OK!
sublime 3 / win7
{
"env": {
"fecs_bin": "tools/npm/node_modules/fecs/bin/fecs",
"node_bin": "tools/npm/node.exe"
}
}
是git clone吧?
尝试了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默认在哪里?
node -v : v0.10.35
fecs -v :fecs 0.2.7
求解决方案?
mac下jscs package路径是啥呀
报错 [WinError 5] 拒绝访问
我想在webstorm中直接对vue项目进行格式规范,vue不起效果啊,现在的做法师用chrome的fecs中的html格式化,不方便,可以考虑做vue的支持么
第一次安装时有Formatter和Linter两个命令,不知道为什么现在又没这两个命令了,remove以后重新install仍然没有这个命令
如题,能够正常检查但是会出现node运行的cmd弹窗并且在一秒左右消失,影响使用体验
重载入也不生效
针对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错误
辛苦相关人员跟进一下这两个情况,谢谢
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
保存之后会弹出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"
}
}
如题。
现在在webstorm里,各种[建议]规范都标示出来,看上去好像全是代码错误一样,看着有点难受。。
非常感谢
是否有计划支持VS Code?希望支持VS Code的那一天快点到来
因为在使用中会频繁保存,每次都会耗时弹框,影响效率。
规范太严格了,AMD使用module.exports直接说变量出错!
有没有window系统下的详细配置方法
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.