unified engine to create an Atom Linters for a
processor.
Wrapper around the unifiedjs/unified-engine to run it from Atom.
npm:
npm install unified-engine-atomvar engine = require('unified-engine-atom')
module.exports.provideLinter = linter
function linter() {
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'
})
}
}Create a lint function for use in an AtomLinter package.
Read more about linters in the Linter Docs.
unified processor to transform files (Processor,
required).
Name of configuration files to load (string, optional).
Property at which configuration can be found in package.json files (string,
optional).
Whether to search for configuration files (boolean, default: whether rcName
or packageField is given).
File-path to a configuration file to load (string, optional).
Configuration for the parser and compiler of the processor (Object, optional).
Name of ignore files to load (string, optional).
Whether to search for ignore files (boolean, default: whether
ignoreName is given).
File-path to an ignore file to load (string, optional).
Whether to resolve patterns in ignorePath relative to its directory or the
current working directory ('dir' or 'cwd', default: 'dir').
Extra patterns to ignore in combination with ignorePath or found ignores
(Array.<string>, optional).
Skip given files if they are ignored (boolean, default: false).
Map of plugin names or paths and options to use (Object, optional).
When given, optional prefix to use when searching for plugins (string,
optional).
Transform config files from a different schema (Function, optional).
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.
- If anyone knows how to add coverage to Atom tests, I’d love to hear about it.
See contributing.md in unifiedjs/.github for ways
to get started.
See support.md for ways to get help.
This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.