@diplodoc/transform 4.7.1 → 4.7.2

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.
Files changed (35) hide show
  1. package/dist/css/print.css.map +1 -1
  2. package/dist/css/yfm.css +4 -2
  3. package/dist/css/yfm.css.map +3 -3
  4. package/dist/css/yfm.min.css +1 -1
  5. package/dist/css/yfm.min.css.map +3 -3
  6. package/dist/js/yfm.js +39 -39
  7. package/dist/js/yfm.js.map +1 -1
  8. package/dist/js/yfm.min.js +1 -1
  9. package/dist/js/yfm.min.js.map +1 -1
  10. package/lib/plugins/anchors/collect.js +2 -1
  11. package/lib/plugins/anchors/collect.js.map +1 -1
  12. package/lib/plugins/block-anchor/index.d.ts +1 -1
  13. package/lib/plugins/block-anchor/index.js +1 -2
  14. package/lib/plugins/block-anchor/index.js.map +1 -1
  15. package/lib/yfmlint/index.d.ts +1 -1
  16. package/lib/yfmlint/markdownlint-custom-rule/yfm007.js.map +1 -1
  17. package/package.json +4 -10
  18. package/src/.eslintrc.js +16 -0
  19. package/src/js/term/index.ts +2 -2
  20. package/src/transform/index.ts +1 -1
  21. package/src/transform/liquid/substitutions.ts +1 -1
  22. package/src/transform/log.ts +1 -1
  23. package/src/transform/md.ts +1 -1
  24. package/src/transform/plugins/anchors/collect.ts +3 -4
  25. package/src/transform/plugins/anchors/index.ts +1 -1
  26. package/src/transform/plugins/block-anchor/index.ts +2 -2
  27. package/src/transform/plugins/file/file.ts +2 -2
  28. package/src/transform/plugins/images/index.ts +2 -2
  29. package/src/transform/plugins/includes/index.ts +1 -1
  30. package/src/transform/plugins/links/index.ts +2 -2
  31. package/src/transform/plugins/video/index.ts +1 -1
  32. package/src/transform/utilsFS.ts +1 -1
  33. package/src/transform/yfmlint/index.ts +1 -1
  34. package/src/transform/yfmlint/markdownlint-custom-rule/yfm007.ts +15 -14
  35. package/src/.eslintrc +0 -10
@@ -12,7 +12,7 @@ import type Renderer from 'markdown-it/lib/renderer';
12
12
 
13
13
  import type {VideoFullOptions, VideoPluginOptions, VideoToken} from './types';
14
14
  import {parseVideoUrl} from './parsers';
15
- import {defaults, VideoService} from './const';
15
+ import {VideoService, defaults} from './const';
16
16
 
17
17
  // eslint-disable-next-line valid-jsdoc
18
18
  /**
@@ -2,7 +2,7 @@ import {readFileSync, statSync} from 'fs';
2
2
  import type {Dictionary} from 'lodash';
3
3
  import escapeRegExp from 'lodash/escapeRegExp';
4
4
 
5
- import {parse, resolve, join, sep} from 'path';
5
+ import {join, parse, resolve, sep} from 'path';
6
6
 
7
7
  import liquid from './liquid';
8
8
  import {StateCore} from './typings';
@@ -18,7 +18,7 @@ import {
18
18
  import {errorToString, getLogLevel} from './utils';
19
19
  import {Options} from './typings';
20
20
  import type {Dictionary} from 'lodash';
21
- import {Logger, LogLevels} from '../log';
21
+ import {LogLevels, Logger} from '../log';
22
22
  import {yfm009} from './markdownlint-custom-rule/yfm009';
23
23
 
24
24
  const defaultLintRules = [yfm001, yfm002, yfm003, yfm004, yfm005, yfm006, yfm007, yfm008, yfm009];
@@ -9,20 +9,21 @@ export const yfm007: Rule = {
9
9
  if (!config) {
10
10
  return;
11
11
  }
12
- params.tokens.forEach((el) =>
13
- el.children
14
- ?.filter((token) => {
15
- return token.type === '__yfm_lint';
16
- })
17
- .forEach((term) => {
18
- // @ts-expect-error bad markdownlint typings
19
- if (term.attrGet('YFM007')) {
20
- onError({
21
- lineNumber: term.lineNumber,
22
- context: term.line,
23
- });
24
- }
25
- }),
12
+ params.tokens.forEach(
13
+ (el) =>
14
+ el.children
15
+ ?.filter((token) => {
16
+ return token.type === '__yfm_lint';
17
+ })
18
+ .forEach((term) => {
19
+ // @ts-expect-error bad markdownlint typings
20
+ if (term.attrGet('YFM007')) {
21
+ onError({
22
+ lineNumber: term.lineNumber,
23
+ context: term.line,
24
+ });
25
+ }
26
+ }),
26
27
  );
27
28
  },
28
29
  };
package/src/.eslintrc DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "@yandex-cloud/eslint-config/client",
3
- "overrides": [{
4
- "files": ["*"],
5
- "rules": {
6
- "new-cap": [2, { "capIsNew": false }],
7
- "@typescript-eslint/no-namespace": [1, { "allowDeclarations": true }]
8
- }
9
- }]
10
- }