Skip to content

Commit 223ed69

Browse files
authored
chore: bump all deps, add test case for #435 (#463)
1 parent 8397553 commit 223ed69

File tree

9 files changed

+10819
-9597
lines changed

9 files changed

+10819
-9597
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@
2626
"typecov": "type-coverage"
2727
},
2828
"devDependencies": {
29-
"@1stg/lib-config": "^11.1.0",
29+
"@1stg/lib-config": "^12.0.0",
3030
"@changesets/changelog-github": "^0.4.8",
31-
"@changesets/cli": "^2.26.1",
32-
"@types/eslint": "^8.37.0",
31+
"@changesets/cli": "^2.26.2",
32+
"@types/eslint": "^8.44.1",
3333
"@types/eslint-plugin-markdown": "^2.0.0",
34-
"@types/jest": "^29.5.1",
35-
"@types/node": "^18.16.3",
36-
"@types/react": "^18.2.0",
34+
"@types/jest": "^29.5.3",
35+
"@types/node": "^20.4.6",
36+
"@types/react": "^18.2.18",
3737
"@types/unist": "^2.0.6",
38-
"jest": "^29.5.0",
39-
"patch-package": "^7.0.0",
38+
"jest": "^29.6.2",
39+
"patch-package": "^8.0.0",
4040
"react": "^18.2.0",
41-
"ts-jest": "^29.1.0",
41+
"ts-jest": "^29.1.1",
4242
"ts-node": "^10.9.1",
43-
"type-coverage": "^2.25.0",
44-
"typescript": "^5.0.4",
45-
"yarn-deduplicate": "^6.0.1"
43+
"type-coverage": "^2.26.0",
44+
"typescript": "^5.1.6",
45+
"yarn-deduplicate": "^6.0.2"
4646
},
4747
"resolutions": {
4848
"prettier": "^2.8.8"

packages/eslint-mdx/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
"eslint": ">=8.0.0"
3131
},
3232
"dependencies": {
33-
"acorn": "^8.8.2",
33+
"acorn": "^8.10.0",
3434
"acorn-jsx": "^5.3.2",
35-
"espree": "^9.5.1",
35+
"espree": "^9.6.1",
3636
"estree-util-visit": "^1.2.1",
3737
"remark-mdx": "^2.3.0",
38-
"remark-parse": "^10.0.1",
39-
"remark-stringify": "^10.0.2",
38+
"remark-parse": "^10.0.2",
39+
"remark-stringify": "^10.0.3",
4040
"synckit": "^0.8.5",
41-
"tslib": "^2.5.0",
41+
"tslib": "^2.6.1",
4242
"unified": "^10.1.2",
4343
"unified-engine": "^10.1.0",
4444
"unist-util-visit": "^4.1.2",

packages/eslint-mdx/src/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import type { Point } from 'unist'
77
import type { NormalPosition } from './types'
88

99
export const last = <T>(items: T[] | readonly T[]) =>
10+
// eslint-disable-next-line unicorn/prefer-at -- FIXME: Node 16.6+ required
1011
items && items[items.length - 1]
1112

1213
export const arrayify = <T, R = T extends Array<infer S> ? S : T>(

packages/eslint-plugin-mdx/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@
3232
},
3333
"dependencies": {
3434
"eslint-mdx": "^2.1.0",
35-
"eslint-plugin-markdown": "^3.0.0",
35+
"eslint-plugin-markdown": "^3.0.1",
3636
"remark-mdx": "^2.3.0",
37-
"remark-parse": "^10.0.1",
38-
"remark-stringify": "^10.0.2",
39-
"tslib": "^2.5.0",
37+
"remark-parse": "^10.0.2",
38+
"remark-stringify": "^10.0.3",
39+
"tslib": "^2.6.1",
4040
"unified": "^10.1.2",
4141
"vfile": "^5.3.7"
4242
}

packages/eslint-plugin-mdx/src/rules/remark.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ export const remark: Rule.RuleModule = {
2222
fixable: 'code',
2323
},
2424
create(context) {
25+
// eslint-disable-next-line sonar/deprecation -- FIXME: ESLint 8.40+ required
2526
const filename = context.getFilename()
2627
const extname = path.extname(filename)
28+
// eslint-disable-next-line sonar/deprecation -- FIXME: ESLint 8.40+ required
2729
const sourceCode = context.getSourceCode()
2830
const options = context.parserOptions as ParserOptions
2931
const isMdx = [
@@ -52,6 +54,7 @@ export const remark: Rule.RuleModule = {
5254
fileOptions: {
5355
path: physicalFilename,
5456
value: sourceText,
57+
// eslint-disable-next-line sonar/deprecation -- FIXME: ESLint 8.40+ required
5558
cwd: context.getCwd(),
5659
},
5760
physicalFilename,

test/__snapshots__/fixtures.test.ts.snap

Lines changed: 185 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,24 @@ exports[`fixtures should match all snapshots: 380.mdx 1`] = `
335335
"ruleId": "unicorn/prevent-abbreviations",
336336
"severity": 2,
337337
},
338+
{
339+
"column": 40,
340+
"endColumn": 60,
341+
"endLine": 204,
342+
"fix": {
343+
"range": [
344+
4593,
345+
4615,
346+
],
347+
"text": ".at(-1)",
348+
},
349+
"line": 204,
350+
"message": "Prefer \`.at(…)\` over \`[….length - index]\`.",
351+
"messageId": "negative-index",
352+
"nodeType": "BinaryExpression",
353+
"ruleId": "unicorn/prefer-at",
354+
"severity": 2,
355+
},
338356
{
339357
"column": 28,
340358
"endColumn": 26,
@@ -430,6 +448,168 @@ exports[`fixtures should match all snapshots: 429.mdx 1`] = `
430448
]
431449
`;
432450
451+
exports[`fixtures should match all snapshots: 435.mdx 1`] = `
452+
[
453+
{
454+
"column": 1,
455+
"endColumn": 2,
456+
"endLine": 2,
457+
"fix": {
458+
"range": [
459+
8,
460+
9,
461+
],
462+
"text": " ",
463+
},
464+
"line": 2,
465+
"message": "Replace \`\` with \`··\`",
466+
"messageId": "replace",
467+
"nodeType": null,
468+
"ruleId": "prettier/prettier",
469+
"severity": 2,
470+
},
471+
{
472+
"column": 1,
473+
"endColumn": 3,
474+
"endLine": 3,
475+
"fix": {
476+
"range": [
477+
18,
478+
20,
479+
],
480+
"text": " ",
481+
},
482+
"line": 3,
483+
"message": "Replace \`↹↹\` with \`····\`",
484+
"messageId": "replace",
485+
"nodeType": null,
486+
"ruleId": "prettier/prettier",
487+
"severity": 2,
488+
},
489+
{
490+
"column": 1,
491+
"endColumn": 3,
492+
"endLine": 4,
493+
"fix": {
494+
"range": [
495+
39,
496+
41,
497+
],
498+
"text": " ",
499+
},
500+
"line": 4,
501+
"message": "Replace \`↹↹\` with \`····\`",
502+
"messageId": "replace",
503+
"nodeType": null,
504+
"ruleId": "prettier/prettier",
505+
"severity": 2,
506+
},
507+
{
508+
"column": 1,
509+
"endColumn": 2,
510+
"endLine": 5,
511+
"fix": {
512+
"range": [
513+
66,
514+
67,
515+
],
516+
"text": " ",
517+
},
518+
"line": 5,
519+
"message": "Replace \`\` with \`··\`",
520+
"messageId": "replace",
521+
"nodeType": null,
522+
"ruleId": "prettier/prettier",
523+
"severity": 2,
524+
},
525+
{
526+
"column": 1,
527+
"endColumn": 2,
528+
"endLine": 7,
529+
"fix": {
530+
"range": [
531+
72,
532+
73,
533+
],
534+
"text": " ",
535+
},
536+
"line": 7,
537+
"message": "Replace \`\` with \`··\`",
538+
"messageId": "replace",
539+
"nodeType": null,
540+
"ruleId": "prettier/prettier",
541+
"severity": 2,
542+
},
543+
{
544+
"column": 2,
545+
"endColumn": 4,
546+
"endLine": 10,
547+
"fix": {
548+
"range": [
549+
91,
550+
93,
551+
],
552+
"text": "",
553+
},
554+
"line": 10,
555+
"message": "Delete \`··\`",
556+
"messageId": "delete",
557+
"nodeType": null,
558+
"ruleId": "prettier/prettier",
559+
"severity": 2,
560+
},
561+
{
562+
"column": 3,
563+
"endColumn": 16,
564+
"endLine": 12,
565+
"fix": {
566+
"range": [
567+
102,
568+
115,
569+
],
570+
"text": "<Components
571+
",
572+
},
573+
"line": 12,
574+
"message": "Replace \`··<Components\` with \`<Components⏎···\`",
575+
"messageId": "replace",
576+
"nodeType": null,
577+
"ruleId": "prettier/prettier",
578+
"severity": 2,
579+
},
580+
{
581+
"column": 6,
582+
"endColumn": 16,
583+
"endLine": 12,
584+
"line": 12,
585+
"message": "'Components' is not defined.",
586+
"messageId": "undefined",
587+
"nodeType": "JSXIdentifier",
588+
"ruleId": "react/jsx-no-undef",
589+
"severity": 2,
590+
},
591+
{
592+
"column": 1,
593+
"endColumn": 7,
594+
"endLine": 13,
595+
"fix": {
596+
"range": [
597+
124,
598+
130,
599+
],
600+
"text": "\`}
601+
",
602+
},
603+
"line": 13,
604+
"message": "Replace \`····\`}\` with \`\`}⏎·\`",
605+
"messageId": "replace",
606+
"nodeType": null,
607+
"ruleId": "prettier/prettier",
608+
"severity": 2,
609+
},
610+
]
611+
`;
612+
433613
exports[`fixtures should match all snapshots: 445.mdx 1`] = `
434614
[
435615
{
@@ -620,6 +800,7 @@ exports[`fixtures should match all snapshots: acorn.mdx 1`] = `
620800
"fatal": true,
621801
"line": 9,
622802
"message": "Parsing error: Unexpected character \`\\\` (U+005C) in name, expected a name character such as letters, digits, \`$\`, or \`_\`; whitespace before attributes; or the end of the tag",
803+
"nodeType": null,
623804
"ruleId": null,
624805
"severity": 2,
625806
},
@@ -714,8 +895,8 @@ the installation guides.
714895
p={3}
715896
bg="lightgray"
716897
style={{
717-
textAlign: 'center',
718-
fontWeight: 'bold',
898+
textAlign: 'center',
899+
fontWeight: 'bold',
719900
}}
720901
>
721902
[Next.js](/getting-started/next) |
@@ -892,6 +1073,7 @@ exports[`fixtures should match all snapshots: comments.mdx 1`] = `
8921073
"fatal": true,
8931074
"line": 2,
8941075
"message": "Parsing error: Unexpected character \`!\` (U+0021) before name, expected a character that can start a name, such as a letter, \`$\`, or \`_\` (note: to create a comment in MDX, use \`{/* text */}\`)",
1076+
"nodeType": null,
8951077
"ruleId": null,
8961078
"severity": 2,
8971079
},
@@ -905,6 +1087,7 @@ exports[`fixtures should match all snapshots: details.mdx 1`] = `
9051087
"fatal": true,
9061088
"line": 1,
9071089
"message": "Parsing error: Expected a closing tag for \`</summary>\` (1:1-1:10) before the end of \`paragraph\`",
1090+
"nodeType": null,
9081091
"ruleId": null,
9091092
"severity": 2,
9101093
},

0 commit comments

Comments
 (0)