Skip to content

Commit fe6a8ff

Browse files
authored
merge: update master from develop (#18)
* chore: update dependencies and htmlhint v0.10.1 * test: fix issue with tests * fix: remove console.log * test: update travis * fix: update mocha require
1 parent 3d83901 commit fe6a8ff

File tree

7 files changed

+5751
-4341
lines changed

7 files changed

+5751
-4341
lines changed

.babelrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"presets": [ "@babel/preset-env" ]
3+
}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v8.11.3

.travis.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
language: node_js
2-
2+
cache:
3+
directories:
4+
- ~/.npm
35
node_js:
4-
- '6'
6+
- '10'
7+
- '9'
58
- '8'
6-
7-
script: npm test
8-
9+
- '6'
910
notifications:
1011
email: false
11-
12+
install:
13+
- npm install
14+
script:
15+
- npm test
1216
after_success:
13-
- npm run codecov
14-
15-
cache:
16-
directories:
17-
- node_modules
17+
- npm run codecov

index.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
'use strict';
22

3-
const path = require('path');
4-
const fs = require('fs');
5-
const HTMLHint = require('htmlhint').HTMLHint;
6-
const loaderUtils = require('loader-utils');
7-
const chalk = require('chalk');
8-
const stripBom = require('strip-bom');
9-
const glob = require('glob');
3+
import path from 'path';
4+
import fs from 'fs';
5+
import {HTMLHint} from 'htmlhint';
6+
import loaderUtils from 'loader-utils';
7+
import chalk from 'chalk';
8+
import stripBom from 'strip-bom';
9+
import glob from 'glob';
1010

1111
function formatMessage(message) {
12-
let evidence = message.evidence;
13-
const line = message.line;
14-
const col = message.col;
12+
let {evidence} = message;
13+
const {line} = message;
14+
const {col} = message;
1515
const detail = typeof message.line === 'undefined' ?
1616
chalk.yellow('GENERAL') : `${chalk.yellow('L' + line)}${chalk.red(':')}${chalk.yellow('C' + col)}`;
1717

@@ -124,8 +124,8 @@ function lint(source, options, webpack, done) {
124124
}
125125

126126
done(null, source);
127-
} catch (err) {
128-
done(err);
127+
} catch (error) {
128+
done(error);
129129
}
130130
}
131131

@@ -161,7 +161,7 @@ module.exports = function (source) {
161161
try {
162162
const htmlHintConfig = JSON.parse(stripBom(configString));
163163
lint(source, Object.assign(options, htmlHintConfig), this, done);
164-
} catch (err) {
164+
} catch (error) {
165165
done(new Error('Could not parse the htmlhint config file'));
166166
}
167167
}

0 commit comments

Comments
 (0)