@diplodoc/yfmlint 1.3.4 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,18 @@
1
1
  import type { MarkdownItToken, RuleOnError, RuleParams } from 'markdownlint';
2
2
  import type { TokenWithAttrs } from '../typings';
3
+ /**
4
+ * Validates and adjusts lineNumber to prevent markdownlint exception.
5
+ * When include files are used, lineNumber might exceed the original file's line count.
6
+ * Also returns the file path from markdown-it env if available.
7
+ */
8
+ export declare function validateLineNumberAndGetFilePath(params: RuleParams, rawLineNumber: number | undefined): {
9
+ lineNumber: number;
10
+ filePath: string;
11
+ };
12
+ /**
13
+ * Creates error context with optional file path information.
14
+ */
15
+ export declare function createContextWithFileInfo(baseContext: string, filePath: string, paramsName: string): string;
3
16
  /**
4
17
  * Finds all inline tokens containing links and calls handler for each link.
5
18
  * Used by rules that validate links (YFM002, YFM003, YFM010).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/yfmlint",
3
- "version": "1.3.4",
3
+ "version": "1.3.5",
4
4
  "description": "YFM (Yandex Flavored Markdown) syntax linter with custom rules for Diplodoc platform",
5
5
  "keywords": [
6
6
  "docs",
@@ -40,6 +40,7 @@
40
40
  "prepublishOnly": "npm run lint && npm run test && npm run build",
41
41
  "test": "vitest --run",
42
42
  "test:watch": "vitest",
43
+ "test:coverage": "vitest --run --coverage",
43
44
  "typecheck": "tsc -p tsconfig.json --noEmit",
44
45
  "lint": "lint update && lint",
45
46
  "lint:fix": "lint update && lint fix",
@@ -47,14 +48,13 @@
47
48
  "prepare": "husky"
48
49
  },
49
50
  "devDependencies": {
50
- "@diplodoc/lint": "^1.9.2",
51
+ "@diplodoc/lint": "^1.13.2",
51
52
  "@diplodoc/transform": "^4.48.4",
52
53
  "@diplodoc/tsconfig": "^1.0.2",
53
54
  "@types/lodash": "^4.17.15",
54
55
  "@types/markdown-it": "^13.0.9",
55
56
  "@types/markdown-it-attrs": "^4.1.3",
56
57
  "@vitest/coverage-v8": "^3.0.8",
57
- "esbuild": "^0.27.2",
58
58
  "lodash": "^4.17.21",
59
59
  "markdown-it": "^13.0.2",
60
60
  "markdown-it-attrs": "^4.3.1",