FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

improve labelling · devhttps/frontend@8f11f68 · GitHub

Commit 8f11f68

Browse files
committed
improve labelling
1 parent eb833a6 commit 8f11f68

4 files changed

Lines changed: 14 additions & 19 deletions

File tree

‎makefile‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ validate-javascript: install # PRIVATE
109109
fix: install
110110
@./tools/task-runner/runner validate/javascript-fix
111111

112-
# Fix changed JS linting errors.
113-
fix-head: install
112+
# Fix committed JS linting errors.
113+
fix-commits: install
114114
@./tools/task-runner/runner validate-head/javascript-fix
115115

116116

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
module.exports = {
2-
description: 'Lint changed assets',
3-
task: [
4-
require('./javascript'),
5-
// require('./sass'),
6-
],
2+
description: 'Validate commits',
3+
task: [require('./javascript')],
74
concurrent: true,
85
};

‎tools/__tasks__/validate-head/javascript-fix.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const execa = require('execa');
22
const getChangedFiles = require('../lib/get-changed-files');
33

44
module.exports = {
5-
description: 'Fix changed JS linting errors',
5+
description: 'Fix committed linting errors',
66
task: [
77
{
88
description: 'Fix changed JS linting errors',

‎tools/__tasks__/validate-head/javascript.js‎

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,25 @@ const chalk = require('chalk');
33
const getChangedFiles = require('../lib/get-changed-files');
44

55
module.exports = {
6-
description: 'Lint changed JS',
6+
description: 'Validate committed JS',
77
task: [
88
{
9-
description: 'Lint changed JS',
9+
description: 'Lint committed JS',
1010
task: () =>
1111
getChangedFiles().then(files => {
1212
const jsFiles = files.filter(
1313
file =>
14-
file.endsWith('.js') ||
15-
file === 'git-hooks/pre-push'
14+
file.endsWith('.js') ||
15+
file === 'git-hooks/pre-push'
1616
);
1717
const config = ['--quiet', '--color'];
1818

1919
return execa('eslint', jsFiles.concat(config)).catch(e => {
20-
e.stdout +=
21-
`\n${chalk.red(
22-
`✋ Linting failed. You can attempt to fix lint errors by running ${chalk.underline(
23-
'make fix-head'
24-
)}.\nYour changes have not been pushed`
25-
)}`;
26-
20+
e.stdout += `\n${chalk.red(
21+
`✋ Linting failed. You can attempt to fix lint errors by running ${chalk.underline(
22+
'make fix-commits'
23+
)}.\nYour changes have not been pushed`
24+
)}`;
2725

2826
return Promise.reject(e);
2927
});

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL