Skip to content

feat(harper.js): added ability to explicitly set config to the default#449

Merged
elijah-potter merged 5 commits intomasterfrom
default-config
Jan 22, 2025
Merged

feat(harper.js): added ability to explicitly set config to the default#449
elijah-potter merged 5 commits intomasterfrom
default-config

Conversation

@elijah-potter
Copy link
Copy Markdown
Collaborator

@elijah-potter elijah-potter commented Jan 21, 2025

In editors like Obsidian, we need to know what actual values the default config holds. This PR takes a stateful approach to the matter, allowing you to call a method on a Linter to set its configuration to the global default.

This PR also adds a button that will copy a Neovim-specific version of this default configuration to the clipboard for use in Lua configuration of harper-ls.

If SveltePress/sveltepress#310 is implemented, we will replace the button with the more reader-friendly alternative.

@elijah-potter elijah-potter added rust Pull requests that update Rust code javascript Pull requests that update Javascript code harper.js labels Jan 21, 2025
@elijah-potter elijah-potter added the documentation Improvements or additions to documentation label Jan 21, 2025
@elijah-potter
Copy link
Copy Markdown
Collaborator Author

I've elected to use a stateless alternative. It's much easier downstream in integrations like Obsidian.

@elijah-potter elijah-potter marked this pull request as ready for review January 21, 2025 21:58
Copy link
Copy Markdown
Collaborator

@grantlemons grantlemons left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, is there a way we can add site previews on PRs without spending extra? (created #451)

@elijah-potter elijah-potter merged commit bae254e into master Jan 22, 2025
@elijah-potter elijah-potter deleted the default-config branch January 22, 2025 18:37
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jan 28, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [Automattic/harper/harper-ls](https://github.com/Automattic/harper) | minor | `v0.16.0` -> `v0.18.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>Automattic/harper (Automattic/harper/harper-ls)</summary>

### [`v0.18.0`](https://github.com/Automattic/harper/releases/tag/v0.18.0)

[Compare Source](Automattic/harper@v0.17.0...v0.18.0)

#### What's Changed

-   fix two grammatical errors by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#481
-   Reword description of "that which" to avoid ironic redundancy by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#479
-   feat([#&#8203;422](Automattic/harper#422)): add `same than` -> `same as` matcher trigger by [@&#8203;grantlemons](https://github.com/grantlemons) in Automattic/harper#453
-   missing definite article, comma placement by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#480
-   Improvements to `PluralConjugate` by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#474
-   correct Valentine's Day by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#491
-   typo in zed integration doc by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#490
-   feat(core): created linter for [#&#8203;426](Automattic/harper#426) by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#452
-   I missed a lets/let's mistake in a comment by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#492
-   docs: rewrote instructions on how to author a rule by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#482
-   missing indefinite article in comments by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#488
-   Apply rule from issue [#&#8203;465](Automattic/harper#465) to core document.rs by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#510
-   feat(core): allow trailing commas in the `lint_group` macro by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#483
-   fix agreement error in docs by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#417

**Full Changelog**: Automattic/harper@v0.17.0...v0.18.0

### [`v0.17.0`](https://github.com/Automattic/harper/releases/tag/v0.17.0)

[Compare Source](Automattic/harper@v0.16.0...v0.17.0)

#### What's Changed

-   feat([#&#8203;393](Automattic/harper#393)): add clap version & about attributes by [@&#8203;grantlemons](https://github.com/grantlemons) in Automattic/harper#394
-   docs: added Homebrew as an installation method by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#395
-   typos/spelling/grammar fixes in comments, docs, and strings by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#398
-   fix(core): harden title case module by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#396
-   fix(core): indexing problems by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#409
-   fix typo: remove extraneous 'to' by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#418
-   chore: update description of Oxford rule by [@&#8203;ccoVeille](https://github.com/ccoVeille) in Automattic/harper#419
-   build(deps): bump itertools from 0.13.0 to 0.14.0 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#431
-   build(deps): bump serde_json from 1.0.135 to 1.0.137 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#429
-   Typst Test Fixes by [@&#8203;grantlemons](https://github.com/grantlemons) in Automattic/harper#391
-   build(deps): bump clap from 4.5.23 to 4.5.27 by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#444
-   feat: Update VSCode Config by [@&#8203;mcecode](https://github.com/mcecode) in Automattic/harper#400
-   fix(core): infinite lint loops by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#390
-   Clean Up `harper-ls` logs by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#447
-   build(deps): bump undici from 6.19.8 to 6.21.1 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#450
-   typo by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#462
-   fix(core): the Oxford comma applies to `nor` as well by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#445
-   feat(harper.js): added ability to explicitly set config to the default by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#449
-   build(deps-dev): bump vite from 6.0.5 to 6.0.9 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#448
-   feat(core): created a  new rule that resolves [#&#8203;414](Automattic/harper#414) by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#455
-   build(deps-dev): bump vite from 5.4.11 to 5.4.12 in /packages by [@&#8203;dependabot](https://github.com/dependabot) in Automattic/harper#475
-   docs: added page to explain tooling for reviewers by [@&#8203;elijah-potter](https://github.com/elijah-potter) in Automattic/harper#471
-   fix instance of [#&#8203;384](Automattic/harper#384) in docs by [@&#8203;hippietrail](https://github.com/hippietrail) in Automattic/harper#477

#### New Contributors

-   [@&#8203;hippietrail](https://github.com/hippietrail) made their first contribution in Automattic/harper#398
-   [@&#8203;ccoVeille](https://github.com/ccoVeille) made their first contribution in Automattic/harper#419

**Full Changelog**: Automattic/harper@v0.16.0...v0.17.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xMjYuMSIsInVwZGF0ZWRJblZlciI6IjM5LjEzNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation harper.js javascript Pull requests that update Javascript code rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants