Skip to content

Instantly share code, notes, and snippets.

@otakustay
Last active August 29, 2015 14:04
Show Gist options
  • Save otakustay/ce6448111f947e5789d4 to your computer and use it in GitHub Desktop.
Save otakustay/ce6448111f947e5789d4 to your computer and use it in GitHub Desktop.
jscs result
{
"additionalRules": [],
"fileExtensions": [".js"],
"excludeFiles": [
".**",
"./*.js",
"asset/**",
"report/**",
"node_modules/**",
"src/external/**",
"dep/**",
"example/**",
"doc/**"
],
"requireCurlyBraces": [
"if",
"else",
"for",
"while",
"do",
"try",
"catch"
],
"requireSpaceAfterKeywords": [
"if",
"else",
"for",
"while",
"do",
"switch",
"return",
"try",
"catch"
],
"requireSpaceBeforeBlockStatements": true,
"requireParenthesesAroundIIFE": true,
"requireSpacesInConditionalExpression": true,
"disallowSpacesInNamedFunctionExpression": {
"beforeOpeningRoundBrace": true
},
"disallowSpacesInFunctionDeclaration": {
"beforeOpeningRoundBrace": true
},
"disallowMultipleVarDecl": true,
"requireBlocksOnNewline": true,
"disallowEmptyBlocks": true,
"requireSpacesInsideObjectBrackets": "all",
"disallowSpacesInsideParentheses": true,
"requireCommaBeforeLineBreak": true,
"requireOperatorBeforeLineBreak": [],
"disallowSpaceAfterPrefixUnaryOperators": true,
"disallowSpaceBeforePostfixUnaryOperators": true,
"requireSpaceBeforeBinaryOperators": [
"=", "+=", "-=", "*=", "/=", "%=", "<<=", ">>=", ">>>=",
"&=", "|=", "^=", "+=",
"+", "-", "*", "/", "%", "<<", ">>", ">>>", "&",
"|", "^", "&&", "||", "===", "==", ">=",
"<=", "<", ">", "!=", "!=="
],
"requireSpaceAfterBinaryOperators": true,
"requireCamelCaseOrUpperCaseIdentifiers": true,
"disallowKeywords": ["with", "eval"],
"disallowMultipleLineStrings": true,
"validateLineBreaks": "LF",
"validateQuoteMarks": { "mark": "'", "escape": true },
"validateIndentation": 4,
"disallowMixedSpacesAndTabs": true,
"disallowTrailingComma": true,
"requireKeywordsOnNewLine": ["else", "catch"],
"requireLineFeedAtFileEnd": true,
"maximumLineLength": {
"value": 120,
"allowComments": true,
"allowRegex": true
},
"requireCapitalizedConstructors": true,
"requireDotNotation": true,
"validateJSDoc": {
"checkParamNames": true,
"requireParamTypes": true
},
"requireSpaceAfterLineComment": true
}
Invalid JSDoc @param at src/allianceADN/enum.js :
94 | * 通过ID获取外部联盟的Camelize的名称
95 | *
96 | * @param {Number}
-------------------^
97 | * @return {String}
98 | */
Illegal space before opening round brace at src/allianceADN/util.js :
86 | * @return {Object}
87 | */
88 | function getAllianceWithMultiKeys (alliances, adn) {
-------------------------^
89 | return u.find(
90 | alliances,
Should be one space instead of 2, after "return" keyword at src/app/ListView.js :
50 | var Table = require('esui/Table');
51 | var html = Table.command(modifyConfig);
52 | return html
------------------------------------^
53 | + '<br />'
54 | + '<span class="table-content-addition">'
Should be one space instead of 2, after "return" keyword at src/app/ListView.js :
65 | stable: true,
66 | content: function (item) {
67 | return ''
------------------------------------^
68 | + SystemDevice.fromValue(item.systemDevice).text
69 | + '<br />'
Missing space after line comment at src/common/ActionFactory.js :
59 | 'common/GlobalData', // GlobalData
60 | 'common/NavigatorLayoutChangeNotifier', // LayoutChangeNotifier
61 | 'common/session' //Session
-----------------------------------------^
62 | ];
63 | };
Invalid JSDoc @param argument name at src/common/ActionFactory.js :
66 | * 获取视图名称
67 | *
68 | * @param {er.meta.ActionContext} Action的执行上下文
-------------------^
69 | * @return {string}
70 | */
Invalid JSDoc @param argument name at src/common/ActionFactory.js :
83 | * 创建一个Action实例
84 | *
85 | * @param {er.meta.ActionContext} Action的执行上下文
-------------------^
86 | */
87 | proto.createRuntimeAction = function (actionContext) {
Invalid JSDoc @param argument name at src/common/ListModel.js :
37 | * 更新一个或多个实体的状态
38 | *
39 | * @param {number} status 目标状态
-------------------^
40 | * @param {string[]} ids id集合
41 | * @return {er.meta.FakeXHR}
Invalid JSDoc @param argument name at src/common/ListModel.js :
38 | *
39 | * @param {number} status 目标状态
40 | * @param {string[]} ids id集合
-------------------^
41 | * @return {er.meta.FakeXHR}
42 | * @override
Missing JSDoc @param type at src/common/ListView.js :
17 | /**
18 | * 加载 action,参数同 ActionPanel
19 | * @param options
-------------------^
20 | * @returns {ui/DrawerActionPanel}
21 | */
Invalid JSDoc @param at src/common/RequestStrategy.js :
40 | * 设置当前负责的实体名称
41 | *
42 | * @param {string} 实体名称
-------------------^
43 | */
44 | proto.setEntityName = function (entityName) {
Invalid JSDoc @param at src/common/StaticListAction.js :
48 | * 更新每页显示条数
49 | *
50 | * @param {Object} 事件对象
-------------------^
51 | */
52 | function updatePageSize(e) {
Invalid JSDoc @param at src/common/StaticListAction.js :
58 | * 更新表格
59 | *
60 | * @param {Object} 事件对象
-------------------^
61 | */
62 | function refreshTable(e) {
Invalid JSDoc @param argument name at src/common/StaticListData.js :
75 | * 过滤数据
76 | *
77 | * @param {string | number} a 原数据源第j个数据
-------------------^
78 | * @param {string | number} b 原数据源第j-1个数据
79 | * @param {string} order desc | asc
Operator ++ should stick to operand at src/common/StaticListData.js :
165 | StaticListData.prototype.sort = function(array, order, orderBy) {
166 | var length = array.length;
167 | for (var i = 0; i <= length - 2; i ++) {
-----------------------------------------------------^
168 | for (var j = length - 1; j >= 1; j --) {
169 | //对两个元素进行交换
Operator -- should stick to operand at src/common/StaticListData.js :
166 | var length = array.length;
167 | for (var i = 0; i <= length - 2; i ++) {
168 | for (var j = length - 1; j >= 1; j --) {
---------------------------------------------------------^
169 | //对两个元素进行交换
170 | compare('', 0, 'desc');
Missing space after line comment at src/common/StaticListData.js :
167 | for (var i = 0; i <= length - 2; i ++) {
168 | for (var j = length - 1; j >= 1; j --) {
169 | //对两个元素进行交换
----------------------------^
170 | compare('', 0, 'desc');
171 | var compareResult =
Operator ++ should stick to operand at src/common/StaticListModel.js :
164 | exports.sort = function(array, order, orderBy) {
165 | var length = array.length;
166 | for (var i = 0; i <= length - 2; i ++) {
-----------------------------------------------------^
167 | for (var j = length - 1; j >= 1; j --) {
168 | //对两个元素进行交换
Operator -- should stick to operand at src/common/StaticListModel.js :
165 | var length = array.length;
166 | for (var i = 0; i <= length - 2; i ++) {
167 | for (var j = length - 1; j >= 1; j --) {
---------------------------------------------------------^
168 | //对两个元素进行交换
169 | compare('', 0, 'desc');
Missing space after line comment at src/common/StaticListModel.js :
166 | for (var i = 0; i <= length - 2; i ++) {
167 | for (var j = length - 1; j >= 1; j --) {
168 | //对两个元素进行交换
----------------------------^
169 | compare('', 0, 'desc');
170 | var compareResult =
Missing space before closing curly brace at src/common/StaticListView.js :
52 | tableProperties.order = tableOrder;
53 | }
54 | this.fire('pagesizechange', { pageSize: pageSize, tableProperties: tableProperties});
------------------------------------------------------------------------------------------------------^
55 | }
56 |
Should be one space instead of 2, after "return" keyword at src/common/indicator.js :
41 | }
42 |
43 | return {
------------------------^
44 | enable: enable,
45 | show: show,
Illegal space before opening round brace at src/dashboard/Dashboard.js :
39 | };
40 |
41 | function jumpToAppCreate () {
-------------------------^
42 | this.session.once('drawerOpen', true);
43 | this.redirect('/app/list');
Expected indentation of 4 characters at src/dashboard/DashboardModel.js :
24 |
25 | return DashboardModel;
26 |});
------------^
Illegal space before opening round brace at src/dashboard/DashboardView.js :
18 | exports.template = 'dashboard';
19 |
20 | function jumpToAppCreate () {
-------------------------^
21 | this.fire('jumptoappcreate');
22 | }
Illegal space before opening round brace at src/finance/InvoiceSetListView.js :
46 | *
47 | */
48 | function resizeAgent () {
-------------------------^
49 | this.fire('allinvoicesloaded');
50 | }
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
51 | exports.sumInputAmount = 0.00;
52 |
53 | function bindSaleChildActionEvents () {
-------------------------^
54 | // 来自 `/finance/saleInvocie/Form.redirectAfterCancel` 新建时取消后抛出事件,隐藏这个子Action
55 | this.get('sale-invoice-panel').on('action@hidesaleinvoice', hideSaleInvoice, this);
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
59 | }
60 |
61 | function bindVATCreateChildActionEvents () {
-------------------------^
62 | // 当填写增值税发票信息的子Action加载完成后,触发一次resize事件,并通过Agent逐层上报
63 | this.get('vat-invoice-panel-create').on('action@entercomplete', resizeAgent, this);
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
75 | }
76 |
77 | function bindVATChildActionsEvents () {
-------------------------^
78 | // 批量注册各个增值税发票子Action抛出的加载完成事件、delete事件和重新计算已填金额的事件
79 | u.each(
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
92 | *
93 | */
94 | function addSaleInvoice () {
-------------------------^
95 | var addButton = this.getSafely('sale-invoice-add');
96 | var saleInvoicePanel = this.getSafely('sale-invoice-panel');
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
111 | *
112 | */
113 | function hideSaleInvoice () {
-------------------------^
114 | var addButton = this.getSafely('sale-invoice-add');
115 | var saleInvoicePanel = this.getSafely('sale-invoice-panel');
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
126 | *
127 | */
128 | function addVATInvoice () {
-------------------------^
129 | var addButton = this.getSafely('vat-invoice-add');
130 | var vatInvoicePanelContainer = this.getSafely('vat-invoice-panel-container');
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
151 | *
152 | */
153 | function hideVATInvoice () {
-------------------------^
154 | var addButton = this.getSafely('vat-invoice-add');
155 | var vatInvoicePanelContainer = this.getSafely('vat-invoice-panel-container');
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
173 | *
174 | */
175 | function switchVATCreateToRead (e) {
-------------------------^
176 | var id = e.id;
177 | var invoiceState = this.model.get('invoiceState');
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
206 | *
207 | */
208 | function deleteVATInvoice (e) {
-------------------------^
209 | var args = e.id;
210 | var id = args.id;
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
230 | *
231 | */
232 | function recalculateVATAmount (e) {
-------------------------^
233 | var action = e.target.action;
234 | var amount = action.getAmount();
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
243 | *
244 | */
245 | function resizeAgent () {
-------------------------^
246 | this.fire('allinvoicesloaded');
247 | }
Illegal space before opening round brace at src/finance/InvoiceSetReadView.js :
251 | *
252 | */
253 | function initTaxType () {
-------------------------^
254 | var salePanel = this.getSafely('sale-panel');
255 | var vatPanel = this.getSafely('vat-panel');
Missing JSDoc @param type at src/finance/ListView.js :
141 | * 弹出发票信息Dialog
142 | *
143 | * @param args {Object}
-------------------^
144 | * @override
145 | */
Illegal space before opening round brace at src/finance/ListView.js :
144 | * @override
145 | */
146 | function popupInvoice (args) {
-------------------------^
147 | var command = args.name;
148 | var params = JSON.parse(args.args);
Illegal space before opening round brace at src/finance/vatInvoice/Read.js :
38 |
39 | // 删除发票
40 | function deleteInvoice () {
-------------------------^
41 | var id = this.model.get('id');
42 | var invoiceNumber = this.model.get('taxInvoiceNo');
Illegal space before opening round brace at src/finance/vatInvoice/Read.js :
50 | }
51 |
52 | function reportDelete (id) {
-------------------------^
53 | this.fire('invoicedeleted', { id: id });
54 | }
Illegal space before opening round brace at src/finance/vatInvoice/Read.js :
54 | }
55 |
56 | function notifyModifyFail (invoiceNumber) {
-------------------------^
57 | this.view.alert(
58 | '无法删除发票:' + invoiceNumber,
Illegal space before opening round brace at src/finance/vatInvoice/ReadView.js :
40 | };
41 |
42 | function deleteSelf () {
-------------------------^
43 | this.fire('deleteme');
44 | }
Operator = should not stick to following expression at src/report/ChartModel.js :
9 |define(
10 | function (require) {
11 | var u =require('common/util');
----------------------^
12 | /*
13 | * @class ReportChartModel
Expected indentation of 4 characters at src/report/Entry.js :
77 |
78 | return EntryAction;
79 |});
------------^
Illegal space before closing round bracket at src/report/EntryModel.js :
75 |
76 | // 报告可选区间最晚不超过今天(PM未确认)
77 | this.set('range', { end: m().startOf('day').toDate() } );
--------------------------------------------------------------------------^
78 |
79 | var url = this.get('url');
Invalid JSDoc @param argument name at src/report/EntryModel.js :
136 | * 获取报告显示区间
137 | *
138 | * @param {string} beginTime 开始时间
-------------------^
139 | * @param {string} endTime 结束时间
140 | * @return {Object}
Illegal space before opening round brace at src/report/EntryModel.js :
140 | * @return {Object}
141 | */
142 | function getDisplayDuration (startTime, endTime) {
-------------------------^
143 | if (startTime && endTime) {
144 | return {
Expected indentation of 4 characters at src/report/EntryModel.js :
221 |
222 | return EntryModel;
223 |});
------------^
224 |
Invalid JSDoc @param argument name at src/report/EntryView.js :
47 | *
48 | *
49 | * @param {Object} e 控件事件对象
-------------------^
50 | */
51 | function notifyRefresh(args) {
Invalid JSDoc @param at src/report/EntryView.js :
124 | * 获取搜索参数
125 | *
126 | * @param {Array} 要获取的参数
-------------------^
127 | * @return {Object}
128 | */
Expected indentation of 4 characters at src/report/EntryView.js :
145 |
146 | return EntryView;
147 |});
------------^
Invalid JSDoc @param at src/report/GeneralModel.js :
53 | * 获取ReportData
54 | *
55 | * @param {Function}
-------------------^
56 | *
57 | */
Invalid JSDoc @param argument name at src/report/List.js :
42 | * 参数更新后重新加载操作
43 | *
44 | * @param {object} tableProperties 表格排序配置
-------------------^
45 | * @override
46 | */
Illegal space before opening round brace at src/slot/FormView.js :
41 | * 触发加载AppInfo的事件,已加载或刷新App信息
42 | */
43 | function getAppInfo () {
-------------------------^
44 | this.fire('refreshappinfo');
45 | }
Invalid JSDoc @param argument name at src/slot/FormView.js :
57 | * 设置当前选择的App信息
58 | *
59 | * @param {String} systemDevice 系统+终端
-------------------^
60 | * @param {String} version 版本
61 | */
Expected indentation of 20 characters at src/slot/ListModel.js :
136 | },
137 | systemDevice: {
138 | text: filterHelper.select.getText,
----------------------------^
139 | datasource: this.get('systemDevices'),
140 | value: this.get('systemDevice')
Expected indentation of 20 characters at src/slot/ListModel.js :
137 | systemDevice: {
138 | text: filterHelper.select.getText,
139 | datasource: this.get('systemDevices'),
----------------------------^
140 | value: this.get('systemDevice')
141 | },
Expected indentation of 20 characters at src/slot/ListModel.js :
138 | text: filterHelper.select.getText,
139 | datasource: this.get('systemDevices'),
140 | value: this.get('systemDevice')
----------------------------^
141 | },
142 | status: {
Expected indentation of 20 characters at src/slot/ListModel.js :
141 | },
142 | status: {
143 | text: filterHelper.select.getText,
----------------------------^
144 | datasource: this.get('statuses'),
145 | value: this.get('status')
Expected indentation of 20 characters at src/slot/ListModel.js :
142 | status: {
143 | text: filterHelper.select.getText,
144 | datasource: this.get('statuses'),
----------------------------^
145 | value: this.get('status')
146 | },
Expected indentation of 20 characters at src/slot/ListModel.js :
143 | text: filterHelper.select.getText,
144 | datasource: this.get('statuses'),
145 | value: this.get('status')
----------------------------^
146 | },
147 | type: {
Expected indentation of 20 characters at src/slot/ListModel.js :
146 | },
147 | type: {
148 | text: filterHelper.select.getText,
----------------------------^
149 | datasource: this.get('types'),
150 | value: this.get('type')
Expected indentation of 20 characters at src/slot/ListModel.js :
147 | type: {
148 | text: filterHelper.select.getText,
149 | datasource: this.get('types'),
----------------------------^
150 | value: this.get('type')
151 | }
Expected indentation of 20 characters at src/slot/ListModel.js :
148 | text: filterHelper.select.getText,
149 | datasource: this.get('types'),
150 | value: this.get('type')
----------------------------^
151 | }
152 | };
Should be one space instead of 2, after "return" keyword at src/slot/ListView.js :
48 | var Table = require('esui/Table');
49 | var html = Table.command(modifyConfig);
50 | return html
------------------------------------^
51 | + '<br />'
52 | + '<span class="table-content-addition">'
Invalid JSDoc @param argument name at src/static/Base.js :
36 | *
37 | * @param {string} key queryStringKey
38 | * @param {string|null} default 没取到的话返回的默认值
-----------------------^
39 | * @return {string} queryStringValue
40 | */
Missing space after line comment at src/static/BaseForm.js :
15 | var Class = require('eoo');
16 |
17 | //加载表单常用控件
----------------^
18 | require('esui/validator/PatternRule');
19 | require('esui/validator/MaxLengthRule');
Missing space after line comment at src/static/BaseForm.js :
26 |
27 |
28 | //开启 ajax 全局错误的处理,如500错误
----------------^
29 | require('common/extension/ajax').enable();
30 |
Keyword `else` should be placed on new line at src/static/Index.js :
32 | if (this['entered-login'].value === '') {
33 | errorText = '用户名不得为空!';
34 | } else if (this['entered-password'].value === '') {
----------------------^
35 | errorText = '密码不得为空!';
36 | } else if (this['entered-imagecode'].value === '') {
Keyword `else` should be placed on new line at src/static/Index.js :
34 | } else if (this['entered-password'].value === '') {
35 | errorText = '密码不得为空!';
36 | } else if (this['entered-imagecode'].value === '') {
----------------------^
37 | errorText = '验证码不得为空!';
38 | }
Use dot notation instead of brackets for member expressions at src/static/Main.js :
41 | /* jshint sub: true */
42 | var errorText = '';
43 | if (entity['entered_login'] === '') {
-----------------------------------^
44 | errorText = '用户名不得为空!';
45 | }
Use dot notation instead of brackets for member expressions at src/static/Main.js :
44 | errorText = '用户名不得为空!';
45 | }
46 | else if (entity['entered_password'] === '') {
----------------------------------------^
47 | errorText = '密码不得为空!';
48 | }
Use dot notation instead of brackets for member expressions at src/static/Main.js :
47 | errorText = '密码不得为空!';
48 | }
49 | else if (entity['entered_imagecode'] === '') {
----------------------------------------^
50 | errorText = '验证码不得为空!';
51 | }
Missing space after line comment at src/strategy/FormModel.js :
454 | */
455 | exports.processSlotData = function (allSlots) {
456 | //将代码位按横幅、开屏、插屏分类。
--------------------^
457 | var slots = {};
458 | slots[SlotType.BANNER] = [];
Invalid JSDoc @param argument name at src/strategy/FormModel.js :
591 | * 后端错误返回的是Id,需要把名字显示出来
592 | *
593 | * @param {string} Id id
-------------------^
594 | * @return {string} App名称
595 | */
Missing space after opening curly brace at src/strategy/FormModel.js :
596 | exports.getAppNameById = function (id) {
597 | var allSlots = this.get('allSlots');
598 | var item = u.findWhere(allSlots, {'appId': '' + id}) || {};
------------------------------------------------------^
599 | return item.appName;
600 | };
Missing space before closing curly brace at src/strategy/FormModel.js :
596 | exports.getAppNameById = function (id) {
597 | var allSlots = this.get('allSlots');
598 | var item = u.findWhere(allSlots, {'appId': '' + id}) || {};
----------------------------------------------------------------------^
599 | return item.appName;
600 | };
Invalid JSDoc @param argument name at src/strategy/FormModel.js :
603 | * 后端错误返回的是Id,需要把名字显示出来
604 | *
605 | * @param {string} Id id
-------------------^
606 | * @return {string} 代码位名称
607 | */
Missing space after opening curly brace at src/strategy/FormModel.js :
608 | exports.getSlotNameById = function (id) {
609 | var allSlots = this.get('allSlots');
610 | var item = u.findWhere(allSlots, {'id': '' + id}) || {};
------------------------------------------------------^
611 | return item.name;
612 | };
Missing space before closing curly brace at src/strategy/FormModel.js :
608 | exports.getSlotNameById = function (id) {
609 | var allSlots = this.get('allSlots');
610 | var item = u.findWhere(allSlots, {'id': '' + id}) || {};
-------------------------------------------------------------------^
611 | return item.name;
612 | };
Illegal space before opening round brace at src/strategy/FormView.js :
136 | * @ignore
137 | */
138 | function refreshCreative () {
-------------------------^
139 | var type = this.get('type').getValue();
140 | var creativeInfo = this.model.getDataWithType(type, 'creative');
Expected indentation of 20 characters at src/strategy/ListModel.js :
120 | },
121 | type: {
122 | text: filterHelper.select.getText,
----------------------------^
123 | datasource: this.get('types'),
124 | value: this.get('type')
Expected indentation of 20 characters at src/strategy/ListModel.js :
121 | type: {
122 | text: filterHelper.select.getText,
123 | datasource: this.get('types'),
----------------------------^
124 | value: this.get('type')
125 | },
Expected indentation of 20 characters at src/strategy/ListModel.js :
122 | text: filterHelper.select.getText,
123 | datasource: this.get('types'),
124 | value: this.get('type')
----------------------------^
125 | },
126 | systemDevice: {
Expected indentation of 20 characters at src/strategy/ListModel.js :
125 | },
126 | systemDevice: {
127 | text: filterHelper.select.getText,
----------------------------^
128 | datasource: this.get('systemDevices'),
129 | value: this.get('systemDevice')
Expected indentation of 20 characters at src/strategy/ListModel.js :
126 | systemDevice: {
127 | text: filterHelper.select.getText,
128 | datasource: this.get('systemDevices'),
----------------------------^
129 | value: this.get('systemDevice')
130 | }
Expected indentation of 20 characters at src/strategy/ListModel.js :
127 | text: filterHelper.select.getText,
128 | datasource: this.get('systemDevices'),
129 | value: this.get('systemDevice')
----------------------------^
130 | }
131 | };
Should be one space instead of 2, after "return" keyword at src/strategy/ListView.js :
97 | stable: true,
98 | content: function (item) {
99 | return Type.fromValue(item.type).text;
------------------------------------^
100 | }
101 | },
Operator : should not stick to following expression at src/ui/BaseChart.js :
143 | name: '',
144 | axisLabel: {
145 | show:true,
--------------------------------^
146 | interval: 'auto',
147 | margin: this.get('yAxisTextMargin'),
Operator ++ should stick to operand at src/ui/BaseChart.js :
192 | var baseScale = chart.scale.split(',');
193 | var scale;
194 | for (var i = 0; i < baseScale.length; i ++) {
----------------------------------------------------------^
195 | // 实际比例尺选择范围是基础比例尺乘以加权值
196 | baseScale[i] = parseFloat(baseScale[i]) * power;
Illegal space after opening round bracket at src/ui/BaseChart.js :
243 | for (var i = 1; i >= 0; i--) {
244 | var yAxisName = lib.g(
245 | helper.getId(control, 'yaxis-' + ( i+1 ))
--------------------------------------------------------------^
246 | );
247 |
Operator + should not stick to following expression at src/ui/BaseChart.js :
243 | for (var i = 1; i >= 0; i--) {
244 | var yAxisName = lib.g(
245 | helper.getId(control, 'yaxis-' + ( i+1 ))
----------------------------------------------------------------^
246 | );
247 |
Operator + should not stick to following expression at src/ui/BaseChart.js :
243 | for (var i = 1; i >= 0; i--) {
244 | var yAxisName = lib.g(
245 | helper.getId(control, 'yaxis-' + ( i+1 ))
----------------------------------------------------------------^
246 | );
247 |
Illegal space before closing round bracket at src/ui/BaseChart.js :
243 | for (var i = 1; i >= 0; i--) {
244 | var yAxisName = lib.g(
245 | helper.getId(control, 'yaxis-' + ( i+1 ))
------------------------------------------------------------------^
246 | );
247 |
Should be one space instead of 0, after "if" keyword at src/ui/BaseChart.js :
246 | );
247 |
248 | if((control.hideLabel) && control.hideLabel !== 'true'){
--------------------------^
249 | var labelHtml = '— —';
250 | if(control.ySeries[i]){
Missing space before opening curly brace for block expressions at src/ui/BaseChart.js :
246 | );
247 |
248 | if((control.hideLabel) && control.hideLabel !== 'true'){
------------------------------------------------------------------------------^
249 | var labelHtml = '— —';
250 | if(control.ySeries[i]){
Should be one space instead of 0, after "if" keyword at src/ui/BaseChart.js :
248 | if((control.hideLabel) && control.hideLabel !== 'true'){
249 | var labelHtml = '— —';
250 | if(control.ySeries[i]){
------------------------------^
251 | var labelColor = control.ySeries[i].lineColor;
252 | labelHtml = '' +
Missing space before opening curly brace for block expressions at src/ui/BaseChart.js :
248 | if((control.hideLabel) && control.hideLabel !== 'true'){
249 | var labelHtml = '— —';
250 | if(control.ySeries[i]){
-------------------------------------------------^
251 | var labelColor = control.ySeries[i].lineColor;
252 | labelHtml = '' +
Expected indentation of 16 characters at src/ui/BaseChart.js :
293 | */
294 | '<div class="${className}">',
295 | '<div id="${chartId}" style="height:300px; margin:0; min-width:960px"></div>',
------------------------^
296 | '<div id="${yAxis1Name}" class="${yAxis1NameClass}"></div>',
297 | '<div id="${yAxis2Name}" class="${yAxis2NameClass}"></div>',
Expected indentation of 16 characters at src/ui/BaseChart.js :
294 | '<div class="${className}">',
295 | '<div id="${chartId}" style="height:300px; margin:0; min-width:960px"></div>',
296 | '<div id="${yAxis1Name}" class="${yAxis1NameClass}"></div>',
------------------------^
297 | '<div id="${yAxis2Name}" class="${yAxis2NameClass}"></div>',
298 | '<div id="${loadingMaskId}" style="line-height:300px;"',
Expected indentation of 16 characters at src/ui/BaseChart.js :
295 | '<div id="${chartId}" style="height:300px; margin:0; min-width:960px"></div>',
296 | '<div id="${yAxis1Name}" class="${yAxis1NameClass}"></div>',
297 | '<div id="${yAxis2Name}" class="${yAxis2NameClass}"></div>',
------------------------^
298 | '<div id="${loadingMaskId}" style="line-height:300px;"',
299 | ' class="${loadingMask}">${loadingText}</div>',
Expected indentation of 16 characters at src/ui/BaseChart.js :
296 | '<div id="${yAxis1Name}" class="${yAxis1NameClass}"></div>',
297 | '<div id="${yAxis2Name}" class="${yAxis2NameClass}"></div>',
298 | '<div id="${loadingMaskId}" style="line-height:300px;"',
------------------------^
299 | ' class="${loadingMask}">${loadingText}</div>',
300 | '</div>'
Expected indentation of 16 characters at src/ui/BaseChart.js :
297 | '<div id="${yAxis2Name}" class="${yAxis2NameClass}"></div>',
298 | '<div id="${loadingMaskId}" style="line-height:300px;"',
299 | ' class="${loadingMask}">${loadingText}</div>',
------------------------^
300 | '</div>'
301 | ];
Should be one space instead of 0, after "if" keyword at src/ui/BaseChart.js :
362 | chart.formatXSeries(xSeries);
363 | // 为了美观,当x轴数据只有1条时,数据不顶格
364 | if(xSeries.length == 1){
------------------------------^
365 | chart.chartOptions.xAxis[0].boundaryGap = true;
366 | }
Missing space before opening curly brace for block expressions at src/ui/BaseChart.js :
362 | chart.formatXSeries(xSeries);
363 | // 为了美观,当x轴数据只有1条时,数据不顶格
364 | if(xSeries.length == 1){
--------------------------------------------------^
365 | chart.chartOptions.xAxis[0].boundaryGap = true;
366 | }
Operator ++ should stick to operand at src/ui/BaseChart.js :
370 | var formattedYSeries = [];
371 | chart.legend = {};
372 | for (var i = 0; i < ySeries.length; i ++) {
----------------------------------------------------------------^
373 | var serie = ySeries[i];
374 | // 格式化y轴坐标数据
Operator + should not stick to following expression at src/ui/BaseChart.js :
385 | }
386 | else {
387 | chart.legend[serie.label+'_bak'] = {
------------------------------------------------------------^
388 | color: serie.lineColor,
389 | format: serie.format
Operator + should not stick to following expression at src/ui/BaseChart.js :
385 | }
386 | else {
387 | chart.legend[serie.label+'_bak'] = {
------------------------------------------------------------^
388 | color: serie.lineColor,
389 | format: serie.format
Should be one space instead of 2, after "return" keyword at src/ui/DrawerActionPanel.js :
63 |
64 | function getMask(panel) {
65 | return panel.helper.getPart('mask') || document.body.appendChild(panel.helper.createPart('mask'));
----------------------------^
66 | }
67 |
Invalid JSDoc @param argument name at src/ui/LineChart.js :
51 | * 格式化y轴某条连续数据
52 | *
53 | * @param {LineChart} chart 类实例
-------------------^
54 | * @param {Object} serie y轴数据
55 | * @param {number} index y轴数据索引
Invalid JSDoc @param argument name at src/ui/LineChart.js :
52 | *
53 | * @param {LineChart} chart 类实例
54 | * @param {Object} serie y轴数据
-------------------^
55 | * @param {number} index y轴数据索引
56 | * @return {Object} 返回格式化后的y轴显示所需数据对象
Operator ++ should stick to operand at src/ui/LineChart.js :
100 | LineChart.prototype.buildYAxis = function (ySeries) {
101 | var yAxis = [];
102 | for (var i = 0; i < ySeries.length; i ++) {
--------------------------------------------------------^
103 | var serie = ySeries[i];
104 | // 格式化y轴刻度数据
114 code style errors found.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment