### Required

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L27-L27)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L29-L29)[\[3\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L31-L31)
Spaces are hard to count. Use {2}.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L97-L97)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L115-L115)
Promises must be awaited, end with a call to .catch, end with a call to .then with a rejection handler or be explicitly marked as ignored with the `void` operator.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L105-L105)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L112-L112)[\[3\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L155-L155)[\[4\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L172-L172)[\[5\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L271-L271)[\[6\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L278-L278)[\[7\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L721-L721)[\[8\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L724-L724)[\[9\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L727-L727)[\[10\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L735-L735)[\[11\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L736-L736)[\[12\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L758-L758)[\[13\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L782-L782)[\[14\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L783-L783)
Use sentence case for UI text.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L163-L163)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L164-L164)[\[3\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L165-L165)[\[4\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L166-L166)[\[5\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L169-L169)
Unexpected console statement. Only these console methods are allowed: warn, error, debug.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L210-L210)
Unexpected `await` of a non-Promise (non-"Thenable") value.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L224-L224)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L242-L242)[\[3\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L871-L871)[\[4\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L886-L886)[\[5\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L899-L899)[\[6\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L933-L933)
Unexpected any. Specify a different type.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L230-L238)
Promise returned in function argument where a void return was expected.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L350-L350)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L350-L350)
Unnecessary escape character: \=.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L351-L351)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L351-L351)
Unnecessary escape character: \!.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L526-L526)
Async method 'insertOrUpdateTOC' has no 'await' expression.

[\[1\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L721-L721)[\[2\]](https://github.com/m-kk/toc/blob/6c30ef79eb1ca617c831efef9e8f98c20d74d96e/main.ts#L795-L795)
Use `new Setting(containerEl).setName(...).setHeading()` instead of creating HTML heading elements directly.



---

### Optional

