@zthun/janitor-web 19.5.0 → 19.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/classes/_zthun_janitor-build-config.typedoc.ZTypedocConfigBuilder.html +16 -16
- package/dist/classes/_zthun_janitor-build-config.vite.ZViteConfigBuilder.html +15 -15
- package/dist/classes/_zthun_janitor-build-config.vite.ZViteLibraryBuilder.html +4 -4
- package/dist/classes/_zthun_janitor-build-config.vite.ZViteServerBuilder.html +2 -2
- package/dist/classes/_zthun_janitor-build-config.vite.ZViteTestBuilder.html +12 -12
- package/dist/classes/_zthun_janitor-lint.ZConfigExtender.html +4 -4
- package/dist/classes/_zthun_janitor-lint.ZConfigReaderCosmic.html +7 -7
- package/dist/classes/_zthun_janitor-lint.ZConfigReaderNull.html +2 -2
- package/dist/classes/_zthun_janitor-lint.ZConfigReaderPrettier.html +2 -2
- package/dist/classes/_zthun_janitor-lint.ZContentLinterHtml.html +2 -2
- package/dist/classes/_zthun_janitor-lint.ZContentLinterJson.html +2 -2
- package/dist/classes/_zthun_janitor-lint.ZContentLinterPretty.html +2 -2
- package/dist/classes/_zthun_janitor-lint.ZContentLinterYaml.html +2 -2
- package/dist/classes/_zthun_janitor-lint.ZJanitorLint.html +13 -13
- package/dist/classes/_zthun_janitor-lint.ZLinterEs.html +4 -4
- package/dist/classes/_zthun_janitor-lint.ZLinterFile.html +3 -3
- package/dist/classes/_zthun_janitor-lint.ZLinterMarkdown.html +3 -3
- package/dist/classes/_zthun_janitor-lint.ZLinterReport.html +3 -3
- package/dist/classes/_zthun_janitor-lint.ZLinterSilent.html +3 -3
- package/dist/classes/_zthun_janitor-lint.ZLinterSpelling.html +3 -3
- package/dist/classes/_zthun_janitor-lint.ZLinterStyle.html +3 -3
- package/dist/classes/_zthun_janitor-options.ZJanitorOptionsBuilder.html +3 -3
- package/dist/classes/_zthun_janitor-options.ZJanitorOptionsLintBuilder.html +35 -35
- package/dist/interfaces/_zthun_janitor-htmlhint-config.RuleSet.html +2 -2
- package/dist/interfaces/_zthun_janitor-lint.IZConfigDiscovery.html +2 -2
- package/dist/interfaces/_zthun_janitor-lint.IZConfigExtender.html +2 -2
- package/dist/interfaces/_zthun_janitor-lint.IZConfigReader.html +2 -2
- package/dist/interfaces/_zthun_janitor-lint.IZContentLinter.html +2 -2
- package/dist/interfaces/_zthun_janitor-lint.IZJanitorLintArgs.html +2 -2
- package/dist/interfaces/_zthun_janitor-lint.IZLinter.html +2 -2
- package/dist/interfaces/_zthun_janitor-options.IZJanitorOptions.html +2 -2
- package/dist/interfaces/_zthun_janitor-options.IZJanitorOptionsLint.html +22 -22
- package/dist/modules/_zthun_janitor-lint.html +52 -222
- package/dist/modules/_zthun_janitor-ts-config.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.environments.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.imports.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.javascript.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.prettier.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.react.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.recommended.html +1 -1
- package/dist/variables/_zthun_janitor-eslint-config.typescript.html +1 -1
- package/dist/variables/_zthun_janitor-htmlhint-config.default.html +1 -1
- package/dist/variables/_zthun_janitor-markdownlint-config.default.html +1 -1
- package/dist/variables/_zthun_janitor-prettier-config.default.html +1 -1
- package/dist/variables/_zthun_janitor-stylelint-config-less.default.html +1 -1
- package/dist/variables/_zthun_janitor-stylelint-config-sass.default.html +1 -1
- package/dist/variables/_zthun_janitor-stylelint-config.default.html +1 -1
- package/package.json +5 -5
|
@@ -1,222 +1,52 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@zthun/janitor-lint | Documentation</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Documentation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Documentation</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">@zthun/janitor-lint</a></li></ul><h1>Module @zthun/janitor-lint</h1></div><section class="tsd-panel tsd-typography"><h1 id="janitor-lint" class="tsd-anchor-link">Janitor Lint<a href="#janitor-lint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p>Code gets messy.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
</
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
to
|
|
49
|
-
|
|
50
|
-
</
|
|
51
|
-
|
|
52
|
-
<pre><code class="ts"><span class="hl-2">{</span><br/><span class="hl-2"> </span><span class="hl-0">// The configuration file or module for ECMAScript based linting.</span><br/><span class="hl-2"> </span><span class="hl-6">esConfig</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">// The configuration file or module for CSS, Less, and Sass based linting.</span><br/><span class="hl-2"> </span><span class="hl-6">styleConfig</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">// The configuration file or module for HTML linting.</span><br/><span class="hl-2"> </span><span class="hl-6">htmlConfig</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">// The configuration file or module for Markdown based linting</span><br/><span class="hl-2"> </span><span class="hl-6">markdownConfig</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">// The configuration file or module for Spelling checks</span><br/><span class="hl-2"> </span><span class="hl-6">spellingConfig</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">// The configuration file or module for formatting checks</span><br/><span class="hl-2"> </span><span class="hl-6">prettyConfig</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">;</span><br/><br/><span class="hl-2"> </span><span class="hl-0">// The white list of ECMAScript globs to lint. This should</span><br/><span class="hl-2"> </span><span class="hl-0">// include JavaScript and TypeScript based files</span><br/><span class="hl-2"> </span><span class="hl-0">// Note that eslint supports excludes directly in the</span><br/><span class="hl-2"> </span><span class="hl-0">// config file so there is no exclude support for it here.</span><br/><span class="hl-2"> </span><span class="hl-6">esFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of CSS, Less, and Sass globs to lint.</span><br/><span class="hl-2"> </span><span class="hl-0">// Note that stylelint supports excludes directly in</span><br/><span class="hl-2"> </span><span class="hl-0">// the config file so there is no exclude support for it here.</span><br/><span class="hl-2"> </span><span class="hl-6">styleFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of HTML globs to lint.</span><br/><span class="hl-2"> </span><span class="hl-6">htmlFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The black list of HTML globs to exclude from linting.</span><br/><span class="hl-2"> </span><span class="hl-6">htmlFilesExclude</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of Markdown globs to lint.</span><br/><span class="hl-2"> </span><span class="hl-6">markdownFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The black list of Markdown globs to exclude from linting.</span><br/><span class="hl-2"> </span><span class="hl-6">markdownFilesExclude</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of JSON globs to lint.</span><br/><span class="hl-2"> </span><span class="hl-6">jsonFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The black list of JSON globs to exclude from linting.</span><br/><span class="hl-2"> </span><span class="hl-6">jsonFilesExclude</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of YAML globs to lint.</span><br/><span class="hl-2"> </span><span class="hl-6">yamlFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The black list of YAML globs to exclude from linting.</span><br/><span class="hl-2"> </span><span class="hl-6">yamlFilesExclude</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of globs to check for spelling errors.</span><br/><span class="hl-2"> </span><span class="hl-6">spellingFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The black list of globs to exclude from spell checking.</span><br/><span class="hl-2"> </span><span class="hl-6">spellingFilesExclude</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The white list of globs to check for code formatting.</span><br/><span class="hl-2"> </span><span class="hl-6">prettyFiles</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">// The black list of globs to exclude from code formatting.</span><br/><span class="hl-2"> </span><span class="hl-6">prettyFilesExclude</span><span class="hl-2">?: </span><span class="hl-6">string</span><span class="hl-2">[];</span><br/><span class="hl-2">}</span>
|
|
53
|
-
</code><button type="button">Copy</button></pre>
|
|
54
|
-
|
|
55
|
-
<p>The following is an example configuration that janitor-lint will read.</p>
|
|
56
|
-
<pre><code class="js"><span class="hl-0">// janitor-lint.config.js</span><br/><br/><span class="hl-9">module</span><span class="hl-2">.</span><span class="hl-9">exports</span><span class="hl-2"> = {</span><br/><span class="hl-2"> </span><span class="hl-0">// Configurations are generally optional and will load using the</span><br/><span class="hl-2"> </span><span class="hl-0">// default rules of the application if not specified. However, you</span><br/><span class="hl-2"> </span><span class="hl-0">// can always override the configurations in this file.</span><br/><span class="hl-2"> </span><span class="hl-6">esConfig:</span><span class="hl-2"> </span><span class="hl-3">'configs/.eslintrc'</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-0">// Using globs to find files</span><br/><span class="hl-2"> </span><span class="hl-6">esFiles:</span><span class="hl-2"> [</span><span class="hl-3">'packages/**/src/**/*.ts'</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-0">// The configurations can also be shared configuration modules</span><br/><span class="hl-2"> </span><span class="hl-0">// found in node_modules if you're not using IDE extensions.</span><br/><span class="hl-2"> </span><span class="hl-6">styleConfig:</span><span class="hl-2"> </span><span class="hl-3">'@zthun/janitor-stylelint-config'</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">// Globs are relative to the current working directory.</span><br/><span class="hl-2"> </span><span class="hl-6">styleFiles</span><span class="hl-2">: [</span><span class="hl-3">'packages/**/src/**/*.less'</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-0">// See notes on html below</span><br/><span class="hl-2"> </span><span class="hl-6">htmlFiles:</span><span class="hl-2"> [</span><span class="hl-3">'packages/**/src/**/*.html'</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-0">// You can have as many globs as you want.</span><br/><span class="hl-2"> </span><span class="hl-6">markdownFiles:</span><span class="hl-2"> [</span><span class="hl-3">'packages/**/*.md'</span><span class="hl-2">, </span><span class="hl-3">'*.md'</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-0">// You can also exclude files from the include list. These are normally</span><br/><span class="hl-2"> </span><span class="hl-0">// used for code generated files and should not be linted.</span><br/><span class="hl-2"> </span><span class="hl-6">markdownFilesExclude:</span><span class="hl-2"> [</span><span class="hl-3">'**/CHANGELOG.md'</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-0">// You can also specify specific files - json and yaml have no</span><br/><span class="hl-2"> </span><span class="hl-0">// configurations as they are very specific formats.</span><br/><span class="hl-2"> </span><span class="hl-6">jsonFiles:</span><span class="hl-2"> [</span><span class="hl-3">'package.json'</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-0">// Removes the linter</span><br/><span class="hl-2"> </span><span class="hl-6">spellingFiles:</span><span class="hl-2"> </span><span class="hl-4">null</span><br/><span class="hl-2">};</span>
|
|
57
|
-
</code><button type="button">Copy</button></pre>
|
|
58
|
-
|
|
59
|
-
<p>In your package json, add the following</p>
|
|
60
|
-
<pre><code class="json"><span class="hl-2">{</span><br/><span class="hl-2"> </span><span class="hl-8">"scripts"</span><span class="hl-2">: {</span><br/><span class="hl-2"> </span><span class="hl-8">"lint"</span><span class="hl-2">: </span><span class="hl-3">"janitor-lint"</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">}</span>
|
|
61
|
-
</code><button type="button">Copy</button></pre>
|
|
62
|
-
|
|
63
|
-
<p>Now you can lint everything with a single command.</p>
|
|
64
|
-
<pre><code class="sh"><span class="hl-0"># NPM</span><br/><span class="hl-1">npm</span><span class="hl-2"> </span><span class="hl-3">run</span><span class="hl-2"> </span><span class="hl-3">lint</span><br/><span class="hl-0"># Yarn</span><br/><span class="hl-1">yarn</span><span class="hl-2"> </span><span class="hl-3">lint</span><br/><span class="hl-0"># NPX</span><br/><span class="hl-1">npx</span><span class="hl-2"> </span><span class="hl-3">janitor-lint</span>
|
|
65
|
-
</code><button type="button">Copy</button></pre>
|
|
66
|
-
|
|
67
|
-
<h2 id="command-line" class="tsd-anchor-link">Command Line<a href="#command-line" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>You can always run janitor-lint on the command line using npx or if it is
|
|
68
|
-
installed globally, which is not recommended. There are very few command line
|
|
69
|
-
options, as janitor-lint intends to be fully driven by the config file.</p>
|
|
70
|
-
<p><strong>janitor-lint</strong> [options]</p>
|
|
71
|
-
<pre><code class="json"><span class="hl-2">[</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-8">"option"</span><span class="hl-2">: </span><span class="hl-3">"--version"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"description"</span><span class="hl-2">: </span><span class="hl-3">"Show version number"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"type"</span><span class="hl-2">: </span><span class="hl-3">"boolean"</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-8">"option"</span><span class="hl-2">: </span><span class="hl-3">"--config"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"alias"</span><span class="hl-2">: </span><span class="hl-3">"-c"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"description"</span><span class="hl-2">: </span><span class="hl-3">"Optional config file to use"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"type"</span><span class="hl-2">: </span><span class="hl-3">"string"</span><br/><span class="hl-2"> },</span><br/><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-8">"option"</span><span class="hl-2">: </span><span class="hl-3">"--help"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"description"</span><span class="hl-2">: </span><span class="hl-3">"Show help"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"type"</span><span class="hl-2">: </span><span class="hl-3">"boolean"</span><br/><span class="hl-2"> }</span><br/><span class="hl-2">]</span>
|
|
72
|
-
</code><button type="button">Copy</button></pre>
|
|
73
|
-
|
|
74
|
-
<h2 id="linters" class="tsd-anchor-link">Linters<a href="#linters" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><h3 id="shared-configurations" class="tsd-anchor-link">Shared Configurations<a href="#shared-configurations" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>While you can always recreate individual configurations for each linter, it is
|
|
75
|
-
<strong>HIGHLY</strong> recommended to create a set of shared configurations for your
|
|
76
|
-
organization. Most linters supported by Janitor Lint have some form of support
|
|
77
|
-
for extending configurations and sharing them so you don't need to reinvent the
|
|
78
|
-
wheel. In the place that such extensions are missing, Janitor Lint attempts to
|
|
79
|
-
bridge this gap but it will not add support for IDE based tooling and
|
|
80
|
-
extensions. You'll have to decide what's best for your project and your
|
|
81
|
-
organization.</p>
|
|
82
|
-
<p>One note is that the housing repository for janitor-lint contains multiple
|
|
83
|
-
shared configurations used by zthun scoped projects. You can use them, but it is
|
|
84
|
-
recommended for your organization to create it's own set of configurations that
|
|
85
|
-
meets its needs.</p>
|
|
86
|
-
<h3 id="json-and-yaml" class="tsd-anchor-link">JSON and YAML<a href="#json-and-yaml" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>JSON does not use an external tool. It's impossible to have lint errors in JSON
|
|
87
|
-
as if there are, it wouldn't be valid JSON and you won't be able to parse it.
|
|
88
|
-
Thus, when we talk about linting JSON, it's really just a parse check to make
|
|
89
|
-
sure you're JSON is valid.</p>
|
|
90
|
-
<p>For YAML, the same rule applies. It's just a parse check, but since YAML isn't
|
|
91
|
-
supported in JavaScript out of the box, it uses
|
|
92
|
-
<a href="https://www.npmjs.com/package/js-yaml">js-yaml</a> under the hood to parse and
|
|
93
|
-
check your files.</p>
|
|
94
|
-
<p>Neither of these checks verify schemas so be warned about that.</p>
|
|
95
|
-
<h3 id="ecmascript" class="tsd-anchor-link">ECMAScript<a href="#ecmascript" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>The linter of choice for ECMAScript, is <a href="https://eslint.org/">ESLint</a>. ESLint
|
|
96
|
-
has a very large eco system with support for shared configurations and plugins.
|
|
97
|
-
It supports both TypeScript and JavaScript so it covers the entire feature
|
|
98
|
-
spectrum. The configuration file for ESLint uses something similar to a
|
|
99
|
-
<a href="https://www.npmjs.com/package/cosmiconfig">cosmiconfig</a> standard but it's more
|
|
100
|
-
restrictive.</p>
|
|
101
|
-
<p>There is also a
|
|
102
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint">VisualStudio Code plugin</a>
|
|
103
|
-
that will give you highlighting for any linting errors while you type. This
|
|
104
|
-
makes ESLint the go to linter for web based ECMAScript code.</p>
|
|
105
|
-
<p>For the configuration schema, you can find it
|
|
106
|
-
<a href="https://eslint.org/docs/user-guide/configuring/">at the eslint configuration guide</a>.
|
|
107
|
-
If you create a shared configuration, as recommended, you can simply add that to
|
|
108
|
-
the extends key in the ESLint configuration file to share configuration throughout
|
|
109
|
-
your organization.</p>
|
|
110
|
-
<pre><code class="js"><span class="hl-0">// .eslintrc.js</span><br/><span class="hl-9">module</span><span class="hl-2">.</span><span class="hl-9">exports</span><span class="hl-2"> = </span><span class="hl-1">require</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-eslint-config"</span><span class="hl-2">);</span>
|
|
111
|
-
</code><button type="button">Copy</button></pre>
|
|
112
|
-
|
|
113
|
-
<h3 id="styles-css-less-sass" class="tsd-anchor-link">Styles (CSS, Less, SASS)<a href="#styles-css-less-sass" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>There are several linters for style based files.</p>
|
|
114
|
-
<ol>
|
|
115
|
-
<li><a href="https://github.com/CSSLint/csslint">CSSLint</a></li>
|
|
116
|
-
<li><a href="https://github.com/sasstools/sass-lint">SassLint</a></li>
|
|
117
|
-
<li><a href="https://stylelint.io/">StyleLint</a></li>
|
|
118
|
-
</ol>
|
|
119
|
-
<p>CSSLint and SassLint are no longer actively maintained. Thus, for linting style
|
|
120
|
-
based files, Janitor Lint uses StyleLint under the hood.</p>
|
|
121
|
-
<p>StyleLint is similar to <a href="https://eslint.org/">ESLint</a>. It too, has a nice
|
|
122
|
-
ecosystem of plugins and it supports shared configurations.</p>
|
|
123
|
-
<p>You can find the configuration schema <a href="https://stylelint.io/user-guide/configure">in the user guid for stylelint</a>
|
|
124
|
-
and you can use the extends key in the configuration to load a shared configuration.</p>
|
|
125
|
-
<pre><code class="jsonc"><span class="hl-0">// .stylelintrc.json</span><br/><span class="hl-2">{</span><br/><span class="hl-2"> </span><span class="hl-8">"extends"</span><span class="hl-2">: [</span><span class="hl-3">"@zthun/janitor-stylelint-config"</span><span class="hl-2">],</span><br/><span class="hl-2">}</span>
|
|
126
|
-
</code><button type="button">Copy</button></pre>
|
|
127
|
-
|
|
128
|
-
<h3 id="html" class="tsd-anchor-link">HTML<a href="#html" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>There is not a lot of support for HTML linters, so we are using HTMLHint.</p>
|
|
129
|
-
<p>HTMLHint does NOT support shared configurations at all. To do that,
|
|
130
|
-
<a href="https://github.com/htmlhint/HTMLHint/issues/621">this issue</a> would need to be
|
|
131
|
-
approved and supported. In the meantime, Janitor Lint bridges this gap by
|
|
132
|
-
sending just the content to HTMLHint instead of the file list. This allows Lint
|
|
133
|
-
Janitor to implement a <a href="https://www.npmjs.com/package/cosmiconfig">cosmiconfig</a>
|
|
134
|
-
standard for loading and extending the configuration to support shared configs.
|
|
135
|
-
It will be up to you if you want to do this because the
|
|
136
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=mkaufman.HTMLHint">VisualStudio Code plugin</a>
|
|
137
|
-
does not support this and expects the standard json file to be at the root of
|
|
138
|
-
your project.</p>
|
|
139
|
-
<p>If you do choose to use a shared configuration, you can just use a
|
|
140
|
-
htmlhint.config.js file at the root of your repository.</p>
|
|
141
|
-
<pre><code class="js"><span class="hl-0">//htmlhint.config.js</span><br/><span class="hl-9">module</span><span class="hl-2">.</span><span class="hl-9">exports</span><span class="hl-2"> = </span><span class="hl-1">require</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-htmlhint-config"</span><span class="hl-2">);</span>
|
|
142
|
-
</code><button type="button">Copy</button></pre>
|
|
143
|
-
|
|
144
|
-
<h3 id="markdown" class="tsd-anchor-link">Markdown<a href="#markdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Good old markdown has a couple of linters available, but considering that
|
|
145
|
-
<a href="https://github.com/DavidAnson/markdownlint">MarkdownLint</a> has a working
|
|
146
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint">VisualStudio Code plugin</a>,
|
|
147
|
-
that's the one that Janitor Lint uses.</p>
|
|
148
|
-
<p>There's not a lot of rules to markdown. You can find
|
|
149
|
-
the list of rules <a href="https://github.com/DavidAnson/markdownlint">at the markdown lint github</a>.</p>
|
|
150
|
-
<h3 id="spelling" class="tsd-anchor-link">Spelling<a href="#spelling" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>This one is pretty optional, but it's useful in that it keeps you honest. With
|
|
151
|
-
spelling, you won't use a shared configuration as this is truly unique across
|
|
152
|
-
all projects. It is not possible to have a be all end all language that knows
|
|
153
|
-
every word in existence so this will look for the
|
|
154
|
-
<a href="https://www.npmjs.com/package/cspell">CSpell</a> configuration at the root of the
|
|
155
|
-
repository. If you combine this with the
|
|
156
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker">VisualStudio Code plugin</a>,
|
|
157
|
-
it's pretty powerful and lets you add words as the repository vocabulary grows.
|
|
158
|
-
When using spelling here, you'll need to decide if there are words you want to
|
|
159
|
-
support, what dictionaries your repository is going to support, and what are
|
|
160
|
-
your forbidden words and phrases. There are no rules here, just lists of allowed
|
|
161
|
-
words and dictionaries.</p>
|
|
162
|
-
<p>You may want to consider having a shared dictionary for your organizations
|
|
163
|
-
custom lingo. You can do this through the dictionaryDefinitions key, but you'll
|
|
164
|
-
have to export a txt file for reuse.</p>
|
|
165
|
-
<pre><code class="json"><span class="hl-0">// cspell.json</span><br/><span class="hl-2">{</span><br/><span class="hl-2"> </span><span class="hl-8">"version"</span><span class="hl-2">: </span><span class="hl-3">"0.1"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"$schema"</span><span class="hl-2">: </span><span class="hl-3">"https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"language"</span><span class="hl-2">: </span><span class="hl-3">"en"</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-8">"words"</span><span class="hl-2">: [</span><span class="hl-3">"errored"</span><span class="hl-2">],</span><br/><span class="hl-2"> </span><span class="hl-8">"dictionaries"</span><span class="hl-2">: [</span><span class="hl-3">"typescript"</span><span class="hl-2">, </span><span class="hl-3">"en_US"</span><span class="hl-2">]</span><br/><span class="hl-2">}</span>
|
|
166
|
-
</code><button type="button">Copy</button></pre>
|
|
167
|
-
|
|
168
|
-
<h3 id="formatting" class="tsd-anchor-link">Formatting<a href="#formatting" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Finally, and possibly most importantly, is code formatting consistency. There
|
|
169
|
-
are generally two tools that are used for this.</p>
|
|
170
|
-
<ol>
|
|
171
|
-
<li><a href="https://editorconfig.org/">EditorConfig</a></li>
|
|
172
|
-
<li><a href="https://prettier.io/">Prettier</a></li>
|
|
173
|
-
</ol>
|
|
174
|
-
<p>For code formatting, Janitor Lint went with Prettier since it supports all the
|
|
175
|
-
features of EditorConfig and a bunch of others. Prettier also supports shared
|
|
176
|
-
configurations and is highly recommended to use them because the
|
|
177
|
-
<a href="https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode">VisualStudio Code plugin</a>
|
|
178
|
-
has support to auto format your files when you save them, making sure that your
|
|
179
|
-
teams formatting is completely consistent.</p>
|
|
180
|
-
<p>It's file lookup is similar to that of ESLint, but we recommended using
|
|
181
|
-
.prettierrc.js to enable support for shared configurations.</p>
|
|
182
|
-
<pre><code class="js"><span class="hl-0">//.prettierrc.js</span><br/><span class="hl-9">module</span><span class="hl-2">.</span><span class="hl-9">exports</span><span class="hl-2"> = </span><span class="hl-1">require</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-prettier-config"</span><span class="hl-2">);</span>
|
|
183
|
-
</code><button type="button">Copy</button></pre>
|
|
184
|
-
|
|
185
|
-
<p>Options are <a href="https://prettier.io/docs/en/options.html">located at the prettier documentation</a>,
|
|
186
|
-
and there's not a lot of them. See <a href="https://prettier.io/docs/en/option-philosophy.html">why</a>,
|
|
187
|
-
as there's a good reason for this.</p>
|
|
188
|
-
<p>When doing formatting linting, only the formatting is checked and you are
|
|
189
|
-
notified if the files are formatted or unformatted. The best way to prevent
|
|
190
|
-
these issues all together is to just use the Prettier IDE extension and auto
|
|
191
|
-
format as you type.</p>
|
|
192
|
-
<h3 id="faq" class="tsd-anchor-link">FAQ<a href="#faq" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><p>Q. Can this support my other favorite linter?</p>
|
|
193
|
-
<p>A. Possibly, but whether or not Janitor Lint will bother at the moment depends
|
|
194
|
-
on a few factors:</p>
|
|
195
|
-
<ol>
|
|
196
|
-
<li>Is there an IDE plugin that makes it so you can validate, lint, and cleanup
|
|
197
|
-
while you go along so you're not left with a lot of surprises at the end?</li>
|
|
198
|
-
<li>Does the linter support shared configuration to not reinvent the wheel
|
|
199
|
-
everywhere? Does Janitor Lint have to bridge that gap?</li>
|
|
200
|
-
<li>Is the linter in question a node linter that has its API exported and can be
|
|
201
|
-
integrated into a node application? <strong>Important!</strong></li>
|
|
202
|
-
</ol>
|
|
203
|
-
<p>If you answered No to the last question, then the answer is No. Janitor Lint
|
|
204
|
-
does not invoke external command lines of linters and instead calls into their
|
|
205
|
-
node API directly. This is how Janitor Lint succeeds in not having you worry
|
|
206
|
-
about what tools to install and what versions to use; it uses transitive
|
|
207
|
-
dependencies.</p>
|
|
208
|
-
<p>If the last question is a Yes, then it becomes a question of, is it worth it?
|
|
209
|
-
That'll need to be prioritized. For the most part, using
|
|
210
|
-
<a href="https://prettier.io/">Prettier</a> takes care of almost all linting issues so you
|
|
211
|
-
may not need more than what is available here. If you need the mother of all
|
|
212
|
-
linters, there is the heavy
|
|
213
|
-
<a href="https://github.com/nvuillam/mega-linter">Mega Linter</a> which aggregates every
|
|
214
|
-
linter in existence. Very cool, but a bit overkill for the solution we are
|
|
215
|
-
trying to solve with Janitor Lint.</p>
|
|
216
|
-
<p>Q. Is there an IDE plugin for Janitor Lint?</p>
|
|
217
|
-
<p>A. Not yet. That would solve the issue of wanting an IDE plugin for each
|
|
218
|
-
individual linter and would allow you to just have a single
|
|
219
|
-
janitor-lint.config.js file at the root of your repository that would handle all
|
|
220
|
-
linting needs. There is one planned, but it still need to be researched and
|
|
221
|
-
scoped out.</p>
|
|
222
|
-
</section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Classes"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Classes</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="zconfigextender"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigExtender.html">ZConfigExtender</a><a href="#zconfigextender" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zconfigreadercosmic"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigReaderCosmic.html">ZConfigReaderCosmic</a><a href="#zconfigreadercosmic" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zconfigreadernull"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigReaderNull.html">ZConfigReaderNull</a><a href="#zconfigreadernull" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zconfigreaderprettier"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigReaderPrettier.html">ZConfigReaderPrettier</a><a href="#zconfigreaderprettier" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinterhtml"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterHtml.html">ZContentLinterHtml</a><a href="#zcontentlinterhtml" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinterjson"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterJson.html">ZContentLinterJson</a><a href="#zcontentlinterjson" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinterpretty"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterPretty.html">ZContentLinterPretty</a><a href="#zcontentlinterpretty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinteryaml"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterYaml.html">ZContentLinterYaml</a><a href="#zcontentlinteryaml" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zjanitorlint"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZJanitorLint.html">ZJanitorLint</a><a href="#zjanitorlint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinteres"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterEs.html">ZLinterEs</a><a href="#zlinteres" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterfile"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterFile.html">ZLinterFile</a><a href="#zlinterfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlintermarkdown"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterMarkdown.html">ZLinterMarkdown</a><a href="#zlintermarkdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterreport"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterReport.html">ZLinterReport</a><a href="#zlinterreport" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlintersilent"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterSilent.html">ZLinterSilent</a><a href="#zlintersilent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterspelling"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterSpelling.html">ZLinterSpelling</a><a href="#zlinterspelling" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterstyle"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterStyle.html">ZLinterStyle</a><a href="#zlinterstyle" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd></dl></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Interfaces"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Interfaces</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="izconfigdiscovery"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZConfigDiscovery.html">IZConfigDiscovery</a><a href="#izconfigdiscovery" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izconfigextender"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZConfigExtender.html">IZConfigExtender</a><a href="#izconfigextender" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izconfigreader"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZConfigReader.html">IZConfigReader</a><a href="#izconfigreader" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izcontentlinter"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZContentLinter.html">IZContentLinter</a><a href="#izcontentlinter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izjanitorlintargs"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZJanitorLintArgs.html">IZJanitorLintArgs</a><a href="#izjanitorlintargs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izlinter"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZLinter.html">IZLinter</a><a href="#izlinter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd></dl></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#janitor-lint"><span>Janitor <wbr/>Lint</span></a><ul><li><a href="#getting-started"><span>Getting <wbr/>Started</span></a></li><li><a href="#configuration"><span>Configuration</span></a></li><li><a href="#command-line"><span>Command <wbr/>Line</span></a></li><li><a href="#linters"><span>Linters</span></a></li><li><ul><li><a href="#shared-configurations"><span>Shared <wbr/>Configurations</span></a></li><li><a href="#json-and-yaml"><span>JSON and <wbr/>YAML</span></a></li><li><a href="#ecmascript"><span>ECMA<wbr/>Script</span></a></li><li><a href="#styles-css-less-sass"><span>Styles (<wbr/>CSS, <wbr/>Less, <wbr/>SASS)</span></a></li><li><a href="#html"><span>HTML</span></a></li><li><a href="#markdown"><span>Markdown</span></a></li><li><a href="#spelling"><span>Spelling</span></a></li><li><a href="#formatting"><span>Formatting</span></a></li><li><a href="#faq"><span>FAQ</span></a></li></ul></li></ul><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Classes"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Classes</summary><div><a href="#zconfigextender"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Extender</span></a><a href="#zconfigreadercosmic"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Reader<wbr/>Cosmic</span></a><a href="#zconfigreadernull"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Reader<wbr/>Null</span></a><a href="#zconfigreaderprettier"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Reader<wbr/>Prettier</span></a><a href="#zcontentlinterhtml"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Html</span></a><a href="#zcontentlinterjson"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Json</span></a><a href="#zcontentlinterpretty"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Pretty</span></a><a href="#zcontentlinteryaml"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Yaml</span></a><a href="#zjanitorlint"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Janitor<wbr/>Lint</span></a><a href="#zlinteres"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Es</span></a><a href="#zlinterfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>File</span></a><a href="#zlintermarkdown"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Markdown</span></a><a href="#zlinterreport"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Report</span></a><a href="#zlintersilent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Silent</span></a><a href="#zlinterspelling"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Spelling</span></a><a href="#zlinterstyle"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Style</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Interfaces"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Interfaces</summary><div><a href="#izconfigdiscovery"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Config<wbr/>Discovery</span></a><a href="#izconfigextender"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Config<wbr/>Extender</span></a><a href="#izconfigreader"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Config<wbr/>Reader</span></a><a href="#izcontentlinter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Content<wbr/>Linter</span></a><a href="#izjanitorlintargs"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Janitor<wbr/>Lint<wbr/>Args</span></a><a href="#izlinter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Linter</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Documentation</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@zthun/janitor-lint | Documentation</title><link rel="icon" href="../assets/favicon.svg" type="image/svg+xml"/><meta name="description" content="Documentation for Documentation"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Documentation</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">@zthun/janitor-lint</a></li></ul><h1>Module @zthun/janitor-lint</h1></div><section class="tsd-panel tsd-typography"><h1 id="janitor-lint" class="tsd-anchor-link">Janitor Lint<a href="#janitor-lint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h1><p>Code gets messy. Most places you work will have a long backlog of tech-debt tasks
|
|
2
|
+
that never quite get addressed, and over time this becomes a maintenance nightmare.
|
|
3
|
+
Fixing old problems is expensive, and companies tend to focus on short-term ROI —
|
|
4
|
+
which means these issues often stay unresolved. New features get built on top of
|
|
5
|
+
messy foundations, and the software slowly begins to rot.</p>
|
|
6
|
+
<p>A common way to fight this is to start with linters. Linters scan your codebase
|
|
7
|
+
and notify you of issues. In a healthy development pipeline, they prevent developers
|
|
8
|
+
from creating a metaphorical messy room and encourage clean, consistent code across
|
|
9
|
+
the team. They’re not a silver bullet — messy solutions can still appear — but
|
|
10
|
+
linters eliminate most inconsistent patterns and formatting errors. Good developers
|
|
11
|
+
love them because they keep everyone aligned.</p>
|
|
12
|
+
<p>However, linters come with their own problems. There are so many of them. Each
|
|
13
|
+
has its own configuration style, quirks, and ecosystem. To cover your full
|
|
14
|
+
codebase, you often need multiple tools: ones for code quality, formatting, spelling,
|
|
15
|
+
applications, and more. It’s easy to feel overwhelmed, and maintaining a stack of
|
|
16
|
+
linters becomes its own form of tech debt.</p>
|
|
17
|
+
<p>Janitor Lint was created with the belief that there is beauty in simplicity. A
|
|
18
|
+
single tool that handles your linting needs is far better than stitching together
|
|
19
|
+
a pile of utilities, each with its own configuration and upkeep. Let Janitor
|
|
20
|
+
Lint take on the heavy lifting so you can keep your codebase clean — and your
|
|
21
|
+
developers happy.</p>
|
|
22
|
+
<h2 id="install" class="tsd-anchor-link">Install<a href="#install" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="sh"><span class="hl-1">yarn</span><span class="hl-2"> </span><span class="hl-3">add</span><span class="hl-2"> </span><span class="hl-4">-D</span><span class="hl-2"> </span><span class="hl-3">@zthun/janitor-lint</span><br/><span class="hl-0"># Optionally pull in the shared rules</span><br/><span class="hl-1">yarn</span><span class="hl-2"> </span><span class="hl-3">add</span><span class="hl-2"> </span><span class="hl-4">-D</span><span class="hl-2"> </span><span class="hl-3">@zthun/janitor-lint-config</span>
|
|
23
|
+
</code><button type="button">Copy</button></pre>
|
|
24
|
+
|
|
25
|
+
<h2 id="cli" class="tsd-anchor-link">CLI<a href="#cli" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><pre><code class="sh"><span class="hl-1">janitor-lint</span>
|
|
26
|
+
</code><button type="button">Copy</button></pre>
|
|
27
|
+
|
|
28
|
+
<ul>
|
|
29
|
+
<li><code>--config</code> is optional. Without it, the CLI searches for a <code>janitor</code>
|
|
30
|
+
config using cosmiconfig (in order: <code>package.json#janitor</code>, <code>janitorrc</code>,
|
|
31
|
+
<code>janitorrc.json</code>, <code>janitorrc.yaml|yml</code>, <code>janitorrc.mjs</code>).</li>
|
|
32
|
+
<li>Exit code is <code>0</code> when every enabled linter passes and <code>1</code> when any fail.</li>
|
|
33
|
+
</ul>
|
|
34
|
+
<h2 id="configuration-shape" class="tsd-anchor-link">Configuration shape<a href="#configuration-shape" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>Janitor Lint reads a <code>janitor</code> options config object with a <code>lint</code> section. Every
|
|
35
|
+
field is optional—only the linters you configure will run. You can configure this
|
|
36
|
+
manually, OR you can use the package, @zthun/janitor-options, to just build a
|
|
37
|
+
configuration.</p>
|
|
38
|
+
<pre><code class="ts"><span class="hl-0">/**</span><br/><span class="hl-0"> * Represents options for linting in the zthunworks janitor system.</span><br/><span class="hl-0"> */</span><br/><span class="hl-5">export</span><span class="hl-2"> </span><span class="hl-4">interface</span><span class="hl-2"> </span><span class="hl-9">IZJanitorOptionsLint</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The path to the config file for eslint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">esConfig</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The path to the config file for htmlhint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">htmlConfig</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The path to the config file for markdownlint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">markdownConfig</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The path to the config file for prettier.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">prettyConfig</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The path to the config file for cspell.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">spellingConfig</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">;</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The path to the config file for stylelint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">styleConfig</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">;</span><br/><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with eslint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">esFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with htmlhint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">htmlFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with json.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">jsonFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with markdownlint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">markdownFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with prettier.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">prettyFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with cspell.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">spellingFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with stylelint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">styleFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The file globs to lint with yaml.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">yamlFiles</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files globs to exclude from linting with htmlhint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">htmlFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files globs to exclude from linting with json.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">jsonFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files globs to exclude from linting with markdownlint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">markdownFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files globs to exclude from linting with prettier.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">prettyFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files globs to exclude from linting with cspell.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">spellingFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files to exclude from linting with stylelint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">styleFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * The files globs to exclude from linting with yaml.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">yamlFilesExclude</span><span class="hl-2">?: </span><span class="hl-9">string</span><span class="hl-2">[];</span><br/><span class="hl-2">}</span><br/><br/><span class="hl-0">/**</span><br/><span class="hl-0"> * Options for the zthunworks janitor system.</span><br/><span class="hl-0"> */</span><br/><span class="hl-5">export</span><span class="hl-2"> </span><span class="hl-4">interface</span><span class="hl-2"> </span><span class="hl-9">IZJanitorOptions</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-0">/**</span><br/><span class="hl-0"> * Linting options for janitor-lint.</span><br/><span class="hl-0"> */</span><br/><span class="hl-2"> </span><span class="hl-6">lint</span><span class="hl-2">?: </span><span class="hl-9">IZJanitorOptionsLint</span><span class="hl-2">;</span><br/><span class="hl-2">}</span>
|
|
39
|
+
</code><button type="button">Copy</button></pre>
|
|
40
|
+
|
|
41
|
+
<p>The value of each <code>*Config</code> can be a local path or a shared module such as
|
|
42
|
+
<code>@zthun/janitor-*-config</code>. HTMLHint and Markdownlint configs support <code>extends</code>
|
|
43
|
+
via Janitor Lint even though the underlying tools have limited support.</p>
|
|
44
|
+
<h2 id="example-config" class="tsd-anchor-link">Example config<a href="#example-config" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h2><p>The repo keeps its settings in <code>.config/janitorrc.mjs</code>:</p>
|
|
45
|
+
<pre><code class="js"><span class="hl-0">// .config/janitorrc.mjs</span><br/><span class="hl-5">import</span><span class="hl-2"> {</span><br/><span class="hl-2"> </span><span class="hl-6">ZJanitorOptionsBuilder</span><span class="hl-2">,</span><br/><span class="hl-2"> </span><span class="hl-6">ZJanitorOptionsLintBuilder</span><span class="hl-2">,</span><br/><span class="hl-2">} </span><span class="hl-5">from</span><span class="hl-2"> </span><span class="hl-3">"@zthun/janitor-options"</span><span class="hl-2">;</span><br/><br/><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">lint</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">ZJanitorOptionsLintBuilder</span><span class="hl-2">()</span><br/><span class="hl-2"> </span><span class="hl-0">// Conventional globs for this workspace</span><br/><span class="hl-2"> .</span><span class="hl-1">commonEsFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonCssFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonLessFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonSassFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonHtmlFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonMarkdownFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonJsonFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">commonYamlFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> </span><span class="hl-0">// Reuse the same files for spell checks and format checks</span><br/><span class="hl-2"> .</span><span class="hl-1">generateSpellingFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">generatePrettyFiles</span><span class="hl-2">()</span><br/><span class="hl-2"> </span><span class="hl-0">// Ignore build artifacts and vendored content</span><br/><span class="hl-2"> .</span><span class="hl-1">commonExcludes</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">build</span><span class="hl-2">();</span><br/><br/><span class="hl-5">export</span><span class="hl-2"> </span><span class="hl-5">default</span><span class="hl-2"> </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">ZJanitorOptionsBuilder</span><span class="hl-2">().</span><span class="hl-1">lint</span><span class="hl-2">(</span><span class="hl-6">lint</span><span class="hl-2">).</span><span class="hl-1">build</span><span class="hl-2">();</span>
|
|
46
|
+
</code><button type="button">Copy</button></pre>
|
|
47
|
+
|
|
48
|
+
<p>Point to shared configs if you want opinionated defaults:</p>
|
|
49
|
+
<pre><code class="js"><span class="hl-4">const</span><span class="hl-2"> </span><span class="hl-7">lint</span><span class="hl-2"> = </span><span class="hl-4">new</span><span class="hl-2"> </span><span class="hl-1">ZJanitorOptionsLintBuilder</span><span class="hl-2">()</span><br/><span class="hl-2"> .</span><span class="hl-1">esConfig</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-eslint-config"</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">styleConfig</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-stylelint-config"</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">htmlConfig</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-htmlhint-config"</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">markdownConfig</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-markdownlint-config"</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">prettyConfig</span><span class="hl-2">(</span><span class="hl-3">"@zthun/janitor-prettier-config"</span><span class="hl-2">)</span><br/><span class="hl-2"> .</span><span class="hl-1">build</span><span class="hl-2">();</span>
|
|
50
|
+
</code><button type="button">Copy</button></pre>
|
|
51
|
+
|
|
52
|
+
</section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Classes"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Classes</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="zconfigextender"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigExtender.html">ZConfigExtender</a><a href="#zconfigextender" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zconfigreadercosmic"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigReaderCosmic.html">ZConfigReaderCosmic</a><a href="#zconfigreadercosmic" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zconfigreadernull"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigReaderNull.html">ZConfigReaderNull</a><a href="#zconfigreadernull" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zconfigreaderprettier"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZConfigReaderPrettier.html">ZConfigReaderPrettier</a><a href="#zconfigreaderprettier" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinterhtml"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterHtml.html">ZContentLinterHtml</a><a href="#zcontentlinterhtml" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinterjson"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterJson.html">ZContentLinterJson</a><a href="#zcontentlinterjson" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinterpretty"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterPretty.html">ZContentLinterPretty</a><a href="#zcontentlinterpretty" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zcontentlinteryaml"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZContentLinterYaml.html">ZContentLinterYaml</a><a href="#zcontentlinteryaml" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zjanitorlint"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZJanitorLint.html">ZJanitorLint</a><a href="#zjanitorlint" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinteres"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterEs.html">ZLinterEs</a><a href="#zlinteres" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterfile"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterFile.html">ZLinterFile</a><a href="#zlinterfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlintermarkdown"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterMarkdown.html">ZLinterMarkdown</a><a href="#zlintermarkdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterreport"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterReport.html">ZLinterReport</a><a href="#zlinterreport" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlintersilent"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterSilent.html">ZLinterSilent</a><a href="#zlintersilent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterspelling"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterSpelling.html">ZLinterSpelling</a><a href="#zlinterspelling" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="zlinterstyle"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><a href="../classes/_zthun_janitor-lint.ZLinterStyle.html">ZLinterStyle</a><a href="#zlinterstyle" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd></dl></details><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Interfaces"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Interfaces</h2></summary><dl class="tsd-member-summaries"><dt class="tsd-member-summary" id="izconfigdiscovery"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZConfigDiscovery.html">IZConfigDiscovery</a><a href="#izconfigdiscovery" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izconfigextender"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZConfigExtender.html">IZConfigExtender</a><a href="#izconfigextender" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izconfigreader"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZConfigReader.html">IZConfigReader</a><a href="#izconfigreader" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izcontentlinter"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZContentLinter.html">IZContentLinter</a><a href="#izcontentlinter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izjanitorlintargs"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZJanitorLintArgs.html">IZJanitorLintArgs</a><a href="#izjanitorlintargs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd><dt class="tsd-member-summary" id="izlinter"><span class="tsd-member-summary-name"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><a href="../interfaces/_zthun_janitor-lint.IZLinter.html">IZLinter</a><a href="#izlinter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></span></dt><dd class="tsd-member-summary"></dd></dl></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#janitor-lint"><span>Janitor <wbr/>Lint</span></a><ul><li><a href="#install"><span>Install</span></a></li><li><a href="#cli"><span>CLI</span></a></li><li><a href="#configuration-shape"><span>Configuration shape</span></a></li><li><a href="#example-config"><span>Example config</span></a></li></ul><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Classes"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Classes</summary><div><a href="#zconfigextender"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Extender</span></a><a href="#zconfigreadercosmic"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Reader<wbr/>Cosmic</span></a><a href="#zconfigreadernull"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Reader<wbr/>Null</span></a><a href="#zconfigreaderprettier"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Config<wbr/>Reader<wbr/>Prettier</span></a><a href="#zcontentlinterhtml"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Html</span></a><a href="#zcontentlinterjson"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Json</span></a><a href="#zcontentlinterpretty"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Pretty</span></a><a href="#zcontentlinteryaml"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Content<wbr/>Linter<wbr/>Yaml</span></a><a href="#zjanitorlint"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Janitor<wbr/>Lint</span></a><a href="#zlinteres"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Es</span></a><a href="#zlinterfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>File</span></a><a href="#zlintermarkdown"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Markdown</span></a><a href="#zlinterreport"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Report</span></a><a href="#zlintersilent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Silent</span></a><a href="#zlinterspelling"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Spelling</span></a><a href="#zlinterstyle"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="../assets/icons.svg#icon-128"></use></svg><span>Z<wbr/>Linter<wbr/>Style</span></a></div></details><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Interfaces"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Interfaces</summary><div><a href="#izconfigdiscovery"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Config<wbr/>Discovery</span></a><a href="#izconfigextender"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Config<wbr/>Extender</span></a><a href="#izconfigreader"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Config<wbr/>Reader</span></a><a href="#izcontentlinter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Content<wbr/>Linter</span></a><a href="#izjanitorlintargs"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Janitor<wbr/>Lint<wbr/>Args</span></a><a href="#izlinter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="../assets/icons.svg#icon-256"></use></svg><span>IZ<wbr/>Linter</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">Documentation</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|