Skip to content

Commit

Permalink
Bump xo from 0.54.2 to 0.55.0 (#139)
Browse files Browse the repository at this point in the history
* Bump xo from 0.54.2 to 0.55.0

Bumps [xo](https://github.com/xojs/xo) from 0.54.2 to 0.55.0.
- [Release notes](https://github.com/xojs/xo/releases)
- [Commits](xojs/xo@v0.54.2...v0.55.0)

---
updated-dependencies:
- dependency-name: xo
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Use `String#replaceAll()`.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Marc Görtz <166190+mrcgrtz@users.noreply.github.com>
Co-authored-by: Marc Görtz <mail@marcgoertz.de>
  • Loading branch information
3 people committed Aug 10, 2023
1 parent fd5c88b commit 71313e7
Show file tree
Hide file tree
Showing 3 changed files with 1,461 additions and 1,768 deletions.
6 changes: 3 additions & 3 deletions index.cjs
Expand Up @@ -43,7 +43,7 @@ function formatter(results, returnValue) {
.sort((a, b) => a.text === b.text)
.filter((item, idx, array) => array.findIndex(d => d.text === item.text) === idx)
.map(item => ({
text: item.text.replace(/\B"(.*?)"\B|\B'(.*?)'\B/g, (m, p1, p2) => pico.bold(p1 || p2)),
text: item.text.replaceAll(/\B"(.*?)"\B|\B'(.*?)'\B/g, (m, p1, p2) => pico.bold(p1 || p2)),
}));

results
Expand Down Expand Up @@ -102,10 +102,10 @@ function formatter(results, returnValue) {
let message = x.text;

// Remove rule ID from message
message = message.replace(/\s\(.+\)$/g, '');
message = message.replaceAll(/\s\(.+\)$/g, '');

// Stylize inline code blocks
message = message.replace(/\B"(.*?)"\B|\B'(.*?)'\B/g, (m, p1, p2) => pico.bold(p1 || p2));
message = message.replaceAll(/\B"(.*?)"\B|\B'(.*?)'\B/g, (m, p1, p2) => pico.bold(p1 || p2));

const line = String(x.line || 0);
const column = String(x.column || 0);
Expand Down

0 comments on commit 71313e7

Please sign in to comment.