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

Update atom-linter to version 9.0.0 🚀 #817

Merged
merged 2 commits into from
Feb 15, 2017
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
8 changes: 4 additions & 4 deletions lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ let processESLintMessages = exports.processESLintMessages = (() => {
msgEndCol = endColumn - 1;
} else {
// We want msgCol to remain undefined if it was initially so
// `rangeFromLineNumber` will give us a range over the entire line
// `generateRange` will give us a range over the entire line
msgCol = typeof column !== 'undefined' ? column - 1 : column;
}

Expand All @@ -125,7 +125,7 @@ let processESLintMessages = exports.processESLintMessages = (() => {
validatePoint(textEditor, msgEndLine, msgEndCol);
range = [[msgLine, msgCol], [msgEndLine, msgEndCol]];
} else {
range = (0, _atomLinter.rangeFromLineNumber)(textEditor, msgLine, msgCol);
range = (0, _atomLinter.generateRange)(textEditor, msgLine, msgCol);
}
ret = {
filePath,
Expand All @@ -145,7 +145,7 @@ let processESLintMessages = exports.processESLintMessages = (() => {
}
} catch (err) {
if (!err.message.startsWith('Line number ') && !err.message.startsWith('Column start ')) {
// This isn't an invalid point error from `rangeFromLineNumber`, re-throw it
// This isn't an invalid point error from `generateRange`, re-throw it
throw err;
}
ret = yield generateInvalidTrace(msgLine, msgCol, msgEndLine, msgEndCol, eslintFullRange, filePath, textEditor, ruleId, message, worker);
Expand Down Expand Up @@ -275,7 +275,7 @@ const generateInvalidTrace = (() => {
severity: 'error',
html: `${(0, _escapeHtml2.default)(titleText)}. See the trace for details. ` + `<a href="${newIssueURL}">Report this!</a>`,
filePath,
range: (0, _atomLinter.rangeFromLineNumber)(textEditor, 0),
range: (0, _atomLinter.generateRange)(textEditor, 0),
trace: [{
type: 'Trace',
text: `Original message: ${ruleId} - ${message}`,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"compile": "npm run clean && babel src --out-dir lib"
},
"dependencies": {
"atom-linter": "^8.0.0",
"atom-linter": "^9.0.0",
"atom-package-deps": "^4.0.1",
"consistent-path": "^2.0.1",
"escape-html": "^1.0.3",
Expand Down
10 changes: 5 additions & 5 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { createFromProcess } from 'process-communication'
import { join } from 'path'
import escapeHTML from 'escape-html'
import ruleURI from 'eslint-rule-documentation'
import { rangeFromLineNumber } from 'atom-linter'
import { generateRange } from 'atom-linter'

// eslint-disable-next-line import/no-extraneous-dependencies, import/extensions
import { Disposable, Range } from 'atom'
Expand Down Expand Up @@ -151,7 +151,7 @@ const generateInvalidTrace = async (
html: `${escapeHTML(titleText)}. See the trace for details. ` +
`<a href="${newIssueURL}">Report this!</a>`,
filePath,
range: rangeFromLineNumber(textEditor, 0),
range: generateRange(textEditor, 0),
trace: [
{
type: 'Trace',
Expand Down Expand Up @@ -214,7 +214,7 @@ export async function processESLintMessages(response, textEditor, showRule, work
msgEndCol = endColumn - 1
} else {
// We want msgCol to remain undefined if it was initially so
// `rangeFromLineNumber` will give us a range over the entire line
// `generateRange` will give us a range over the entire line
msgCol = typeof column !== 'undefined' ? column - 1 : column
}

Expand All @@ -226,7 +226,7 @@ export async function processESLintMessages(response, textEditor, showRule, work
validatePoint(textEditor, msgEndLine, msgEndCol)
range = [[msgLine, msgCol], [msgEndLine, msgEndCol]]
} else {
range = rangeFromLineNumber(textEditor, msgLine, msgCol)
range = generateRange(textEditor, msgLine, msgCol)
}
ret = {
filePath,
Expand All @@ -248,7 +248,7 @@ export async function processESLintMessages(response, textEditor, showRule, work
if (!err.message.startsWith('Line number ') &&
!err.message.startsWith('Column start ')
) {
// This isn't an invalid point error from `rangeFromLineNumber`, re-throw it
// This isn't an invalid point error from `generateRange`, re-throw it
throw err
}
ret = await generateInvalidTrace(
Expand Down