Skip to content

Commit

Permalink
chore: lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
xudafeng committed Jan 6, 2019
1 parent e4b8a6c commit e70b7d4
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
coverage
view
app/controller/app.js
2 changes: 1 addition & 1 deletion app/common/error/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ module.exports = new Map([
'ERR_RELIABLE_BUILD_RECORD_NOT_FOUND', {
message: 'Build record not found.',
},
]
],
]);
4 changes: 2 additions & 2 deletions app/extend/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const render = require('../../view/lib/render');

module.exports = {
render (context, options) {
render(context, options) {
return render(context, options);
},
};
};
8 changes: 4 additions & 4 deletions app/extend/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const debug = require('debug')('reliable:reliable-dingtalk');
const ChatBot = require('dingtalk-robot-sender');

const sendMarkdown = async (options) => {
const sendMarkdown = async options => {
debug(options);
const robot = new ChatBot({
webhook: options.webhook.url,
Expand All @@ -17,7 +17,7 @@ const sendMarkdown = async (options) => {

module.exports = {
sendMarkdown,
sendDingTalk: async function ({
async sendDingTalk({
webhook,
data,
staticServerUrl,
Expand Down Expand Up @@ -48,7 +48,7 @@ module.exports = {

text.push('#### Test report');
const staticUrl = `${staticServerUrl}/jenkins/${ci.JOB_NAME}/${ci.BUILD_NUMBER}/`;
const buildStaticPath = path => /^https?:\/\//.test(path) ? path : staticUrl + path;
const buildStaticPath = path => (/^https?:\/\//.test(path) ? path : staticUrl + path);
const passLogUrl = buildStaticPath(testInfo.testHtmlReporterPath);

if (testInfo && testInfo.tests) {
Expand Down Expand Up @@ -84,5 +84,5 @@ module.exports = {
} catch (e) {
console.log(e.stack);
}
}
},
};
4 changes: 2 additions & 2 deletions database/seeders/20180815163737-add-seed-to-table-jobNames.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'bar',
].map(
item => {
console.log('item')
console.log('item');
return {
jobName: item,
uniqId: uuidv4(),
Expand All @@ -20,7 +20,7 @@ module.exports = {
};
}
));
console.log('finish up')
console.log('finish up');
},

down: async queryInterface => {
Expand Down
10 changes: 5 additions & 5 deletions view/src/components/BuildsTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default class BuildsTable extends React.Component {
res && message.success('UniqId copied to clipboard.');
});
}} className="builds-table-uniqId-tip"
type="copy" theme="filled" style={{ color: '#2593fc' }}
type="copy" theme="filled" style={{ color: '#2593fc' }}
/>
</Popover>
</span>
Expand Down Expand Up @@ -127,18 +127,18 @@ export default class BuildsTable extends React.Component {
? <Link
to={{
pathname: '/buildinfo',
search: `?jobName=${record.jobName}&buildNumber=${record.buildNumber}`
search: `?jobName=${record.jobName}&buildNumber=${record.buildNumber}`,
}}
>
<Icon type="right-circle" theme="outlined" />
</Link>
: ''
);
},
}
];
},
];

render() {
render () {
return (
<div>
<Table
Expand Down
2 changes: 1 addition & 1 deletion view/src/i18n/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ export default {
'insight.test.duration': 'Duration avg',
'insight.test.duration.history': 'Duration History',
'insight.committer': 'Last Commit',
'insight.dateRange.tip': 'Please select range or query entire data'
'insight.dateRange.tip': 'Please select range or query entire data',
};
1 change: 0 additions & 1 deletion view/src/page/Setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import pkg from '../../package.json';
import './Setting.less';

export default class Setting extends React.Component {

render () {
return (
<ReliableLayout>
Expand Down

0 comments on commit e70b7d4

Please sign in to comment.