Package Exports
- detect-repo-linters
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (detect-repo-linters) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
detect-repo-linters
Scans a repository directory, searching for configured linters.
Installation
$ npm install detect-repo-linters
Usage
detectRepoLinters(dir, [callback]) -> Promise
You may consume the result using promises or callbacks, it's up to you.
const detectRepoLinters = require('detect-repo-linters');
detectRepoLinters('./some-repository-directory')
.then((linters) => {
// linters is an object that looks like:
// {
// general: ['editorconfig'],
// js: ['eslint'],
// css: ['stylelint'],
// html: [],
// coffee: [],
// }
});
At the moment the following linters are detected:
- general: editorconfig
- js: eslint, jscs and jshint
- css: stylelint and csslint
- html: htmlhint and htmllint
- coffee: coffeelint
Feel free to a PR to include other linters as part of the detection!
Tests
$ npm test
$ npm test-cov
to get coverage report
License
Released under the MIT License.