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

Update ESLint to v5 #186

Merged
merged 2 commits into from
Aug 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ const getConfig = async (filePath) => {
return null;
};

const phpScopedEditor = editor => editor.getCursors().some(cursor =>
cursor.getScopeDescriptor().getScopesArray().some(scope =>
scope === phpEmbeddedScope));
const phpScopedEditor = editor => (
editor.getCursors().some(cursor => (
cursor.getScopeDescriptor().getScopesArray().some(scope => (
scope === phpEmbeddedScope
))
))
);

const removePHP = str => str.replace(/<\?(?:php|=)?(?:[\s\S])+?\?>/gi, (match) => {
const newlines = match.match(/\r?\n|\r/g);
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"@commitlint/config-conventional": "^7.0.1",
"@commitlint/travis-cli": "^7.0.0",
"@semantic-release/apm-config": "^5.0.2",
"eslint": "^4.6.0",
"eslint-config-airbnb-base": "^12.0.0",
"eslint": "^5.4.0",
"eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.7.0",
"husky": "^0.14.3",
"jasmine-fix": "^1.3.1",
Expand Down
7 changes: 5 additions & 2 deletions spec/linter-htmlhint-spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
'use babel';

import * as path from 'path';
// eslint-disable-next-line no-unused-vars
import { it, fit, wait, beforeEach, afterEach } from 'jasmine-fix';

import {
// eslint-disable-next-line no-unused-vars
it, fit, wait, beforeEach, afterEach
} from 'jasmine-fix';

const { lint } = require('../lib/index.js').provideLinter();

Expand Down