GithubHelp home page GithubHelp logo

kryndex / unified-engine-atom Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unifiedjs/unified-engine-atom

0.0 1.0 0.0 22 KB

Create Atom Linters for unified processors

License: MIT License

JavaScript 100.00%

unified-engine-atom's Introduction

unified-engine-atom Build Status

Interface for creating Atom Linters around unified processors. Wrapper around the engine to run it from Atom.

Installation

npm:

npm install unified-engine-atom

Usage

var engine = require('unified-engine-atom');

module.exports.provideLinter = function () {
  return {
    grammarScopes: ['source.gfm', 'source.pfm', 'text.md'],
    name: 'remark',
    scope: 'file',
    lintsOnChange: true,
    lint: engine({
      processor: require('remark'),
      rcName: '.remarkrc',
      packageField: 'remarkConfig',
      ignoreName: '.remarkignore',
      pluginPrefix: 'remark'
    })
  };
}

API

engine(options)

Create a lint function for use in an AtomLinter package. Read more about linters in the Linter Docs.

options
  • processor (Processor, required) — Unified processor to transform files.
  • rcName (string, optional) — Name of configuration files to load.
  • packageField (string, optional) — Property at which configuration can be found in package.json files.
  • detectConfig (boolean, default: whether rcName or packageField is given) — Whether to search for configuration files.
  • rcPath (string, optional) — File-path to a configuration file to load.
  • settings (Object, optional) — Configuration for the parser and compiler of the processor.
  • ignoreName (string, optional) — Name of ignore files to load.
  • detectIgnore (boolean, default: whether ignoreName is given) — Whether to search for ignore files.
  • ignorePath (string, optional) — File-path to an ignore file to load.
  • silentlyIgnore (boolean, default: false) — Skip given files if they are ignored.
  • plugins (Object, optional) — Map of plug-in names or paths and options to use.
  • pluginPrefix (string, optional) — When given, optional prefix to use when searching for plug-ins.
Returns

Function — Can be used as provider.lint, where provider is the returned value of provideLinter. This function takes an Atom Editor instance, resolves an array of LinterMessages, or rejects a fatal Error.

Todo

  • If anyone knows how to add coverage to Atom tests, I’d love to hear about it.

License

MIT © Titus Wormer

unified-engine-atom's People

Contributors

barrythepenguin avatar greenkeeperio-bot avatar wooorm avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.