Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Steel Brain
committed
Aug 28, 2016
1 parent
a56dd6c
commit 83ca985
Showing
5 changed files
with
456 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,32 @@ | ||
/* @flow */ | ||
|
||
import Path from 'path' | ||
import { normalizeMessages, normalizeMessagesLegacy } from '../lib/helpers' | ||
|
||
export function getMessageLegacy(normalized: boolean = true): Object { | ||
const message: Object = { type: 'Error', filePath: '/tmp/passwd', range: [[0, 1], [1, 0]], text: String(Math.random()) } | ||
if (normalized) { | ||
normalizeMessagesLegacy('Some Linter', [message]) | ||
export function getLinter(): Object { | ||
return { | ||
name: 'Some Linter', | ||
scope: 'project', | ||
grammarScopes: ['source.js'], | ||
lint() { | ||
return [] | ||
}, | ||
} | ||
return message | ||
} | ||
|
||
export function getMessage(normalized: boolean = true): Object { | ||
const message: Object = { severity: 'error', excerpt: String(Math.random()), location: { file: __filename, position: [[0, 0], [0, 0]] } } | ||
if (normalized) { | ||
normalizeMessages('Some Linter', [message]) | ||
} | ||
return message | ||
} | ||
export function getMessageLegacy(normalized: boolean = true): Object { | ||
const message: Object = { type: 'Error', filePath: '/tmp/passwd', range: [[0, 1], [1, 0]], text: String(Math.random()) } | ||
if (normalized) { | ||
normalizeMessagesLegacy('Some Linter', [message]) | ||
} | ||
return message | ||
} | ||
export function getFixturesPath(path: string): string { | ||
return Path.join(__dirname, 'fixtures', path) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.