Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

228 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atom-linter

atom-linter is an npm helper module that you can import in your Linter Providers and make things easier for yourself.

API

enum stream = {stdout, stderr, both}
class Helpers{
  static exec(command: String, args: Array<string> = [], options: Object = {stream: 'stdout'})
  static execNode(filePath: String, args: Array<string> = [], options: Object = {stream: 'stdout'})
  static parse(data: String, regex: String, options: Object = {baseReduction: 1, flags: ""})
  static rangeFromLineNumber(textEditor: TextEditor, lineNumber: Number):Range
  static findFile(directory:String, names: String | Array<string>): ?String
  static findFileAsync(directory: Strng, names: String | Array<string>): Promise<?String>
  static tempFile<T>(filePath:String, fileContents:String, Callback:Function<T>):Promise<T>
  static createElement(tagName: string): HTMLElement
}

Explanation for createElement

Linter accepts HTMLElements in the html message property. To show the same message on more than one DOM Elements, it clones the element. It's a limitation of HTMLElements that they lose all the events on clone. If you create your element using Helpers.createElement however It'll make sure the children inherit the events from the parent.

License

This project is licensed under the terms of MIT License, see the LICENSE file for more info

About

Helper module for linter providers

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages