| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -109,8 +109,8 @@ validate-javascript: install # PRIVATE | |||
| 109 | 109 | fix: install | |
| 110 | 110 | @./tools/task-runner/runner validate/javascript-fix | |
| 111 | 111 | ||
| 112 | - # Fix changed JS linting errors. | ||
| 113 | - fix-head: install | ||
| 112 | + # Fix committed JS linting errors. | ||
| 113 | + fix-commits: install | ||
| 114 | 114 | @./tools/task-runner/runner validate-head/javascript-fix | |
| 115 | 115 | ||
| 116 | 116 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,5 @@ | |||
| 1 | 1 | module.exports = { | |
| 2 | - description: 'Lint changed assets', | ||
| 3 | - task: [ | ||
| 4 | - require('./javascript'), | ||
| 5 | - // require('./sass'), | ||
| 6 | - ], | ||
| 2 | + description: 'Validate commits', | ||
| 3 | + task: [require('./javascript')], | ||
| 7 | 4 | concurrent: true, | |
| 8 | 5 | }; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,7 +2,7 @@ const execa = require('execa'); | |||
| 2 | 2 | const getChangedFiles = require('../lib/get-changed-files'); | |
| 3 | 3 | ||
| 4 | 4 | module.exports = { | |
| 5 | - description: 'Fix changed JS linting errors', | ||
| 5 | + description: 'Fix committed linting errors', | ||
| 6 | 6 | task: [ | |
| 7 | 7 | { | |
| 8 | 8 | description: 'Fix changed JS linting errors', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,27 +3,25 @@ const chalk = require('chalk'); | |||
| 3 | 3 | const getChangedFiles = require('../lib/get-changed-files'); | |
| 4 | 4 | ||
| 5 | 5 | module.exports = { | |
| 6 | - description: 'Lint changed JS', | ||
| 6 | + description: 'Validate committed JS', | ||
| 7 | 7 | task: [ | |
| 8 | 8 | { | |
| 9 | - description: 'Lint changed JS', | ||
| 9 | + description: 'Lint committed JS', | ||
| 10 | 10 | task: () => | |
| 11 | 11 | getChangedFiles().then(files => { | |
| 12 | 12 | const jsFiles = files.filter( | |
| 13 | 13 | file => | |
| 14 | - file.endsWith('.js') || | ||
| 15 | - file === 'git-hooks/pre-push' | ||
| 14 | + file.endsWith('.js') || | ||
| 15 | + file === 'git-hooks/pre-push' | ||
| 16 | 16 | ); | |
| 17 | 17 | const config = ['--quiet', '--color']; | |
| 18 | 18 | ||
| 19 | 19 | 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 | + )}`; | ||
| 27 | 25 | ||
| 28 | 26 | return Promise.reject(e); | |
| 29 | 27 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments