Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Commit ccb550e

Browse files
authored
Update eslint-config-airbnb-base to v7.1.0 (#139)
* Update eslint-config-airbnb-base to v7.1.0 * Update eslint and eslint-plugin-import Minimum versions required to satisfy the `peerDependency` of eslint-config-airbnb-base. * Fix lint issues
1 parent e3e66ae commit ccb550e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

lib/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function activate() {
88
require('atom-package-deps').install('linter-htmlhint');
99

1010
const subscriptions = new CompositeDisposable();
11-
subscriptions.add(atom.config.observe('linter-htmlhint.enabledScopes', scopes => {
11+
subscriptions.add(atom.config.observe('linter-htmlhint.enabledScopes', (scopes) => {
1212
// Remove any old scopes
1313
grammarScopes.splice(0, grammarScopes.length);
1414
// Add the current scopes
@@ -23,13 +23,13 @@ function getConfig(filePath) {
2323
const { findAsync } = require('atom-linter');
2424

2525
return findAsync(path.dirname(filePath), '.htmlhintrc')
26-
.then(configPath => {
26+
.then((configPath) => {
2727
if (configPath) {
2828
return readFile(configPath, 'utf8');
2929
}
3030
return null;
3131
})
32-
.then(conf => {
32+
.then((conf) => {
3333
if (conf) {
3434
return JSON.parse(require('strip-json-comments')(conf));
3535
}
@@ -43,7 +43,7 @@ export function provideLinter() {
4343
grammarScopes,
4444
scope: 'file',
4545
lintOnFly: true,
46-
lint: editor => {
46+
lint: (editor) => {
4747
const { HTMLHint } = require('htmlhint');
4848

4949
const text = editor.getText();
@@ -55,7 +55,7 @@ export function provideLinter() {
5555

5656
return getConfig(filePath)
5757
.then(ruleset => HTMLHint.verify(text, ruleset || undefined))
58-
.then(messages => {
58+
.then((messages) => {
5959
const { rangeFromLineNumber } = require('atom-linter');
6060

6161
return messages.map(message => ({

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
"tiny-promisify": "^0.1.1"
5252
},
5353
"devDependencies": {
54-
"eslint": "^3.0.1",
55-
"eslint-config-airbnb-base": "^7.0.0",
56-
"eslint-plugin-import": "^1.10.2"
54+
"eslint": "^3.5.0",
55+
"eslint-config-airbnb-base": "^7.1.0",
56+
"eslint-plugin-import": "^1.14.0"
5757
},
5858
"eslintConfig": {
5959
"rules": {

spec/linter-htmlhint-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('The htmlhint provider for Linter', () => {
1818
it('detects invalid coding style in bad.html and report as error', () => {
1919
waitsForPromise(() => {
2020
const bad = path.join(__dirname, 'fixtures', 'bad.html');
21-
return atom.workspace.open(bad).then(editor => lint(editor)).then(messages => {
21+
return atom.workspace.open(bad).then(editor => lint(editor)).then((messages) => {
2222
expect(messages.length).toEqual(1);
2323

2424
// test only the first error
@@ -33,7 +33,7 @@ describe('The htmlhint provider for Linter', () => {
3333
it('finds nothing wrong with a valid file (good.html)', () => {
3434
waitsForPromise(() => {
3535
const good = path.join(__dirname, 'fixtures', 'good.html');
36-
return atom.workspace.open(good).then(editor => lint(editor)).then(messages => {
36+
return atom.workspace.open(good).then(editor => lint(editor)).then((messages) => {
3737
expect(messages.length).toBe(0);
3838
});
3939
});

0 commit comments

Comments
 (0)