# noddity-linter

> Check your Noddity posts and make sure that they won't cause render errors

Latest version **1.1.0** (published 2019-02-09) · WTFPL license · 0 weekly downloads

## Install

```sh
npm install noddity-linter
pnpm add noddity-linter
yarn add noddity-linter
bun add noddity-linter
```

Provides the command `noddity-linter`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-02-09 |
| First published | 2017-01-10 |
| Weekly downloads | 0 |
| License | WTFPL |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | TehShrike |
| Maintainers | artskydj, tehshrike |
| Keywords | noddity, lint, post, blog |

## Links

- npm: https://www.npmjs.com/package/noddity-linter
- Repository: https://github.com/TehShrike/noddity-linter
- Homepage: https://github.com/TehShrike/noddity-linter#readme
- Issues: https://github.com/TehShrike/noddity-linter/issues
- npm.io page: https://npm.io/package/noddity-linter

## Dependencies (9)

- [mri](https://npm.io/package/mri.md) ^1.1.4
- [glob](https://npm.io/package/glob.md) ^7.1.1
- [p-map](https://npm.io/package/p-map.md) ^1.0.0
- [level-mem](https://npm.io/package/level-mem.md) 0.18.0
- [noddity-butler](https://npm.io/package/noddity-butler.md) ^2.6.0
- [then-denodeify](https://npm.io/package/then-denodeify.md) ^1.0.0
- [noddity-linkifier](https://npm.io/package/noddity-linkifier.md) ^2.2.1
- [noddity-fs-retrieval](https://npm.io/package/noddity-fs-retrieval.md) ^1.1.0
- [validate-noddity-post](https://npm.io/package/validate-noddity-post.md) ^3.0.0

## Alternatives

- [eslint-plugin-sonarjs](https://npm.io/package/eslint-plugin-sonarjs.md) — 2.9M weekly downloads
- [eslint-config-expo](https://npm.io/package/eslint-config-expo.md) — 1.5M weekly downloads
- [@matter/protocol](https://npm.io/package/@matter/protocol.md) — 63.5K weekly downloads
- [@eventcatalog/linter](https://npm.io/package/@eventcatalog/linter.md) — 24.8K weekly downloads
- [@inrupt/eslint-config-base](https://npm.io/package/@inrupt/eslint-config-base.md) — 4.5K weekly downloads

## Recent versions

- 1.1.0 (latest) — 2019-02-09
- 1.0.1 — 2017-02-16
- 1.0.0 — 2017-01-10

## README

Lint a directory full of [Noddity](http://noddity.com) posts to verify that they will render.

# CLI

```sh
noddity-linter "./content/" ""
```

`noddity-linter [--useIndex=true] noddityRootPath [glob pattern]`

If any files have errors, logs hopefully-useful things to stdout and returns a non-zero exit code.

## Programmatic

```js
const lintPromise = noddityLinter({
	noddityRoot,
	pattern = `**/*.m?(m)d`,
	data = {},
	template,
	useIndex = true
})
```

- `noddityRoot` - the path to the root Noddity directory
- `pattern` - a string to be passed to [glob](https://www.npmjs.com/package/glob) to match posts to be tested.  Defaults to `**/*.m?(m)d`
- `data` - to be passed to [validate-noddity-post](https://github.com/TehShrike/validate-noddity-post) to render the posts with.  Defaults to `{}`
- `template` - I actually can't think of a reason why you'd need to override this for linting purposes, but here we are
- `useIndex`: if `false`, will infer an index of all posts instead of looking for an `index.json` file in the directory.  Defaults to `true`

Returns a promise that resolves to an array with one object element per post checked.  The object has a `filePath` property describing the path of the file checked, and an optional `error` property if there were any issues found while trying to render the file.

## License

[WTFPL](http://wtfpl2.com/)

---
_Source: https://npm.io/package/noddity-linter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
