Skip to content

Commit

Permalink
1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
platers committed May 15, 2022
1 parent 678a612 commit fe17d18
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 26 deletions.
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--- This file was automatically generated. See docs.ts and *_template.md files for the source. -->
# Obsidian Linter

![Build](https://github.com/platers/obsidian-linter/actions/workflows/main.yml/badge.svg)
![Downloads](https://img.shields.io/github/downloads/platers/obsidian-linter/total)

Expand All @@ -8,6 +9,8 @@ Rules can be toggled and configured in the settings.

## Usage

![Demo](images/demo.gif)

To lint the current file, run `Lint the current file` (`Ctrl+Alt+L` by default).
To lint all files, run `Lint all files in the vault`.
To lint all files in the current folder run `Lint all files in the current folder`. This action includes all subfolders.
Expand All @@ -17,17 +20,15 @@ You can also lint a folder by right clicking on it in the folder list and select

When `Lint on save` is toggled on, the plugin will lint the current file on manual save (when you press `Ctrl+S`).

![Demo](images/demo.gif)

### Disable rules

```markdown
---
disabled rules: [ capitalize-headings ]
disabled rules: [capitalize-headings]
---
```

Add `disabled rules: [ ... ]` to the YAML frontmatter of a file to disable those rules when linting that file.
Add `disabled rules: [ ... ]` to the YAML frontmatter of a file to disable those rules when linting that file.

Add `disabled rules: [ all ]` to the YAML frontmatter of a file to disable all rules.

Expand Down Expand Up @@ -85,11 +86,11 @@ Pull requests are welcome, especially for new rules.
2. Clone the repository
3. Run `npm ci` to install dependencies
4. Add a new rule in `rules.ts`.
1. Insert a new rule in the corresponding rule type(spacing, headings, etc)
2. Follow the format of the existing rules
3. Add tests for edge cases in `test.ts`
4. You should probably use some helper functions from `utils.ts`, such as `ignoreCodeBlocksYAMLAndLinks`.
1. Insert a new rule in the corresponding rule type(spacing, headings, etc)
2. Follow the format of the existing rules
3. Add tests for edge cases in `test.ts`
4. You should probably use some helper functions from `utils.ts`, such as `ignoreCodeBlocksYAMLAndLinks`.
5. Run `npm run compile` to build, generate documentation, and test the plugin.
6. Run `npm run lint` to lint the plugin.

Make sure to use Node 15.x or higher.
Make sure to use Node 15.x or higher.
19 changes: 10 additions & 9 deletions docs/readme_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Obsidian Linter

![Build](https://github.com/platers/obsidian-linter/actions/workflows/main.yml/badge.svg)
![Downloads](https://img.shields.io/github/downloads/platers/obsidian-linter/total)

Expand All @@ -7,6 +8,8 @@ Rules can be toggled and configured in the settings.

## Usage

![Demo](images/demo.gif)

To lint the current file, run `Lint the current file` (`Ctrl+Alt+L` by default).
To lint all files, run `Lint all files in the vault`.
To lint all files in the current folder run `Lint all files in the current folder`. This action includes all subfolders.
Expand All @@ -16,17 +19,15 @@ You can also lint a folder by right clicking on it in the folder list and select

When `Lint on save` is toggled on, the plugin will lint the current file on manual save (when you press `Ctrl+S`).

![Demo](images/demo.gif)

### Disable rules

```markdown
---
disabled rules: [ capitalize-headings ]
disabled rules: [capitalize-headings]
---
```

Add `disabled rules: [ ... ]` to the YAML frontmatter of a file to disable those rules when linting that file.
Add `disabled rules: [ ... ]` to the YAML frontmatter of a file to disable those rules when linting that file.

Add `disabled rules: [ all ]` to the YAML frontmatter of a file to disable all rules.

Expand All @@ -44,11 +45,11 @@ Pull requests are welcome, especially for new rules.
2. Clone the repository
3. Run `npm ci` to install dependencies
4. Add a new rule in `rules.ts`.
1. Insert a new rule in the corresponding rule type(spacing, headings, etc)
2. Follow the format of the existing rules
3. Add tests for edge cases in `test.ts`
4. You should probably use some helper functions from `utils.ts`, such as `ignoreCodeBlocksYAMLAndLinks`.
1. Insert a new rule in the corresponding rule type(spacing, headings, etc)
2. Follow the format of the existing rules
3. Add tests for edge cases in `test.ts`
4. You should probably use some helper functions from `utils.ts`, such as `ignoreCodeBlocksYAMLAndLinks`.
5. Run `npm run compile` to build, generate documentation, and test the plugin.
6. Run `npm run lint` to lint the plugin.

Make sure to use Node 15.x or higher.
Make sure to use Node 15.x or higher.
16 changes: 8 additions & 8 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"id": "obsidian-linter",
"name": "Linter",
"version": "1.2.10",
"minAppVersion": "0.9.7",
"description": "Enforces consistent markdown styling.",
"author": "Victor Tao",
"authorUrl": "https://github.com/platers",
"isDesktopOnly": false
"id": "obsidian-linter",
"name": "Linter",
"version": "1.3.0",
"minAppVersion": "0.9.7",
"description": "Enforces consistent markdown styling.",
"author": "Victor Tao",
"authorUrl": "https://github.com/platers",
"isDesktopOnly": false
}

0 comments on commit fe17d18

Please sign in to comment.