diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index ac58caf..0000000 --- a/.eslintignore +++ /dev/null @@ -1,37 +0,0 @@ -# dist -/dist/ -/dist-server/ - -# npm -/node_modules/ - -# report -/coverage-ts/ -/tsc-check/ -/coverage/ - -# style's d.ts -*.scss.d.ts -*.css.d.ts - -# test -/test-backstop/ - -# static site -/static-site/ - -# storybook -/storybook-static/ - -# example - -# /* eslint consistent-this: ["error", "unit", "aggressor"] */ - -# /* eslint-disable no-unused-vars */ -# var React = require('react'); -# /* eslint-enable no-unused-vars */ - -# // eslint-disable-next-line no-unused-vars -# var React = require('react'); - -# var React = require('react'); // eslint-disable-line no-unused-vars diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100755 index 5789f27..0000000 --- a/.eslintrc.json +++ /dev/null @@ -1,829 +0,0 @@ -// Rule 'space-after-keywords' was removed and replaced by: keyword-spacing space-after-keywords -// Rule 'space-return-throw-case' was removed and replaced by: keyword-spacing space-return-throw-case - -{ - "parser": "@typescript-eslint/parser", - "parserOptions": { - "project": [ - "./tsconfig.json" - ], - "ecmaVersion": 2020, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - } - }, - "extends": [ - "prettier", - "plugin:prettier/recommended", - "plugin:jest/all", - "eslint:all", - "plugin:@typescript-eslint/all", - // typescript begin - // "plugin:@typescript-eslint/recommended", - // "plugin:@typescript-eslint/recommended-type-checked", - // "plugin:@typescript-eslint/strict", - // "plugin:@typescript-eslint/strict-type-checked", - // "plugin:@typescript-eslint/stylistic", - // "plugin:@typescript-eslint/stylistic-type-checked", - // typescript end - "plugin:typescript-sort-keys/recommended", - "plugin:jsx-a11y/recommended", - "plugin:react/all", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/recommended", - "plugin:import/typescript", - "plugin:promise/recommended", - "plugin:sonarjs/recommended", - "plugin:unicorn/all" - ], - "globals": { - "JSX": true, - "require": true, - "module": true, - "console": true - }, - "plugins": [ - "prettier", - "@typescript-eslint", - "jest", - "jsx-a11y", - "no-use-extend-native", - "import", - "react", - "react-hooks", - "promise", - "sonarjs", - "optimize-regex", - "unicorn", - "no-loops", - "filenames", - "typescript-sort-keys", - "babel" - ], - "env": { - "es6": true, - "browser": false, - "node": false - }, - "settings": { - "import/resolver": { - "typescript": {} - }, - "react": { - "version": "detect" - } - }, - "rules": { - // Small, one rule only - "jest/require-hook": [ - 2, - { - "allowedFunctionCalls": [ - "innerInitialization" - ] - } - ], - "prettier/prettier": 2, - "promise/always-return": 0, - "no-loops/no-loops": 2, - "optimize-regex/optimize-regex": 2, - "no-use-extend-native/no-use-extend-native": 2, - // React-hooks - "react-hooks/rules-of-hooks": 2, - "react-hooks/exhaustive-deps": 2, - // Typescript - "@typescript-eslint/array-type": [ - 2, - { - "default": "generic" - } - ], - "@typescript-eslint/ban-ts-comment": 1, - "@typescript-eslint/naming-convention": [ - 2, - { - "selector": "typeAlias", - "format": [ - "StrictPascalCase" - ], - "suffix": [ - "Type" - ] - }, - { - "selector": "enum", - "format": [ - "StrictPascalCase" - ], - "suffix": [ - "Enum" - ] - } - ], - "@typescript-eslint/no-shadow": [ - 2, - { - "builtinGlobals": false, - "hoist": "all" - } - ], - "@typescript-eslint/no-unused-vars": [ - 2, - { - "varsIgnorePattern": "[iI]gnored" - } - ], - "@typescript-eslint/no-use-before-define": 2, - "@typescript-eslint/no-misused-promises": [ - 2, - { - "checksVoidReturn": { - "arguments": true, - "attributes": true, - "properties": true, - "returns": true, - "variables": true - } - } - ], - "@typescript-eslint/no-floating-promises": [ - 2, - { - "ignoreIIFE": true - } - ], - "@typescript-eslint/no-unnecessary-boolean-literal-compare": 0, - // Typescript - defined by eslint - "@typescript-eslint/space-before-function-paren": 0, - "@typescript-eslint/indent": 0, - "@typescript-eslint/comma-dangle": 0, - "@typescript-eslint/no-magic-numbers": 0, - "@typescript-eslint/no-extra-parens": 0, - "@typescript-eslint/lines-around-comment": 0, - "@typescript-eslint/lines-between-class-members": 0, - "@typescript-eslint/block-spacing": 0, - "@typescript-eslint/quotes": 0, - // TODO: enable this - "@typescript-eslint/prefer-readonly-parameter-types": 0, - // Unicorn - "unicorn/prefer-string-replace-all": 0, - "unicorn/prefer-node-protocol": 2, - "unicorn/no-array-callback-reference": 0, - "unicorn/no-array-for-each": 0, - "unicorn/filename-case": 2, - "unicorn/no-array-reduce": 0, - "unicorn/no-null": 0, - "unicorn/no-fn-reference-in-iterator": 2, - "unicorn/prevent-abbreviations": [ - 2, - { - "replacements": { - "attr": false, - "attrs": false, - "arg": false, - "args": false, - "prop": false, - "props": false, - "prev": false, - "dev": false, - "evt": false, - "src": false, - "ref": false - } - } - ], - // Babel - "babel/new-cap": 2, - "babel/camelcase": 2, - "babel/no-invalid-this": 2, - "babel/object-curly-spacing": 2, - "babel/quotes": 0, - "babel/semi": 2, - "babel/no-unused-expressions": 2, - "babel/valid-typeof": 2, - // JSX-a11y - // deprecated - "jsx-a11y/label-has-for": 0, - "jsx-a11y/no-access-key": 2, - "jsx-a11y/no-autofocus": 2, - "jsx-a11y/no-onchange": 2, - // Filenames - "filenames/no-index": 2, - "filenames/match-regex": [ - 2, - "^[a-z\\.\\-\\d]+$", - true - ], - "filenames/match-exported": 0, - // Import - "import/no-named-as-default-member": 0, - "import/default": 2, - "import/no-unused-modules": 2, - "import/no-useless-path-segments": 2, - "import/no-default-export": 2, - "import/order": [ - 2, - { - "newlines-between": "always-and-inside-groups", - "groups": [ - "builtin", - "internal", - "external", - "parent", - "sibling", - "index" - ] - } - ], - // React - "react/jsx-uses-react": 2, - "react/react-in-jsx-scope": 0, - "react/jsx-no-bind": 0, - "react/jsx-newline": 0, - "react/jsx-filename-extension": [ - 2, - { - "extensions": [ - ".ts", - ".tsx" - ] - } - ], - "react/no-unused-prop-types": 2, - "react/sort-comp": 2, - "react/jsx-sort-props": [ - 2, - { - "reservedFirst": false, - "shorthandLast": false, - "ignoreCase": false, - "callbacksLast": false, - "noSortAlphabetically": false - } - ], - "react/jsx-closing-bracket-location": [ - 2, - "line-aligned" - ], - "react/forbid-component-props": 0, - "react/jsx-indent-props": [ - 2, - "first" - ], - "react/jsx-no-literals": 0, - "react/require-default-props": 0, - "react/require-optimization": 0, - "react/jsx-max-depth": [ - 2, - { - "max": 5 - } - ], - "react/jsx-tag-spacing": [ - 2, - { - "closingSlash": "never", - "beforeSelfClosing": "always", - "afterOpening": "never", - "beforeClosing": "never" - } - ], - "react/jsx-max-props-per-line": [ - 2, - { - "maximum": 5 - } - ], - "react/jsx-one-expression-per-line": 0, - "react/state-in-constructor": 0, - "react/no-set-state": 0, - // eslint - "function-call-argument-newline": [ - 2, - "consistent" - ], - "array-element-newline": [ - 2, - "consistent" - ], - "object-property-newline": [ - 2, - { - "allowAllPropertiesOnSameLine": true - } - ], - "multiline-ternary": 0, - "max-lines": [ - 2, - 1000 - ], - "max-lines-per-function": [ - 2, - 600 - ], - "no-magic-numbers": 0, - "sort-keys": 2, - "sort-imports": 0, - "newline-per-chained-call": [ - 2, - { - "ignoreChainWithDepth": 4 - } - ], - "function-paren-newline": 0, - "capitalized-comments": [ - 2, - "always", - { - "ignorePattern": "ignored|webpackChunkName", - "ignoreInlineComments": true - } - ], - "arrow-body-style": [ - 2, - "always" - ], - "prefer-named-capture-group": 0, - "prefer-destructuring": [ - 2, - { - "VariableDeclarator": { - "array": true, - "object": true - }, - "AssignmentExpression": { - "array": true, - "object": true - } - }, - { - "enforceForRenamedProperties": false - } - ], - "no-return-await": 2, - "no-console": 0, - "no-warning-comments": 0, - "no-unused-vars": [ - 2, - { - "varsIgnorePattern": "[iI]gnored" - } - ], - "consistent-this": 2, - "no-inline-comments": 0, - "no-ternary": 0, - "object-curly-spacing": [ - 2, - "never", - { - "arraysInObjects": false, - "objectsInObjects": false - } - ], - "one-var": [ - 2, - { - "var": "always", - "let": "never", - "const": "never" - } - ], - "wrap-regex": 0, - "comma-dangle": [ - 2, - { - "arrays": "always-multiline", - "objects": "always-multiline", - "imports": "always-multiline", - "exports": "always-multiline", - "functions": "never" - } - ], - "no-cond-assign": [ - 2, - "always" - ], - "no-constant-condition": 2, - "no-control-regex": 2, - "no-debugger": 2, - "no-dupe-args": 2, - "no-dupe-keys": 2, - "no-duplicate-case": 2, - "no-empty-character-class": 2, - "no-empty": 2, - "no-ex-assign": 2, - "no-extra-boolean-cast": 2, - "no-extra-parens": 0, - "no-extra-semi": 2, - "no-func-assign": 2, - "no-inner-declarations": [ - 2, - "both" - ], - "no-invalid-regexp": 2, - "no-irregular-whitespace": 2, - "no-negated-in-lhs": 2, - "no-obj-calls": 2, - "no-regex-spaces": 2, - "no-sparse-arrays": 2, - "no-unreachable": 2, - "use-isnan": 2, - "valid-jsdoc": 2, - "valid-typeof": 2, - "no-unexpected-multiline": 2, - "accessor-pairs": [ - 2, - { - "getWithoutSet": true, - "setWithoutGet": true - } - ], - "block-scoped-var": 2, - "complexity": [ - 2, - 5 - ], - "consistent-return": 2, - "curly": [ - 2, - "all" - ], - "default-case": 2, - "dot-notation": [ - 2, - { - "allowKeywords": true - } - ], - "dot-location": [ - 2, - "property" - ], - "eqeqeq": [ - 2, - "smart" - ], - "guard-for-in": 2, - "no-alert": 2, - "no-caller": 2, - "no-div-regex": 2, - "no-else-return": 2, - "no-eq-null": 2, - "no-eval": 2, - "no-extend-native": 2, - "no-extra-bind": 2, - "no-fallthrough": 2, - "no-floating-decimal": 2, - "no-implicit-coercion": [ - 2, - { - "boolean": true, - "number": true, - "string": true - } - ], - "no-implied-eval": 2, - "no-invalid-this": 0, - "no-iterator": 2, - "no-labels": 2, - "no-lone-blocks": 2, - "no-loop-func": 2, - "no-multi-spaces": 2, - "no-multi-str": 2, - "no-native-reassign": 2, - "no-new-func": 2, - "no-new-wrappers": 2, - "no-new": 2, - "no-octal-escape": 2, - "no-octal": 2, - "no-param-reassign": [ - 2, - { - "props": true - } - ], - "no-process-env": 2, - "no-proto": 2, - "no-redeclare": 2, - "no-return-assign": [ - 2, - "always" - ], - "no-script-url": 2, - "no-self-compare": 2, - "no-sequences": 2, - "no-throw-literal": 2, - "no-unused-expressions": 2, - "no-useless-call": 2, - "no-void": 2, - "no-with": 2, - "radix": 2, - "vars-on-top": 2, - "wrap-iife": [ - 2, - "inside" - ], - "yoda": [ - 2, - "never", - { - "exceptRange": true - } - ], - "strict": [ - 2, - "global" - ], - "init-declarations": [ - 2, - "always" - ], - "no-catch-shadow": 2, - "no-delete-var": 2, - "no-label-var": 2, - "no-shadow-restricted-names": 2, - // see @typescript-eslint/no-shadow - "no-shadow": 0, - "no-undef-init": 2, - "no-undef": 2, - "no-undefined": 2, - "no-use-before-define": 2, - "callback-return": 2, - "handle-callback-err": [ - 2, - "err" - ], - "no-mixed-requires": [ - 2, - true - ], - "no-new-require": 2, - "no-path-concat": 2, - "no-process-exit": 2, - "no-restricted-modules": 2, - "no-sync": 2, - "array-bracket-spacing": [ - 2, - "never", - { - "singleValue": false, - "objectsInArrays": false, - "arraysInArrays": false - } - ], - "brace-style": [ - 2, - "1tbs", - {} - ], - "camelcase": [ - 2, - { - "properties": "always" - } - ], - "comma-spacing": [ - 2, - { - "before": false, - "after": true - } - ], - "comma-style": [ - 2, - "last", - { - "exceptions": { - "ArrayExpression": false, - "ArrayPattern": false, - "ArrowFunctionExpression": false, - "CallExpression": false, - "FunctionDeclaration": false, - "FunctionExpression": false, - "ImportDeclaration": false, - "ObjectExpression": false, - "ObjectPattern": false, - "VariableDeclaration": false - } - } - ], - "computed-property-spacing": [ - 2, - "never" - ], - "eol-last": 2, - "func-names": 2, - "func-style": [ - 2, - "declaration" - ], - "jsx-quotes": 2, - "id-length": [ - 2, - { - "min": 3, - "max": 34, - "exceptions": [ - "id", - "to", - "x", - "y" - ] - } - ], - "indent": 0, - "key-spacing": [ - 2, - { - "beforeColon": false, - "afterColon": true - } - ], - "keyword-spacing": [ - 2, - { - "before": true, - "after": true - } - ], - "lines-around-comment": 0, - "linebreak-style": [ - 2, - "unix" - ], - "lines-between-class-members": [ - 2, - "always", - { - "exceptAfterSingleLine": true - } - ], - "max-nested-callbacks": [ - 2, - 5 - ], - "new-cap": [ - 2, - { - "newIsCap": true, - "capIsNew": true - } - ], - "new-parens": 2, - "newline-after-var": [ - 2, - "always" - ], - "no-array-constructor": 2, - "no-continue": 2, - "no-lonely-if": 2, - "no-mixed-spaces-and-tabs": [ - 2, - "smart-tabs" - ], - "no-multiple-empty-lines": [ - 2, - { - "max": 2 - } - ], - "no-nested-ternary": 2, - "no-new-object": 2, - "no-spaced-func": 2, - "no-trailing-spaces": 2, - "no-underscore-dangle": 2, - "no-unneeded-ternary": 2, - "operator-assignment": [ - 2, - "always" - ], - "operator-linebreak": 0, - "padded-blocks": [ - 2, - { - "blocks": "never", - "classes": "never", - "switches": "never" - } - ], - "quote-props": [ - 2, - "as-needed", - { - "keywords": true, - "unnecessary": true, - "numbers": true - } - ], - "quotes": 0, - "id-match": [ - 2, - "^[a-zA-Z0-9$]+$|^[A-Z0-9_]+$", - { - "onlyDeclarations": false, - "properties": true - } - ], - "semi-spacing": [ - 2, - { - "before": false, - "after": true - } - ], - "semi": [ - 2, - "always" - ], - "sort-vars": [ - 2, - { - "ignoreCase": false - } - ], - "space-before-blocks": [ - 2, - "always" - ], - "space-before-function-paren": [ - 2, - { - "anonymous": "always", - "named": "never", - "asyncArrow": "ignore" - } - ], - "space-in-parens": [ - 2, - "never" - ], - "space-infix-ops": [ - 2, - { - "int32Hint": true - } - ], - "space-unary-ops": [ - 2, - { - "words": true, - "nonwords": false - } - ], - "spaced-comment": [ - 2, - "always", - {} - ], - "arrow-parens": [ - 2, - "as-needed" - ], - "arrow-spacing": [ - 2, - { - "before": true, - "after": true - } - ], - "constructor-super": 2, - "generator-star-spacing": 2, - "no-class-assign": 2, - "no-const-assign": 2, - "no-this-before-super": 2, - "no-var": 2, - "object-shorthand": [ - 2, - "always" - ], - "prefer-const": 2, - "prefer-spread": 2, - "prefer-reflect": 2, - "require-yield": 2, - "max-depth": [ - 2, - 4 - ], - "max-len": [ - 2, - 120, - 4, - { - "ignoreComments": true, - "ignoreUrls": true - } - ], - "max-params": [ - 2, - 5 - ], - "max-statements": [ - 2, - 20 - ], - "no-bitwise": 2, - "no-plusplus": 2 - } -} diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index bfc700b..75883b9 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - node-version: [16.x, 18.x, 20.x, latest] + node-version: [ 18.x, 20.x, latest ] steps: - uses: actions/checkout@v3 diff --git a/declaration.d.ts b/declaration.d.ts index d117d5b..06e5858 100644 --- a/declaration.d.ts +++ b/declaration.d.ts @@ -1,5 +1,4 @@ /* global SVGSVGElement */ -/* eslint-disable import/no-default-export, init-declarations */ declare module "*.svg" { // eslint-disable-next-line @typescript-eslint/no-require-imports diff --git a/dist/index.js.map b/dist/index.js.map index e896c73..83461b5 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","mappings":"mBACA,ICCYA,EDDRC,EAAsB,CEA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,yLHH9D,SAAYjB,GACRA,EAAA,YACAA,EAAA,YACAA,EAAA,aACH,CAJD,CAAYA,IAAAA,EAAa,KAMlB,MAAMkB,EAA4C,CACrDC,cAAeA,CAACC,EAAkBC,IACvBA,EAEXC,WAAW,EAC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pC,MAAOvP,iBAAkBwS,EAAsB,UAAE5S,GAAa2P,GACvDvP,iBAAkByS,GAA2BlT,EASpD,MAAO,GANHiT,IAA2BC,EACrBA,EACA,GAAGA,KAA2BD,OAETvS,EAAkBL,IAGrD,CHqDyC8S,CAAwBnD,GAE7D,MAAO,eAAegD,MAAyBD,SACnD,CI/DO,MAAMK,GAA0B,oBAE1BC,GAA2B,qBAE3BC,GAAyBtT,EAAsBS,iB","sources":["webpack://markdown-pro/webpack/bootstrap","webpack://markdown-pro/./www/library/src/markdown-const.ts","webpack://markdown-pro/webpack/runtime/define property getters","webpack://markdown-pro/webpack/runtime/hasOwnProperty shorthand","webpack://markdown-pro/webpack/runtime/make namespace object","webpack://markdown-pro/./www/library/src/render/render-const.ts","webpack://markdown-pro/./www/library/src/parser/util/string.ts","webpack://markdown-pro/./www/library/src/parser/util/navigation.ts","webpack://markdown-pro/./www/library/src/parser/parser-selector.ts","webpack://markdown-pro/./www/library/src/parser/footnote/footnote-const.ts","webpack://markdown-pro/./www/library/src/parser/footnote/footnote-helper.ts","webpack://markdown-pro/./www/library/src/parser/footnote/footnote.ts","webpack://markdown-pro/./www/library/src/parser/util/is-tag.ts","webpack://markdown-pro/./www/library/src/parser/util/is.ts","webpack://markdown-pro/./www/library/src/render/render-util.ts","webpack://markdown-pro/./www/library/src/render/render-link.ts","webpack://markdown-pro/./www/library/src/render/render-pair-tag.ts","webpack://markdown-pro/./www/library/src/render/render-helper.ts","webpack://markdown-pro/./www/library/src/render/render-table/render-table-const.ts","webpack://markdown-pro/./www/library/src/render/render-table/render-table-helper.ts","webpack://markdown-pro/./www/library/src/render/render-table/render-table.ts","webpack://markdown-pro/./www/library/src/render/render.ts","webpack://markdown-pro/./www/library/src/markdown.ts","webpack://markdown-pro/./www/library/src/parser/parse-line.ts","webpack://markdown-pro/./www/library/src/parser/util/variable.ts","webpack://markdown-pro/./www/library/src/helper.ts","webpack://markdown-pro/./www/library/library.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","import type {MarkdownConfigType} from \"../library\";\n\nexport enum ThemeNameEnum {\n auto = \"auto\",\n dark = \"dark\",\n light = \"light\",\n}\n\nexport const defaultMarkdownConfig: MarkdownConfigType = {\n codeHighlight: (langName: string, code: string): string => {\n return code;\n },\n parseLink: true,\n themeName: ThemeNameEnum.auto,\n useLineBreak: false,\n useWrapper: true,\n wrapperClassName: \"md-pro\",\n};\n\nexport const themeClassNameMap: Record = {\n [ThemeNameEnum.auto]: `${defaultMarkdownConfig.wrapperClassName}-theme-${ThemeNameEnum.auto}`,\n [ThemeNameEnum.dark]: `${defaultMarkdownConfig.wrapperClassName}-theme-${ThemeNameEnum.dark}`,\n [ThemeNameEnum.light]: `${defaultMarkdownConfig.wrapperClassName}-theme-${ThemeNameEnum.light}`,\n};\n\nexport const mailPrefix = \"mailto:\";\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export const emptyString = \"\";\nexport const space = \" \";\nexport const breakLineTag = \"
\";\n","import {emptyString} from \"../../render/render-const\";\n\nexport function filterEmptyString(line: string): boolean {\n return line.trim() !== emptyString;\n}\n\nexport function cleanLine(line: string): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return line.trim().replace(/\\s+/gu, \" \");\n}\n\nexport function getIsAllSymbolsEqual(line: string): boolean {\n // eslint-disable-next-line unicorn/prefer-spread\n const charList: Array = line.split(\"\");\n\n const [firstSymbol] = charList;\n\n if (!firstSymbol) {\n return true;\n }\n\n // eslint-disable-next-line no-loops/no-loops\n for (const char of charList) {\n if (char !== firstSymbol) {\n return false;\n }\n }\n\n return true;\n}\n","import type {LineDataType} from \"../parser-type\";\nimport {emptyString} from \"../../render/render-const\";\n\n// eslint-disable-next-line complexity\nexport function searchSiblingItem(\n lineData: LineDataType,\n lineDataList: Array,\n direction: number\n): LineDataType | null {\n const index = lineDataList.indexOf(lineData);\n\n if (index === -1) {\n // Console.error('lineDataList should contain lineData');\n return null;\n }\n\n const siblingIndex = index + direction;\n\n const siblingItem = siblingIndex in lineDataList ? lineDataList[siblingIndex] : null;\n\n if (!siblingItem) {\n return null;\n }\n\n if (siblingItem.trimmedLine === emptyString) {\n const updatedDirection = direction + (direction >= 0 ? 1 : -1);\n\n return searchSiblingItem(lineData, lineDataList, updatedDirection);\n }\n\n return siblingItem;\n}\n\nexport function getIsEdgeLine(lineData: LineDataType, lineDataList: Array, direction: number): boolean {\n const {selector} = lineData;\n const foundItem = searchSiblingItem(lineData, lineDataList, direction);\n\n return !foundItem || foundItem.selector !== selector;\n}\n\nexport function getParent(lineData: LineDataType, lineDataList: Array): LineDataType | null {\n const linaDataListLength = lineDataList.length;\n\n // eslint-disable-next-line no-loops/no-loops\n for (let lineDataIndex = linaDataListLength - 1; lineDataIndex >= 0; lineDataIndex -= 1) {\n const lineDataCandidate = lineDataList[lineDataIndex];\n\n if (lineDataCandidate.spaceCount < lineData.spaceCount) {\n return lineDataCandidate;\n }\n }\n\n // Console.error('Parent not found');\n\n return null;\n}\n","import type {\n OlParseDataType,\n OlTypeBigAlphabetType,\n OlTypeBigRomanNumberType,\n OlTypeNumericType,\n OlTypeSmallAlphabetType,\n OlTypeSmallRomanNumberType,\n PairTagSelectorType,\n SelectorOlBigAlphabetItemType,\n SelectorOlBigRomanNumberItemType,\n SelectorOlNumericItemType,\n SelectorOlSmallAlphabetItemType,\n SelectorOlSmallRomanNumberItemType,\n SelectorType,\n} from \"./parser-type\";\n\nexport const selectorHeaderList: Array = [\"# \", \"## \", \"### \", \"#### \", \"##### \", \"###### \"];\n// Export const selectorHeaderList: Array = ['# ', '## ', '### ', '#### ', '##### ', '###### '];\nexport const selectorBlockquoteList: Array = [\"> \"];\n// Export const selectorBlockquoteList: Array = ['> '];\nexport const selectorLineList: Array = [\"---\", \"***\", \"___\"];\n// Export const selectorLineList: Array = ['---', '***', '___'];\nexport const selectorTableList: Array = [\"|\"];\n// Export const selectorTableList: Array = ['|'];\nexport const selectorCodeList: Array = [\"```\"];\n// Export const selectorCodeList: Array = ['```'];\n\nexport const selectorULItemList: Array = [\"+ \", \"- \", \"* \"];\n// Export const selectorULItemList: Array = ['+ ', '- ', '* '];\n\nexport const olNumericItemSelector: SelectorOlNumericItemType = \"0. \";\nexport const olNumericItemRegExp = /^\\d+\\.\\s/u;\nexport const olNumericType: OlTypeNumericType = \"1\";\n\nexport const olBigRomanNumberItemSelector: SelectorOlBigRomanNumberItemType = \"I. \";\nexport const olBigRomanNumberItemRegExp = /^[CDILMVX]+\\.\\s/u;\nexport const olBigRomanNumberType: OlTypeBigRomanNumberType = \"I\";\n\nexport const olSmallRomanNumberItemSelector: SelectorOlSmallRomanNumberItemType = \"i. \";\nexport const olSmallRomanNumberItemRegExp = /^[cdilmvx]+\\.\\s/u;\nexport const olSmallRomanNumberType: OlTypeSmallRomanNumberType = \"i\";\n\nexport const olBigAlphabetItemSelector: SelectorOlBigAlphabetItemType = \"A. \";\nexport const olBigAlphabetItemRegExp = /^[A-Z]+\\.\\s/u;\nexport const olBigAlphabetType: OlTypeBigAlphabetType = \"A\";\n\nexport const olSmallAlphabetItemSelector: SelectorOlSmallAlphabetItemType = \"a. \";\nexport const olSmallAlphabetItemRegExp = /^[a-z]+\\.\\s/u;\nexport const olSmallAlphabetType: OlTypeSmallAlphabetType = \"a\";\n\nexport const oLParseDataList: Array = [\n {\n olAttributeType: olNumericType,\n regExpSearchSelector: olNumericItemRegExp,\n selector: olNumericItemSelector,\n },\n {\n olAttributeType: olBigRomanNumberType,\n regExpSearchSelector: olBigRomanNumberItemRegExp,\n selector: olBigRomanNumberItemSelector,\n },\n {\n olAttributeType: olSmallRomanNumberType,\n regExpSearchSelector: olSmallRomanNumberItemRegExp,\n selector: olSmallRomanNumberItemSelector,\n },\n {\n olAttributeType: olBigAlphabetType,\n regExpSearchSelector: olBigAlphabetItemRegExp,\n selector: olBigAlphabetItemSelector,\n },\n {\n olAttributeType: olSmallAlphabetType,\n regExpSearchSelector: olSmallAlphabetItemRegExp,\n selector: olSmallAlphabetItemSelector,\n },\n];\n\nexport const selectorList: Array = [\n // ...selectorLineList,\n ...selectorHeaderList,\n ...selectorULItemList,\n ...selectorTableList,\n ...selectorCodeList,\n ...selectorBlockquoteList,\n].sort((itemA: SelectorType, itemB: SelectorType): number => {\n return itemB.length - itemA.length;\n});\n\nconst pairTagSelectorBold: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\*+/u,\n openTag: \"\",\n selector: \"**\",\n};\nconst pairTagSelectorUnderline: PairTagSelectorType = {\n closeTag: \"\",\n equal: /_+/u,\n openTag: \"\",\n selector: \"__\",\n};\nconst pairTagSelectorStrike: PairTagSelectorType = {\n closeTag: \"\",\n equal: /~+/u,\n openTag: \"\",\n selector: \"~~\",\n};\nconst pairTagSelectorItalic1: PairTagSelectorType = {\n closeTag: \"\",\n equal: /_+/u,\n openTag: \"\",\n selector: \"_\",\n};\nconst pairTagSelectorItalic2: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\*+/u,\n openTag: \"\",\n selector: \"*\",\n};\nconst pairTagSelectorSub: PairTagSelectorType = {\n closeTag: \"\",\n equal: /~+/u,\n openTag: \"\",\n selector: \"~\",\n};\nconst pairTagSelectorSup: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\^+/u,\n openTag: \"\",\n selector: \"^\",\n};\nconst pairTagSelectorInlineCode: PairTagSelectorType = {\n closeTag: \"\",\n equal: /`+/u,\n openTag: '',\n selector: \"`\",\n};\n\nconst pairTagSelectorBoldAndItalic: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\*+/u,\n openTag: \"\",\n selector: \"***\",\n};\n\n// More long selectors should be first\nexport const pairTagSelectorList: Array = [\n pairTagSelectorBoldAndItalic,\n pairTagSelectorBold,\n pairTagSelectorUnderline,\n pairTagSelectorItalic1,\n pairTagSelectorItalic2,\n pairTagSelectorStrike,\n pairTagSelectorSub,\n pairTagSelectorSup,\n pairTagSelectorInlineCode,\n];\n","import type {FootnoteTypeType} from \"../parser-type\";\n\nexport const footnoteTypeMap: {[key in FootnoteTypeType]: FootnoteTypeType} = {\n inline: \"inline\",\n \"super\": \"super\",\n};\n\n// Export const footnotePrefix = 'fn-';\n\n// eslint-disable-next-line optimize-regex/optimize-regex\nexport const findFootnoteMarkGlobalRegExp = /\\S\\[\\^[^\\]]+?\\]|\\S\\^\\[[^\\]]+?\\]/gu;\n","import type {FootnoteType} from \"../parser-type\";\n\nexport function getIsFootnoteDescription(lineContent: string): boolean {\n // eslint-disable-next-line optimize-regex/optimize-regex\n return /^\\[\\^[^\\]]+\\]:/u.test(lineContent);\n}\n\nexport function getFootnoteById(id: string, list: Array): FootnoteType | undefined {\n return list.find((footnote: FootnoteType): boolean => {\n return footnote.id === id;\n });\n}\n\nexport function getFootnoteInlineLineContent(match: string): string {\n return match.slice(3, -1).trim();\n}\n\n// See findFootnoteMarkGlobalRegExp\nexport function getFootnoteMarkId(match: string): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all, newline-per-chained-call\n return getFootnoteInlineLineContent(match).toLowerCase().replace(/\\W/gu, \" \").trim().replace(/\\s+/gu, \"-\");\n}\n\nexport function getMdFootnoteContent(footnote: FootnoteType): string {\n const {inlineLineContent, descriptionLineData} = footnote;\n\n if (descriptionLineData) {\n const {lineContent, additionalLineList} = descriptionLineData;\n const start = lineContent.indexOf(\"]:\") + 2;\n\n return `${lineContent.slice(start)}\\n${additionalLineList.join(\"\\n\")}`;\n }\n\n return inlineLineContent;\n}\n","import type {DocumentMetaType, LineDataType, FootnoteType} from \"../parser-type\";\n\nimport {findFootnoteMarkGlobalRegExp, footnoteTypeMap} from \"./footnote-const\";\nimport {getFootnoteById, getFootnoteInlineLineContent, getFootnoteMarkId} from \"./footnote-helper\";\n\nfunction matchToFootnote(match: string): FootnoteType {\n const id = getFootnoteMarkId(match);\n const inlineLineContent = getFootnoteInlineLineContent(match);\n\n if (match.indexOf(\"[^\") === 1) {\n return {\n descriptionLineData: null,\n id,\n inlineLineContent,\n type: footnoteTypeMap.super,\n };\n }\n\n return {\n descriptionLineData: null,\n id,\n inlineLineContent,\n type: footnoteTypeMap.inline,\n };\n}\n\nexport function getFootnoteList(lineContent: string): Array {\n const matchedList = lineContent.match(findFootnoteMarkGlobalRegExp);\n\n if (!matchedList) {\n return [];\n }\n\n return matchedList.map(matchToFootnote);\n}\n\nexport function fromToFootnoteList(fromList: Array, toList: Array): void {\n // eslint-disable-next-line no-loops/no-loops\n for (const fromItem of fromList) {\n const {id, descriptionLineData} = fromItem;\n const candidateToExtend = toList.find((toItem: FootnoteType): boolean => {\n return toItem.id === id;\n });\n\n if (candidateToExtend) {\n if (!candidateToExtend.descriptionLineData) {\n candidateToExtend.descriptionLineData = descriptionLineData;\n }\n } else {\n toList.push(fromItem);\n }\n }\n}\n\nexport function addLineData(lineData: LineDataType, toList: Array): void {\n const {lineContent} = lineData;\n // eslint-disable-next-line optimize-regex/optimize-regex\n const rawMatchId = /\\[\\^[^\\]]+?\\]:/u.exec(lineContent);\n\n if (!rawMatchId) {\n return;\n }\n\n const [rawId] = rawMatchId;\n\n const id = rawId.slice(2, -2).trim();\n\n const footnote = getFootnoteById(id, toList);\n\n if (footnote) {\n footnote.descriptionLineData = lineData;\n return;\n }\n\n toList.push({\n descriptionLineData: lineData,\n id,\n inlineLineContent: lineContent,\n type: footnoteTypeMap.super,\n });\n}\n\nexport function makeFootnoteSuper(fullLineContent: string, documentMeta: DocumentMetaType): string {\n return fullLineContent.replace(findFootnoteMarkGlobalRegExp, (match: string): string => {\n // eslint-disable-next-line unicorn/prefer-spread\n const charList: Array = match.split(\"\");\n const [firstLetter] = charList;\n const {footnoteList} = documentMeta;\n const id = getFootnoteMarkId(match);\n\n const footnote = getFootnoteById(id, footnoteList);\n\n if (!footnote) {\n return \"\";\n }\n\n return `${firstLetter}[${footnoteList.indexOf(footnote) + 1}]`;\n });\n}\n","import type {LineDataType} from \"../parser-type\";\nimport {\n oLParseDataList,\n selectorBlockquoteList,\n selectorCodeList,\n selectorHeaderList,\n selectorLineList,\n selectorTableList,\n selectorULItemList,\n} from \"../parser-selector\";\n\nexport function getIsHeader(lineData: LineDataType): boolean {\n return selectorHeaderList.includes(lineData.selector);\n}\n\nexport function getIsUlItem(lineData: LineDataType): boolean {\n return selectorULItemList.includes(lineData.selector);\n}\n\nexport function getIsOlItem(lineData: LineDataType): boolean {\n // eslint-disable-next-line no-loops/no-loops\n for (const oLParseData of oLParseDataList) {\n if (oLParseData.selector === lineData.selector) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getIsLine(lineData: LineDataType): boolean {\n return selectorLineList.includes(lineData.selector);\n}\n\nexport function getIsTable(lineData: LineDataType): boolean {\n return selectorTableList.includes(lineData.selector);\n}\n\nexport function getIsCode(lineData: LineDataType): boolean {\n return selectorCodeList.includes(lineData.selector);\n}\n\nexport function getIsBlockquote(lineData: LineDataType): boolean {\n return selectorBlockquoteList.includes(lineData.selector);\n}\n\nconst htmlPairTag = /<(\\w+)[^>]*>[\\S\\s]*?<\\/\\1>/u;\nconst htmlSingleTag = /<\\w+[^>]*?\\s*\\/>/u;\n\nexport function getIsStartWithHtml(lineData: LineDataType): boolean {\n const {trimmedLine} = lineData;\n\n return trimmedLine.search(htmlPairTag) === 0 || trimmedLine.search(htmlSingleTag) === 0;\n}\n","export function hasStringNonEmptySymbols(value: unknown): value is string {\n return typeof value === \"string\" && value.trim().length > 0;\n}\n\nexport function hasEmailSymbol(value: string): boolean {\n return value.includes(\"@\");\n}\n","export type PairNumberArrayType = [number, number];\n\nexport function harArrayOverflow(arrayA: PairNumberArrayType, arrayB: PairNumberArrayType): boolean {\n const [startA, endA] = arrayA;\n const [startB, endB] = arrayB;\n\n return !(endA < startB || endB < startA);\n}\n\nexport function harArrayListOverflow(\n pairNumberArray: PairNumberArrayType,\n arrayList: Array\n): boolean {\n // eslint-disable-next-line no-loops/no-loops\n for (const arrayInList of arrayList) {\n if (harArrayOverflow(pairNumberArray, arrayInList)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getMatchIndexList(html: string, regExp: RegExp): Array {\n const resultList: Array = [];\n\n const matchList = html.match(regExp);\n\n if (!matchList) {\n return [];\n }\n\n let currentIndex = 0;\n\n // eslint-disable-next-line no-loops/no-loops\n for (const matchedString of matchList) {\n const start = html.indexOf(matchedString, currentIndex);\n const end = start + matchedString.length - 1;\n\n currentIndex = end;\n\n resultList.push([start, end]);\n }\n\n return resultList;\n}\n\nconst tagSelectorRegExpGlobal = /(<\\w+[\\S\\s]*?>)|(<\\/\\w+?>)|(<\\w+[\\S\\s]*?\\/>)/gu;\n\nexport function getTagIndexList(html: string): Array {\n return getMatchIndexList(html, tagSelectorRegExpGlobal);\n}\n\nconst linkSelectorRegExpGlobal = /([\\S\\s]*?<\\/a>)|([\\S\\s]*?<\\/a>)|()/gu;\n\nexport function getLinkIndexList(html: string): Array {\n return getMatchIndexList(html, linkSelectorRegExpGlobal);\n}\n","import {mailPrefix} from \"../markdown-const\";\n\nimport {getLinkIndexList, getTagIndexList, harArrayListOverflow, type PairNumberArrayType} from \"./render-util\";\n\nconst linkTextRegExpGlobal = /(\\w+:\\/\\/[\\w.]+\\.\\w+[\\w+/]*)/giu;\nconst mailTextRegExpGlobal = /([\\w.-]+@[\\w.]+\\.\\w+[\\w+/]*)/giu;\n\nfunction linkReplacer(html: string, replacer: Readonly, hrefPrefix: string): string {\n const linkPairIndexList = getLinkIndexList(html);\n const tagIndexList = getTagIndexList(html);\n\n return html.replace(replacer, (match: string, brackets1: string, offset: number): string => {\n const rawLinkIndexArray: PairNumberArrayType = [offset, offset];\n\n if (harArrayListOverflow(rawLinkIndexArray, tagIndexList)) {\n return match;\n }\n\n if (harArrayListOverflow(rawLinkIndexArray, linkPairIndexList)) {\n return match;\n }\n\n return `${match}`;\n });\n}\n\nexport function makeLinkFromText(html: string): string {\n return linkReplacer(html, linkTextRegExpGlobal, \"\");\n}\n\nexport function makeMailFromText(html: string): string {\n return linkReplacer(html, mailTextRegExpGlobal, mailPrefix);\n}\n","import type {PairTagSelectorType} from \"../parser/parser-type\";\nimport {pairTagSelectorList} from \"../parser/parser-selector\";\n\nimport {getTagIndexList, harArrayOverflow} from \"./render-util\";\n\n// eslint-disable-next-line complexity, max-statements\nexport function getSelectorIndexList(html: string, pairTagSelector: PairTagSelectorType): Array {\n const {selector, equal} = pairTagSelector;\n\n const resultList: Array = [];\n const selectorLength = selector.length;\n\n if (selectorLength === 0) {\n // Console.error('Selector is empty string');\n return resultList;\n }\n\n let indexOfSelector: number = html.indexOf(selector, 0);\n\n // eslint-disable-next-line no-loops/no-loops\n while (indexOfSelector !== -1) {\n const equalSymbolsMatch: Array | null = html.slice(indexOfSelector).match(equal);\n\n if (!equalSymbolsMatch) {\n return [];\n }\n\n const [equalSymbolLine] = equalSymbolsMatch;\n const equalSymbolLineLength = equalSymbolLine.length;\n\n if (equalSymbolLineLength === selectorLength) {\n resultList.push(indexOfSelector);\n }\n\n indexOfSelector = html.indexOf(selector, indexOfSelector + equalSymbolLineLength);\n }\n\n if (resultList.length % 2 === 1) {\n return resultList.slice(0, -1);\n }\n\n return resultList;\n}\n\nfunction addPairTag(html: string, pairTagSelector: PairTagSelectorType): string {\n const {selector, openTag, closeTag} = pairTagSelector;\n const selectorLength = selector.length;\n\n if (!html.includes(selector)) {\n return html;\n }\n\n const tagPairIndexList = getTagIndexList(html);\n\n let selectorIndexList: Array = getSelectorIndexList(html, pairTagSelector);\n\n // Remove indexes into tags, f.e. - text\n selectorIndexList = selectorIndexList.filter((selectorIndex: number): boolean => {\n // eslint-disable-next-line no-loops/no-loops\n for (const tagPairIndex of tagPairIndexList) {\n const selectorStart = selectorIndex;\n const selectorEnd = selectorIndex + selectorLength - 1;\n\n if (harArrayOverflow(tagPairIndex, [selectorStart, selectorEnd])) {\n return false;\n }\n }\n\n return true;\n });\n\n const selectorIndexListLength = selectorIndexList.length;\n\n if (selectorIndexListLength === 0) {\n return html;\n }\n\n let resultTagPairedList: string = html.slice(0, selectorIndexList[0]);\n\n // eslint-disable-next-line no-loops/no-loops\n for (let selectorIndexInList = 1; selectorIndexInList <= selectorIndexListLength; selectorIndexInList += 1) {\n const selectorIndex = selectorIndexList[selectorIndexInList];\n const htmlPart = html.slice(selectorIndexList[selectorIndexInList - 1] + selectorLength, selectorIndex);\n\n resultTagPairedList += selectorIndexInList % 2 === 1 ? openTag + htmlPart + closeTag : htmlPart;\n }\n\n return resultTagPairedList;\n}\n\nexport function makePairTag(html: string): string {\n let result = html;\n\n // eslint-disable-next-line no-loops/no-loops\n for (const pairTagSelector of pairTagSelectorList) {\n result = addPairTag(result, pairTagSelector);\n }\n\n return result;\n}\n","import type {DocumentMetaType, LineDataType, OlAttributeType, SelectorType} from \"../parser/parser-type\";\nimport {olNumericType, oLParseDataList} from \"../parser/parser-selector\";\nimport {hasEmailSymbol, hasStringNonEmptySymbols} from \"../parser/util/is\";\nimport {makeFootnoteSuper} from \"../parser/footnote/footnote\";\nimport {mailPrefix} from \"../markdown-const\";\n\nimport {breakLineTag, emptyString, space} from \"./render-const\";\nimport {makeLinkFromText, makeMailFromText} from \"./render-link\";\nimport {makePairTag} from \"./render-pair-tag\";\n\nexport const breakLineRegExp = /\\s*?\\\\$/u;\n\nexport function addBreakLine(line: string): string {\n return line.replace(breakLineRegExp, \"
\");\n}\n\nexport function removeEndBreakLine(line: string): string {\n return line.replace(breakLineRegExp, emptyString);\n}\n\nexport function getHasEndBreakLine(lineContent: string, useLineBreak: boolean): boolean {\n return useLineBreak || breakLineRegExp.test(lineContent);\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction imageReplacer(matchedString: string, alt: unknown, src: string, title: unknown): string {\n const titleAndOtherAttrValue = hasStringNonEmptySymbols(title) ? ` title=\"${title}\"` : \"\";\n const altAttrValue = hasStringNonEmptySymbols(alt) ? ` alt=\"${alt}\"` : \"\";\n\n return ``;\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction imageReplacerVariable(\n matchedString: string,\n alt: unknown,\n srcVariable: string,\n documentMeta: DocumentMetaType\n): string {\n const altAttrValue = hasStringNonEmptySymbols(alt) ? ` alt=\"${alt}\"` : \"\";\n const {variable} = documentMeta;\n\n if (srcVariable in variable) {\n return ``;\n }\n\n return ``;\n}\n\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findImageRegExpGlobal = /!\\[([\\S\\s]*?)\\]\\((\\S+?)(?:\\s+\"([\\S\\s]+?)\")?\\)/gu;\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findImageVariableRegExpGlobal = /!\\[([\\S\\s]*?)\\]\\[([\\S\\s]+?)\\]/gu;\n\nexport function makeImage(html: string, documentMeta: DocumentMetaType): string {\n return (\n html\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n .replace(findImageRegExpGlobal, imageReplacer)\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n .replace(\n findImageVariableRegExpGlobal,\n (matchedString: string, alt: unknown, srcVariable: string): string => {\n return imageReplacerVariable(matchedString, alt, srcVariable, documentMeta);\n }\n )\n );\n}\n\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findCheckboxCheckedRegExoGlobal = /\\[x\\]/giu;\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findCheckboxUncheckedRegExoGlobal = /\\[\\s\\]/gu;\n\nexport function makeCheckbox(html: string): string {\n return (\n html\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n .replace(findCheckboxCheckedRegExoGlobal, '')\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n .replace(findCheckboxUncheckedRegExoGlobal, '')\n );\n}\n\nexport function isImageListOnly(lineContent: string): boolean {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return lineContent.replace(findImageRegExpGlobal, \"\").trim() === emptyString;\n}\n\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findMailRegExpGlobal = /\\[([\\S\\s]*?)\\]\\((\\S+?)(?:\\s+\"([\\S\\s]+?)\")?(?:\\s+\"([\\S\\s]+?)\")?\\)/gu;\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findLinkRegExpGlobal = /\\[([\\S\\s]*?)\\]\\((\\S+?)(?:\\s+\"([\\S\\s]+?)\")?\\)/gu;\n// eslint-disable-next-line optimize-regex/optimize-regex\nconst findLinkVariableRegExpGlobal = /\\[([\\S\\s]*?)\\]\\[([\\S\\s]+?)\\]/gu;\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction mailReplacer(matchedString: string, linkText: string, href: string, title: unknown, subject: unknown): string {\n const titleAttrValue = hasStringNonEmptySymbols(title) ? ` title=\"${title}\"` : \"\";\n const subjectValue = hasStringNonEmptySymbols(subject) ? `?subject=${subject}` : \"\";\n const text = linkText.length > 0 ? linkText : href;\n\n if (hasEmailSymbol(matchedString)) {\n return `${text}`;\n }\n\n // Leave it for link\n return matchedString;\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction linkReplacer(matchedString: string, linkText: string, href: string, title: unknown): string {\n const titleAttrValue = hasStringNonEmptySymbols(title) ? ` title=\"${title}\"` : \"\";\n const text = linkText.length > 0 ? linkText : href;\n\n return `${text}`;\n}\n\nfunction getMailToPrefix(href: string): string {\n return hasEmailSymbol(href) ? mailPrefix : \"\";\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction linkReplacerVariable(\n matchedString: string,\n linkText: string,\n hrefVariable: string,\n documentMeta: DocumentMetaType\n): string {\n const {variable} = documentMeta;\n\n if (hrefVariable in variable) {\n const href = variable[hrefVariable].value;\n const textVariable = linkText.length > 0 ? linkText : href;\n\n return `${textVariable}`;\n }\n\n const text = linkText.length > 0 ? linkText : hrefVariable;\n\n return `${text}`;\n}\n\nfunction defineVariables(html: string, documentMeta: DocumentMetaType): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return html.replace(\n findLinkVariableRegExpGlobal,\n (matchedString: string, linkText: string, hrefVariable: string): string => {\n return linkReplacerVariable(matchedString, linkText, hrefVariable, documentMeta);\n }\n );\n}\n\nexport function makeMail(html: string): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return html.replace(findMailRegExpGlobal, mailReplacer);\n}\n\nexport function makeLink(html: string): string {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return html.replace(findLinkRegExpGlobal, linkReplacer);\n}\n\nexport function getOlTypeBySelector(dataLineSelector: SelectorType): OlAttributeType {\n // eslint-disable-next-line no-loops/no-loops\n for (const oLParseData of oLParseDataList) {\n const {selector, olAttributeType} = oLParseData;\n\n if (dataLineSelector === selector) {\n return olAttributeType;\n }\n }\n\n // Console.error('Can not detect ol type by selector', dataLineSelector);\n\n return olNumericType;\n}\n\nexport function getOlStart(trimmedLine: string): string {\n const dotIndex = trimmedLine.indexOf(\".\");\n\n return trimmedLine.slice(0, dotIndex);\n}\n\n// eslint-disable-next-line complexity, max-statements\nexport function renderAdditionalLineList(lineData: LineDataType): string {\n const {additionalLineList, config} = lineData;\n const {lineContent} = lineData;\n const {useLineBreak} = config;\n\n if (additionalLineList.length === 0) {\n return emptyString;\n }\n\n const hasParentEndBreakLine = getHasEndBreakLine(lineContent, useLineBreak);\n const prefix = hasParentEndBreakLine ? breakLineTag : space;\n const additionalLineListLength = additionalLineList.length;\n const additionalLineLastIndex = additionalLineListLength - 1;\n const lineResult: Array = Array.from({length: additionalLineListLength}).fill(\"\");\n\n // eslint-disable-next-line no-loops/no-loops\n for (let lineIndex = 0; lineIndex < additionalLineListLength; lineIndex += 1) {\n const additionalLine = additionalLineList[lineIndex];\n const hasBreakLine = getHasEndBreakLine(additionalLine, useLineBreak);\n\n if (hasBreakLine) {\n const additionalLineWithoutBreakLine = additionalLine.replace(breakLineRegExp, emptyString);\n\n lineResult[lineIndex] =\n lineIndex === additionalLineLastIndex\n ? additionalLineWithoutBreakLine\n : additionalLineWithoutBreakLine + breakLineTag;\n } else {\n // eslint-disable-next-line no-lonely-if\n lineResult[lineIndex] = lineIndex === additionalLineLastIndex ? additionalLine : additionalLine + space;\n }\n }\n\n return prefix + lineResult.join(emptyString);\n}\n\nexport function renderInlineHtml(html: string, documentMeta: DocumentMetaType): string {\n const {config} = documentMeta;\n const {parseLink} = config;\n\n let fullLineContent = makeFootnoteSuper(html, documentMeta);\n\n fullLineContent = makeImage(fullLineContent, documentMeta);\n\n fullLineContent = makeMail(fullLineContent);\n if (parseLink) {\n fullLineContent = makeMailFromText(fullLineContent);\n }\n\n fullLineContent = makeLink(fullLineContent);\n if (parseLink) {\n fullLineContent = makeLinkFromText(fullLineContent);\n }\n\n fullLineContent = defineVariables(fullLineContent, documentMeta);\n\n fullLineContent = makeCheckbox(fullLineContent);\n return makePairTag(fullLineContent);\n}\n","import type {CellAlignType, CellTagNameType} from \"./render-table-type\";\n\nexport const cellAlignTypeMap: Record = {\n center: \"center\",\n \"default\": \"left\",\n left: \"left\",\n right: \"right\",\n};\n\nexport const cellTagNameTypeMap: Record = {\n tdCell: \"td\",\n thCell: \"th\",\n};\n","import type {DocumentMetaType, SelectorType} from \"../../parser/parser-type\";\nimport {filterEmptyString} from \"../../parser/util/string\";\nimport {emptyString} from \"../render-const\";\nimport {renderInlineHtml} from \"../render-helper\";\n\nimport {cellAlignTypeMap} from \"./render-table-const\";\nimport type {CellAlignType} from \"./render-table-type\";\n\nexport function renderTableCellContent(line: string, documentMeta: DocumentMetaType): string {\n return renderInlineHtml(line, documentMeta).trim();\n}\n\nexport function isTableDivideLine(line: string): boolean {\n // eslint-disable-next-line unicorn/prefer-string-replace-all\n return line.replace(/[\\s:|-]/gu, \"\") === emptyString;\n}\n\nexport function lineToAlign(divideRaw: string): CellAlignType {\n const alignMark = \":\";\n const divide: string = divideRaw.trim();\n // eslint-disable-next-line unicorn/prefer-spread\n const divideCharList: Array = divide.split(\"\");\n const [firstChar] = divideCharList;\n // eslint-disable-next-line unicorn/prefer-at\n const lastChar = divide[divide.length - 1];\n\n if (firstChar === lastChar && firstChar === alignMark) {\n return cellAlignTypeMap.center;\n }\n\n if (lastChar === alignMark) {\n return cellAlignTypeMap.right;\n }\n\n return cellAlignTypeMap.left;\n}\n\nexport function getAlignList(selector: SelectorType, divideLine: string): Array {\n return divideLine.split(selector).filter(filterEmptyString).map(lineToAlign);\n}\n","import type {DocumentMetaType, LineDataType} from \"../../parser/parser-type\";\nimport {filterEmptyString} from \"../../parser/util/string\";\nimport {emptyString} from \"../render-const\";\n\nimport {getAlignList, isTableDivideLine, renderTableCellContent} from \"./render-table-helper\";\nimport {cellAlignTypeMap, cellTagNameTypeMap} from \"./render-table-const\";\nimport type {CellAlignType, CellTagNameType} from \"./render-table-type\";\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction renderTableRow(\n lineData: LineDataType,\n line: string,\n alignList: Array,\n cellName: CellTagNameType,\n documentMeta: DocumentMetaType\n): string {\n const {selector} = lineData;\n\n return line\n .split(selector)\n .filter(filterEmptyString)\n .map((cellContent: string, cellIndex: number): string => {\n const align = alignList[cellIndex] || cellAlignTypeMap.default;\n\n return `<${cellName} align=\"${align}\">${renderTableCellContent(cellContent, documentMeta)}`;\n })\n .join(emptyString);\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction renderTableRowList(\n lineData: LineDataType,\n lineList: Array,\n alignList: Array,\n cellName: CellTagNameType,\n documentMeta: DocumentMetaType\n): string {\n return lineList\n .map((line: string): string => {\n return `${renderTableRow(lineData, line, alignList, cellName, documentMeta)}`;\n })\n .join(emptyString);\n}\n\nexport function renderTable(lineData: LineDataType, documentMeta: DocumentMetaType): string {\n const {selector, additionalLineList, line} = lineData;\n\n const lineList = [line, ...additionalLineList];\n\n const dividerLine = lineList.find(isTableDivideLine);\n\n // eslint-disable-next-line no-undefined\n if (dividerLine === undefined) {\n const bodyOnlyContent = renderTableRowList(lineData, lineList, [], cellTagNameTypeMap.tdCell, documentMeta);\n\n return `${bodyOnlyContent}
`;\n }\n\n const dividerLineIndex = lineList.indexOf(dividerLine);\n const headLineList = lineList.slice(0, dividerLineIndex);\n const bodyLineList = lineList.slice(dividerLineIndex + 1);\n const alignList = getAlignList(selector, dividerLine);\n\n const headContent = renderTableRowList(lineData, headLineList, alignList, cellTagNameTypeMap.thCell, documentMeta);\n const bodyContent = renderTableRowList(lineData, bodyLineList, alignList, cellTagNameTypeMap.tdCell, documentMeta);\n\n return `${headContent}${bodyContent}
`;\n}\n","import {\n getIsBlockquote,\n getIsCode,\n getIsHeader,\n getIsLine,\n getIsOlItem,\n getIsStartWithHtml,\n getIsTable,\n getIsUlItem,\n} from \"../parser/util/is-tag\";\nimport type {DocumentMetaType, LineDataType} from \"../parser/parser-type\";\n\nimport {getIsEdgeLine} from \"../parser/util/navigation\";\nimport {getIsFootnoteDescription} from \"../parser/footnote/footnote-helper\";\n// Import {makeFootnoteSuper} from '../parser/footnote/footnote';\n\nimport {\n addBreakLine,\n getOlStart,\n getOlTypeBySelector,\n isImageListOnly,\n removeEndBreakLine,\n renderAdditionalLineList,\n renderInlineHtml,\n} from \"./render-helper\";\nimport {emptyString} from \"./render-const\";\nimport {renderTable} from \"./render-table/render-table\";\n\nexport function renderChildList(lineDataList: Array, documentMeta: DocumentMetaType): string {\n return lineDataList\n .map((lineData: LineDataType, lineDataIndex: number): string => {\n // eslint-disable-next-line no-use-before-define, @typescript-eslint/no-use-before-define\n return renderLineData(lineData, lineDataIndex, lineDataList, documentMeta);\n })\n .map(addBreakLine)\n .join(emptyString);\n}\n\n// eslint-disable-next-line complexity, sonarjs/cognitive-complexity, max-statements, @typescript-eslint/max-params\nexport function renderLineData(\n lineData: LineDataType,\n lineDataIndex: number,\n lineDataList: Array,\n documentMeta: DocumentMetaType\n): string {\n const {selector, childList, lineContent, trimmedLine, additionalLineList, config} = lineData;\n const {codeHighlight} = config;\n const additionLineListRender = renderAdditionalLineList(lineData);\n const childListRender = renderChildList(childList, documentMeta);\n\n let fullLineContent = removeEndBreakLine(lineContent) + additionLineListRender;\n\n fullLineContent = renderInlineHtml(fullLineContent, documentMeta);\n\n fullLineContent += childListRender;\n\n if (getIsFootnoteDescription(lineContent)) {\n return \"\";\n }\n\n if (getIsLine(lineData)) {\n return \"
\";\n }\n\n if (getIsTable(lineData)) {\n return renderTable(lineData, documentMeta);\n }\n\n if (getIsCode(lineData)) {\n const codeText = codeHighlight(lineContent, additionalLineList.join(\"\\n\"));\n\n return lineContent ? `${codeText}` : `${codeText}`;\n }\n\n if (lineContent === emptyString && childList.length === 0) {\n return emptyString;\n }\n\n if (getIsHeader(lineData)) {\n const headerTag = selector.length - 1;\n\n return `${fullLineContent}`;\n }\n\n if (getIsBlockquote(lineData)) {\n return `
${fullLineContent}
`;\n }\n\n if (getIsUlItem(lineData)) {\n const isFirstItem = getIsEdgeLine(lineData, lineDataList, -1);\n const isLastItem = getIsEdgeLine(lineData, lineDataList, 1);\n const prefix = isFirstItem ? \"
    \" : \"\";\n const postfix = isLastItem ? \"
\" : \"\";\n\n return `${prefix}
  • ${fullLineContent}
  • ${postfix}`;\n }\n\n if (getIsOlItem(lineData)) {\n const isFirstItem = getIsEdgeLine(lineData, lineDataList, -1);\n const isLastItem = getIsEdgeLine(lineData, lineDataList, 1);\n const {selector: lineDataSelector} = lineData;\n const prefix = isFirstItem\n ? `
      `\n : \"\";\n const postfix = isLastItem ? \"
    \" : \"\";\n\n return `${prefix}
  • ${fullLineContent}
  • ${postfix}`;\n }\n\n if (lineContent === emptyString || getIsStartWithHtml(lineData) || isImageListOnly(lineContent)) {\n return fullLineContent;\n }\n\n return `

    ${fullLineContent}

    `;\n}\n","import type {MarkdownConfigShallowType, MarkdownConfigType} from \"../library\";\n\nimport {parseLine} from \"./parser/parse-line\";\nimport type {DocumentMetaType, FootnoteType, LineDataType} from \"./parser/parser-type\";\nimport {emptyString} from \"./render/render-const\";\nimport {renderChildList} from \"./render/render\";\nimport {defaultMarkdownConfig} from \"./markdown-const\";\nimport {getMdFootnoteContent} from \"./parser/footnote/footnote-helper\";\nimport {getFullWrapperClassName} from \"./helper\";\n\nexport function markdown(mdInput: string, config: MarkdownConfigShallowType = defaultMarkdownConfig): string {\n const markdownConfig: MarkdownConfigType = {\n ...defaultMarkdownConfig,\n ...config,\n };\n\n const {useWrapper} = markdownConfig;\n\n const markdownFootnoteConfig: MarkdownConfigType = {\n ...defaultMarkdownConfig,\n ...config,\n useWrapper: false,\n };\n\n const mainParent: LineDataType = {\n additionalLineList: [],\n childList: [],\n config: markdownConfig,\n line: emptyString,\n lineContent: \"\",\n lineIndex: -1,\n selector: emptyString,\n spaceCount: -1,\n trimmedLine: \"\",\n };\n const structuredLineDataList: Array = [mainParent];\n const savedLineDataList: Array = [mainParent];\n const documentMeta: DocumentMetaType = {\n codeLineData: null,\n config: markdownConfig,\n footnoteList: [],\n tableLineData: null,\n variable: {},\n };\n\n mdInput.split(\"\\n\").forEach((line: string, lineIndex: number, allLineList: ReadonlyArray) => {\n parseLine(line, lineIndex, allLineList, structuredLineDataList, savedLineDataList, documentMeta);\n });\n\n const mainContent = renderChildList(structuredLineDataList, documentMeta);\n\n const footnoteDescriptionList: Array = documentMeta.footnoteList.map((footnote: FootnoteType): string => {\n const {id} = footnote;\n const mdFootnoteContent = getMdFootnoteContent(footnote);\n\n return `
  • ${markdown(mdFootnoteContent, markdownFootnoteConfig)}
  • `;\n });\n\n const footnoteDescriptionHtml: string =\n footnoteDescriptionList.length === 0\n ? \"\"\n : [\"
    \", '
      ', ...footnoteDescriptionList, \"
    \"].join(\"\");\n\n const fullContent = [mainContent, footnoteDescriptionHtml].join(\"\");\n\n if (!useWrapper) {\n return fullContent;\n }\n\n const fullWrapperClassName: string = getFullWrapperClassName(markdownConfig);\n\n return `
    ${fullContent}
    `;\n}\n","import {emptyString} from \"../render/render-const\";\n\nimport {cleanLine, getIsAllSymbolsEqual} from \"./util/string\";\nimport {getParent} from \"./util/navigation\";\nimport type {DocumentMetaType, LineDataType, ShortLineInfoType} from \"./parser-type\";\nimport {oLParseDataList, selectorCodeList, selectorLineList, selectorList, selectorTableList} from \"./parser-selector\";\nimport {addLineData, fromToFootnoteList, getFootnoteList} from \"./footnote/footnote\";\nimport {getIsFootnoteDescription} from \"./footnote/footnote-helper\";\nimport {getVariableData} from \"./util/variable\";\n\n// eslint-disable-next-line complexity\nfunction getShortInfo(trimmedLine: string): ShortLineInfoType {\n // eslint-disable-next-line no-loops/no-loops\n for (const selector of selectorList) {\n if (trimmedLine.startsWith(selector)) {\n return {\n lineContent: cleanLine(trimmedLine.replace(selector, emptyString)),\n selector,\n };\n }\n }\n\n // eslint-disable-next-line no-loops/no-loops\n for (const lineSelector of selectorLineList) {\n if (trimmedLine.startsWith(lineSelector) && getIsAllSymbolsEqual(trimmedLine)) {\n return {\n lineContent: emptyString,\n selector: lineSelector,\n };\n }\n }\n\n // eslint-disable-next-line no-loops/no-loops\n for (const oLParseData of oLParseDataList) {\n const {selector, regExpSearchSelector} = oLParseData;\n\n if (trimmedLine.search(regExpSearchSelector) === 0) {\n return {\n lineContent: cleanLine(trimmedLine.replace(regExpSearchSelector, emptyString)),\n selector,\n };\n }\n }\n\n return {\n lineContent: cleanLine(trimmedLine),\n selector: emptyString,\n };\n}\n\n// eslint-disable-next-line complexity, max-params, max-statements, sonarjs/cognitive-complexity, @typescript-eslint/max-params\nexport function parseLine(\n line: string,\n lineIndex: number,\n allLineList: ReadonlyArray,\n structuredLineDataList: ReadonlyArray,\n savedLineDataList: Array,\n documentMeta: DocumentMetaType\n): boolean {\n const trimmedLine = line.trim();\n const isEmptyString = trimmedLine === emptyString;\n const rawSpaceCount = isEmptyString\n ? // eslint-disable-next-line unicorn/prefer-at\n savedLineDataList[savedLineDataList.length - 1].spaceCount\n : line.search(/\\S/u);\n const spaceCount = Math.max(0, rawSpaceCount);\n const defaultSelectorData: ShortLineInfoType = {\n lineContent: emptyString,\n selector: emptyString,\n };\n\n const {selector, lineContent} = isEmptyString ? defaultSelectorData : getShortInfo(trimmedLine);\n\n const lineData: LineDataType = {\n additionalLineList: [],\n childList: [],\n config: documentMeta.config,\n line: isEmptyString ? emptyString : line,\n lineContent,\n lineIndex,\n selector,\n spaceCount,\n trimmedLine,\n };\n\n if (selectorCodeList.includes(selector)) {\n if (documentMeta.codeLineData && lineContent === emptyString) {\n // eslint-disable-next-line no-param-reassign\n documentMeta.codeLineData = null;\n return true;\n }\n // eslint-disable-next-line no-param-reassign\n documentMeta.codeLineData = lineData;\n }\n\n const {codeLineData} = documentMeta;\n\n if (codeLineData && codeLineData !== lineData) {\n codeLineData.additionalLineList.push(lineData.line);\n return true;\n }\n\n const updatedFootnoteList = getFootnoteList(lineContent);\n const {footnoteList, tableLineData, variable} = documentMeta;\n\n fromToFootnoteList(updatedFootnoteList, footnoteList);\n\n if (selectorTableList.includes(selector)) {\n if (tableLineData) {\n // Append new line in current block\n // eslint-disable-next-line no-param-reassign\n tableLineData.additionalLineList.push(lineData.line);\n return true;\n }\n // Create new block\n // eslint-disable-next-line no-param-reassign\n documentMeta.tableLineData = lineData;\n } else {\n // Close table block\n // eslint-disable-next-line no-param-reassign\n documentMeta.tableLineData = null;\n }\n\n const variableData = getVariableData(lineContent);\n\n if (lineData.selector === emptyString && lineContent.length > 0) {\n const prevItemIndex = savedLineDataList.length - 1;\n const prevItem = savedLineDataList.at(prevItemIndex);\n const isTable = Boolean(prevItem && selectorTableList.includes(prevItem.selector));\n\n if (variableData) {\n // eslint-disable-next-line no-param-reassign\n variable[variableData.key] = variableData;\n }\n\n if (prevItem && prevItem.lineContent.length > 0 && !isTable && !variableData) {\n prevItem.additionalLineList.push(lineContent);\n return true;\n }\n }\n\n const parentLineData = getParent(lineData, savedLineDataList);\n\n if (!parentLineData) {\n // Console.error('Parent not found');\n return false;\n }\n\n if (variableData) {\n return true;\n }\n\n parentLineData.childList.push(lineData);\n savedLineDataList.push(lineData);\n\n if (getIsFootnoteDescription(lineContent)) {\n addLineData(lineData, footnoteList);\n }\n\n return true;\n}\n","import type {VariableType} from \"../parser-type\";\n\nexport function getVariableData(lineContent: string): VariableType | null {\n // eslint-disable-next-line optimize-regex/optimize-regex\n const matchData = /\\[([^^][\\S\\s]+?)\\]:\\s+?\\S/u.exec(lineContent);\n\n if (!matchData) {\n return null;\n }\n\n // eslint-disable-next-line prefer-destructuring, @typescript-eslint/prefer-destructuring\n const key = matchData[1];\n\n const value = lineContent.slice(lineContent.indexOf(\"]:\") + 3).trim();\n\n return {\n key,\n value,\n };\n}\n","import type {MarkdownConfigType} from \"../library\";\n\nimport {themeClassNameMap, defaultMarkdownConfig} from \"./markdown-const\";\n\nexport function getFullWrapperClassName(markdownConfig: MarkdownConfigType): string {\n const {wrapperClassName: wrapperClassNameConfig, themeName} = markdownConfig;\n const {wrapperClassName: wrapperClassNameDefault} = defaultMarkdownConfig;\n\n const wrapperClassName: string =\n wrapperClassNameConfig === wrapperClassNameDefault\n ? wrapperClassNameDefault\n : `${wrapperClassNameDefault} ${wrapperClassNameConfig}`;\n\n const themeClassName: string = themeClassNameMap[themeName];\n\n return `${wrapperClassName} ${themeClassName}`;\n}\n","import \"./src/markdown.scss\";\n\nimport {defaultMarkdownConfig, type ThemeNameEnum} from \"./src/markdown-const\";\n\n// eslint-disable-next-line import/no-default-export\nexport {markdown, markdown as default} from \"./src/markdown\";\nexport {defaultMarkdownConfig, ThemeNameEnum} from \"./src/markdown-const\";\n\n// eslint-disable-next-line unicorn/no-keyword-prefix\nexport const classNameMdProThemeDark = \"md-pro-theme-dark\";\n// eslint-disable-next-line unicorn/no-keyword-prefix\nexport const classNameMdProThemeLight = \"md-pro-theme-light\";\n// eslint-disable-next-line unicorn/no-keyword-prefix\nexport const classNameMdPro: string = defaultMarkdownConfig.wrapperClassName;\n\nexport type MarkdownConfigType = Readonly<{\n // Code highlight\n codeHighlight: (langName: string, code: string) => string;\n // https://exmaple.com -> https://exmaple.com\n parseLink: boolean;\n // The themeName: light | dark | auto (auto - will use current system theme i.e. light or dark), needed class will be added to the wrapper div\n themeName: ThemeNameEnum;\n // Make \\n =>
    \n useLineBreak: boolean;\n // Use wrapper
    ...
    \n useWrapper: boolean;\n // Additional css class for wrapper\n wrapperClassName: string;\n}>;\n\nexport type MarkdownConfigShallowType = Readonly>;\n"],"names":["ThemeNameEnum","__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","defaultMarkdownConfig","codeHighlight","langName","code","parseLink","themeName","auto","useLineBreak","useWrapper","wrapperClassName","themeClassNameMap","dark","light","mailPrefix","emptyString","space","breakLineTag","filterEmptyString","line","trim","cleanLine","replace","getIsAllSymbolsEqual","charList","split","firstSymbol","char","searchSiblingItem","lineData","lineDataList","direction","index","indexOf","siblingIndex","siblingItem","trimmedLine","getIsEdgeLine","selector","foundItem","selectorHeaderList","selectorBlockquoteList","selectorLineList","selectorTableList","selectorCodeList","selectorULItemList","olNumericType","oLParseDataList","olAttributeType","regExpSearchSelector","selectorList","sort","itemA","itemB","length","pairTagSelectorList","closeTag","equal","openTag","footnoteTypeMap","inline","findFootnoteMarkGlobalRegExp","getIsFootnoteDescription","lineContent","test","getFootnoteById","id","list","find","footnote","getFootnoteInlineLineContent","match","slice","getFootnoteMarkId","toLowerCase","matchToFootnote","inlineLineContent","descriptionLineData","type","super","htmlPairTag","htmlSingleTag","hasStringNonEmptySymbols","hasEmailSymbol","includes","harArrayOverflow","arrayA","arrayB","startA","endA","startB","endB","harArrayListOverflow","pairNumberArray","arrayList","arrayInList","getMatchIndexList","html","regExp","resultList","matchList","currentIndex","matchedString","start","end","push","tagSelectorRegExpGlobal","getTagIndexList","linkSelectorRegExpGlobal","linkTextRegExpGlobal","mailTextRegExpGlobal","linkReplacer","replacer","hrefPrefix","linkPairIndexList","getLinkIndexList","tagIndexList","brackets1","offset","rawLinkIndexArray","addPairTag","pairTagSelector","selectorLength","tagPairIndexList","selectorIndexList","indexOfSelector","equalSymbolsMatch","equalSymbolLine","equalSymbolLineLength","getSelectorIndexList","filter","selectorIndex","tagPairIndex","selectorIndexListLength","resultTagPairedList","selectorIndexInList","htmlPart","breakLineRegExp","addBreakLine","getHasEndBreakLine","imageReplacer","alt","src","title","titleAndOtherAttrValue","findImageRegExpGlobal","findImageVariableRegExpGlobal","findCheckboxCheckedRegExoGlobal","findCheckboxUncheckedRegExoGlobal","findMailRegExpGlobal","findLinkRegExpGlobal","findLinkVariableRegExpGlobal","mailReplacer","linkText","href","subject","titleAttrValue","subjectValue","text","getMailToPrefix","renderInlineHtml","documentMeta","config","fullLineContent","firstLetter","footnoteList","makeFootnoteSuper","srcVariable","altAttrValue","variable","imageReplacerVariable","makeImage","makeMail","makeMailFromText","makeLink","makeLinkFromText","hrefVariable","textVariable","linkReplacerVariable","defineVariables","makeCheckbox","result","makePairTag","cellAlignTypeMap","center","left","right","cellTagNameTypeMap","tdCell","thCell","isTableDivideLine","lineToAlign","divideRaw","divide","divideCharList","firstChar","lastChar","renderTableRowList","lineList","alignList","cellName","map","cellContent","cellIndex","align","default","renderTableCellContent","join","renderTableRow","renderChildList","lineDataIndex","childList","additionalLineList","additionLineListRender","prefix","additionalLineListLength","additionalLineLastIndex","lineResult","Array","from","fill","lineIndex","additionalLine","additionalLineWithoutBreakLine","renderAdditionalLineList","childListRender","getIsLine","getIsTable","dividerLine","undefined","dividerLineIndex","headLineList","bodyLineList","divideLine","getAlignList","renderTable","getIsCode","codeText","getIsHeader","headerTag","getIsBlockquote","getIsUlItem","oLParseData","getIsOlItem","isFirstItem","isLastItem","lineDataSelector","dataLineSelector","getOlTypeBySelector","dotIndex","getOlStart","search","getIsStartWithHtml","isImageListOnly","renderLineData","markdown","mdInput","markdownConfig","markdownFootnoteConfig","mainParent","spaceCount","structuredLineDataList","savedLineDataList","codeLineData","tableLineData","forEach","allLineList","isEmptyString","rawSpaceCount","Math","max","defaultSelectorData","startsWith","lineSelector","getShortInfo","updatedFootnoteList","matchedList","getFootnoteList","fromList","toList","fromItem","candidateToExtend","toItem","fromToFootnoteList","variableData","matchData","exec","getVariableData","prevItemIndex","prevItem","at","isTable","Boolean","parentLineData","lineDataCandidate","getParent","rawMatchId","rawId","addLineData","parseLine","mainContent","footnoteDescriptionList","mdFootnoteContent","getMdFootnoteContent","fullContent","fullWrapperClassName","wrapperClassNameConfig","wrapperClassNameDefault","getFullWrapperClassName","classNameMdProThemeDark","classNameMdProThemeLight","classNameMdPro"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"index.js","mappings":"mBACA,ICCYA,EDDRC,EAAsB,CEA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFV,EAAyBC,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,yLHH9D,SAAYjB,GACRA,EAAA,YACAA,EAAA,YACAA,EAAA,aACH,CAJD,CAAYA,IAAAA,EAAa,KAMlB,MAAMkB,EAA4C,CACrDC,cAAeA,CAACC,EAAkBC,IACvBA,EAEXC,WAAW,EACXC,UAAWvB,EAAcwB,KACzBC,cAAc,EACdC,YAAY,EACZC,iBAAkB,UAGTC,EAAmD,CAC5D,CAAC5B,EAAcwB,MAAO,GAAGN,EAAsBS,0BAA0B3B,EAAcwB,OACvF,CAACxB,EAAc6B,MAAO,GAAGX,EAAsBS,0BAA0B3B,EAAc6B,OACvF,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GAA0B,oBAC1BC,GAA2B,qBAC3BC,GAAyBtT,EAAsBS,iB","sources":["webpack://markdown-pro/webpack/bootstrap","webpack://markdown-pro/./www/library/src/markdown-const.ts","webpack://markdown-pro/webpack/runtime/define property getters","webpack://markdown-pro/webpack/runtime/hasOwnProperty shorthand","webpack://markdown-pro/webpack/runtime/make namespace object","webpack://markdown-pro/./www/library/src/render/render-const.ts","webpack://markdown-pro/./www/library/src/parser/util/string.ts","webpack://markdown-pro/./www/library/src/parser/util/navigation.ts","webpack://markdown-pro/./www/library/src/parser/parser-selector.ts","webpack://markdown-pro/./www/library/src/parser/footnote/footnote-const.ts","webpack://markdown-pro/./www/library/src/parser/footnote/footnote-helper.ts","webpack://markdown-pro/./www/library/src/parser/footnote/footnote.ts","webpack://markdown-pro/./www/library/src/parser/util/is-tag.ts","webpack://markdown-pro/./www/library/src/parser/util/is.ts","webpack://markdown-pro/./www/library/src/render/render-util.ts","webpack://markdown-pro/./www/library/src/render/render-link.ts","webpack://markdown-pro/./www/library/src/render/render-pair-tag.ts","webpack://markdown-pro/./www/library/src/render/render-helper.ts","webpack://markdown-pro/./www/library/src/render/render-table/render-table-const.ts","webpack://markdown-pro/./www/library/src/render/render-table/render-table-helper.ts","webpack://markdown-pro/./www/library/src/render/render-table/render-table.ts","webpack://markdown-pro/./www/library/src/render/render.ts","webpack://markdown-pro/./www/library/src/markdown.ts","webpack://markdown-pro/./www/library/src/parser/parse-line.ts","webpack://markdown-pro/./www/library/src/parser/util/variable.ts","webpack://markdown-pro/./www/library/src/helper.ts","webpack://markdown-pro/./www/library/library.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","import type {MarkdownConfigType} from \"../library\";\n\nexport enum ThemeNameEnum {\n auto = \"auto\",\n dark = \"dark\",\n light = \"light\",\n}\n\nexport const defaultMarkdownConfig: MarkdownConfigType = {\n codeHighlight: (langName: string, code: string): string => {\n return code;\n },\n parseLink: true,\n themeName: ThemeNameEnum.auto,\n useLineBreak: false,\n useWrapper: true,\n wrapperClassName: \"md-pro\",\n};\n\nexport const themeClassNameMap: Record = {\n [ThemeNameEnum.auto]: `${defaultMarkdownConfig.wrapperClassName}-theme-${ThemeNameEnum.auto}`,\n [ThemeNameEnum.dark]: `${defaultMarkdownConfig.wrapperClassName}-theme-${ThemeNameEnum.dark}`,\n [ThemeNameEnum.light]: `${defaultMarkdownConfig.wrapperClassName}-theme-${ThemeNameEnum.light}`,\n};\n\nexport const mailPrefix = \"mailto:\";\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export const emptyString = \"\";\nexport const space = \" \";\nexport const breakLineTag = \"
    \";\n","import {emptyString} from \"../../render/render-const\";\n\nexport function filterEmptyString(line: string): boolean {\n return line.trim() !== emptyString;\n}\n\nexport function cleanLine(line: string): string {\n return line.trim().replace(/\\s+/gu, \" \");\n}\n\nexport function getIsAllSymbolsEqual(line: string): boolean {\n const charList: Array = line.split(\"\");\n\n const [firstSymbol] = charList;\n\n if (!firstSymbol) {\n return true;\n }\n\n for (const char of charList) {\n if (char !== firstSymbol) {\n return false;\n }\n }\n\n return true;\n}\n","import type {LineDataType} from \"../parser-type\";\nimport {emptyString} from \"../../render/render-const\";\n\nexport function searchSiblingItem(\n lineData: LineDataType,\n lineDataList: Array,\n direction: number\n): LineDataType | null {\n const index = lineDataList.indexOf(lineData);\n\n if (index === -1) {\n // Console.error('lineDataList should contain lineData');\n return null;\n }\n\n const siblingIndex = index + direction;\n\n const siblingItem = siblingIndex in lineDataList ? lineDataList[siblingIndex] : null;\n\n if (!siblingItem) {\n return null;\n }\n\n if (siblingItem.trimmedLine === emptyString) {\n const updatedDirection = direction + (direction >= 0 ? 1 : -1);\n\n return searchSiblingItem(lineData, lineDataList, updatedDirection);\n }\n\n return siblingItem;\n}\n\nexport function getIsEdgeLine(lineData: LineDataType, lineDataList: Array, direction: number): boolean {\n const {selector} = lineData;\n const foundItem = searchSiblingItem(lineData, lineDataList, direction);\n\n return !foundItem || foundItem.selector !== selector;\n}\n\nexport function getParent(lineData: LineDataType, lineDataList: Array): LineDataType | null {\n const linaDataListLength = lineDataList.length;\n\n for (let lineDataIndex = linaDataListLength - 1; lineDataIndex >= 0; lineDataIndex -= 1) {\n const lineDataCandidate = lineDataList[lineDataIndex];\n\n if (lineDataCandidate.spaceCount < lineData.spaceCount) {\n return lineDataCandidate;\n }\n }\n\n // Console.error('Parent not found');\n\n return null;\n}\n","import type {\n OlParseDataType,\n OlTypeBigAlphabetType,\n OlTypeBigRomanNumberType,\n OlTypeNumericType,\n OlTypeSmallAlphabetType,\n OlTypeSmallRomanNumberType,\n PairTagSelectorType,\n SelectorOlBigAlphabetItemType,\n SelectorOlBigRomanNumberItemType,\n SelectorOlNumericItemType,\n SelectorOlSmallAlphabetItemType,\n SelectorOlSmallRomanNumberItemType,\n SelectorType,\n} from \"./parser-type\";\n\nexport const selectorHeaderList: Array = [\"# \", \"## \", \"### \", \"#### \", \"##### \", \"###### \"];\n// Export const selectorHeaderList: Array = ['# ', '## ', '### ', '#### ', '##### ', '###### '];\nexport const selectorBlockquoteList: Array = [\"> \"];\n// Export const selectorBlockquoteList: Array = ['> '];\nexport const selectorLineList: Array = [\"---\", \"***\", \"___\"];\n// Export const selectorLineList: Array = ['---', '***', '___'];\nexport const selectorTableList: Array = [\"|\"];\n// Export const selectorTableList: Array = ['|'];\nexport const selectorCodeList: Array = [\"```\"];\n// Export const selectorCodeList: Array = ['```'];\n\nexport const selectorULItemList: Array = [\"+ \", \"- \", \"* \"];\n// Export const selectorULItemList: Array = ['+ ', '- ', '* '];\n\nexport const olNumericItemSelector: SelectorOlNumericItemType = \"0. \";\nexport const olNumericItemRegExp = /^\\d+\\.\\s/u;\nexport const olNumericType: OlTypeNumericType = \"1\";\n\nexport const olBigRomanNumberItemSelector: SelectorOlBigRomanNumberItemType = \"I. \";\nexport const olBigRomanNumberItemRegExp = /^[CDILMVX]+\\.\\s/u;\nexport const olBigRomanNumberType: OlTypeBigRomanNumberType = \"I\";\n\nexport const olSmallRomanNumberItemSelector: SelectorOlSmallRomanNumberItemType = \"i. \";\nexport const olSmallRomanNumberItemRegExp = /^[cdilmvx]+\\.\\s/u;\nexport const olSmallRomanNumberType: OlTypeSmallRomanNumberType = \"i\";\n\nexport const olBigAlphabetItemSelector: SelectorOlBigAlphabetItemType = \"A. \";\nexport const olBigAlphabetItemRegExp = /^[A-Z]+\\.\\s/u;\nexport const olBigAlphabetType: OlTypeBigAlphabetType = \"A\";\n\nexport const olSmallAlphabetItemSelector: SelectorOlSmallAlphabetItemType = \"a. \";\nexport const olSmallAlphabetItemRegExp = /^[a-z]+\\.\\s/u;\nexport const olSmallAlphabetType: OlTypeSmallAlphabetType = \"a\";\n\nexport const oLParseDataList: Array = [\n {\n olAttributeType: olNumericType,\n regExpSearchSelector: olNumericItemRegExp,\n selector: olNumericItemSelector,\n },\n {\n olAttributeType: olBigRomanNumberType,\n regExpSearchSelector: olBigRomanNumberItemRegExp,\n selector: olBigRomanNumberItemSelector,\n },\n {\n olAttributeType: olSmallRomanNumberType,\n regExpSearchSelector: olSmallRomanNumberItemRegExp,\n selector: olSmallRomanNumberItemSelector,\n },\n {\n olAttributeType: olBigAlphabetType,\n regExpSearchSelector: olBigAlphabetItemRegExp,\n selector: olBigAlphabetItemSelector,\n },\n {\n olAttributeType: olSmallAlphabetType,\n regExpSearchSelector: olSmallAlphabetItemRegExp,\n selector: olSmallAlphabetItemSelector,\n },\n];\n\nexport const selectorList: Array = [\n // ...selectorLineList,\n ...selectorHeaderList,\n ...selectorULItemList,\n ...selectorTableList,\n ...selectorCodeList,\n ...selectorBlockquoteList,\n].sort((itemA: SelectorType, itemB: SelectorType): number => {\n return itemB.length - itemA.length;\n});\n\nconst pairTagSelectorBold: PairTagSelectorType = {\n closeTag: \"
    \",\n equal: /\\*+/u,\n openTag: \"\",\n selector: \"**\",\n};\nconst pairTagSelectorUnderline: PairTagSelectorType = {\n closeTag: \"
    \",\n equal: /_+/u,\n openTag: \"\",\n selector: \"__\",\n};\nconst pairTagSelectorStrike: PairTagSelectorType = {\n closeTag: \"\",\n equal: /~+/u,\n openTag: \"\",\n selector: \"~~\",\n};\nconst pairTagSelectorItalic1: PairTagSelectorType = {\n closeTag: \"\",\n equal: /_+/u,\n openTag: \"\",\n selector: \"_\",\n};\nconst pairTagSelectorItalic2: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\*+/u,\n openTag: \"\",\n selector: \"*\",\n};\nconst pairTagSelectorSub: PairTagSelectorType = {\n closeTag: \"\",\n equal: /~+/u,\n openTag: \"\",\n selector: \"~\",\n};\nconst pairTagSelectorSup: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\^+/u,\n openTag: \"\",\n selector: \"^\",\n};\nconst pairTagSelectorInlineCode: PairTagSelectorType = {\n closeTag: \"\",\n equal: /`+/u,\n openTag: '',\n selector: \"`\",\n};\n\nconst pairTagSelectorBoldAndItalic: PairTagSelectorType = {\n closeTag: \"\",\n equal: /\\*+/u,\n openTag: \"\",\n selector: \"***\",\n};\n\n// More long selectors should be first\nexport const pairTagSelectorList: Array = [\n pairTagSelectorBoldAndItalic,\n pairTagSelectorBold,\n pairTagSelectorUnderline,\n pairTagSelectorItalic1,\n pairTagSelectorItalic2,\n pairTagSelectorStrike,\n pairTagSelectorSub,\n pairTagSelectorSup,\n pairTagSelectorInlineCode,\n];\n","import type {FootnoteTypeType} from \"../parser-type\";\n\nexport const footnoteTypeMap: {[key in FootnoteTypeType]: FootnoteTypeType} = {\n inline: \"inline\",\n \"super\": \"super\",\n};\n\n// Export const footnotePrefix = 'fn-';\n\nexport const findFootnoteMarkGlobalRegExp = /\\S\\[\\^[^\\]]+?\\]|\\S\\^\\[[^\\]]+?\\]/gu;\n","import type {FootnoteType} from \"../parser-type\";\n\nexport function getIsFootnoteDescription(lineContent: string): boolean {\n return /^\\[\\^[^\\]]+\\]:/u.test(lineContent);\n}\n\nexport function getFootnoteById(id: string, list: Array): FootnoteType | undefined {\n return list.find((footnote: FootnoteType): boolean => {\n return footnote.id === id;\n });\n}\n\nexport function getFootnoteInlineLineContent(match: string): string {\n return match.slice(3, -1).trim();\n}\n\n// See findFootnoteMarkGlobalRegExp\nexport function getFootnoteMarkId(match: string): string {\n // eslint-disable-next-line newline-per-chained-call\n return getFootnoteInlineLineContent(match).toLowerCase().replace(/\\W/gu, \" \").trim().replace(/\\s+/gu, \"-\");\n}\n\nexport function getMdFootnoteContent(footnote: FootnoteType): string {\n const {inlineLineContent, descriptionLineData} = footnote;\n\n if (descriptionLineData) {\n const {lineContent, additionalLineList} = descriptionLineData;\n const start = lineContent.indexOf(\"]:\") + 2;\n\n return `${lineContent.slice(start)}\\n${additionalLineList.join(\"\\n\")}`;\n }\n\n return inlineLineContent;\n}\n","import type {DocumentMetaType, LineDataType, FootnoteType} from \"../parser-type\";\n\nimport {findFootnoteMarkGlobalRegExp, footnoteTypeMap} from \"./footnote-const\";\nimport {getFootnoteById, getFootnoteInlineLineContent, getFootnoteMarkId} from \"./footnote-helper\";\n\nfunction matchToFootnote(match: string): FootnoteType {\n const id = getFootnoteMarkId(match);\n const inlineLineContent = getFootnoteInlineLineContent(match);\n\n if (match.indexOf(\"[^\") === 1) {\n return {\n descriptionLineData: null,\n id,\n inlineLineContent,\n type: footnoteTypeMap.super,\n };\n }\n\n return {\n descriptionLineData: null,\n id,\n inlineLineContent,\n type: footnoteTypeMap.inline,\n };\n}\n\nexport function getFootnoteList(lineContent: string): Array {\n const matchedList = lineContent.match(findFootnoteMarkGlobalRegExp);\n\n if (!matchedList) {\n return [];\n }\n\n return matchedList.map(matchToFootnote);\n}\n\nexport function fromToFootnoteList(fromList: Array, toList: Array): void {\n for (const fromItem of fromList) {\n const {id, descriptionLineData} = fromItem;\n const candidateToExtend = toList.find((toItem: FootnoteType): boolean => {\n return toItem.id === id;\n });\n\n if (candidateToExtend) {\n if (!candidateToExtend.descriptionLineData) {\n candidateToExtend.descriptionLineData = descriptionLineData;\n }\n } else {\n toList.push(fromItem);\n }\n }\n}\n\nexport function addLineData(lineData: LineDataType, toList: Array): void {\n const {lineContent} = lineData;\n const rawMatchId = /\\[\\^[^\\]]+?\\]:/u.exec(lineContent);\n\n if (!rawMatchId) {\n return;\n }\n\n const [rawId] = rawMatchId;\n\n const id = rawId.slice(2, -2).trim();\n\n const footnote = getFootnoteById(id, toList);\n\n if (footnote) {\n footnote.descriptionLineData = lineData;\n return;\n }\n\n toList.push({\n descriptionLineData: lineData,\n id,\n inlineLineContent: lineContent,\n type: footnoteTypeMap.super,\n });\n}\n\nexport function makeFootnoteSuper(fullLineContent: string, documentMeta: DocumentMetaType): string {\n return fullLineContent.replace(findFootnoteMarkGlobalRegExp, (match: string): string => {\n const charList: Array = match.split(\"\");\n const [firstLetter] = charList;\n const {footnoteList} = documentMeta;\n const id = getFootnoteMarkId(match);\n\n const footnote = getFootnoteById(id, footnoteList);\n\n if (!footnote) {\n return \"\";\n }\n\n return `${firstLetter}[${footnoteList.indexOf(footnote) + 1}]`;\n });\n}\n","import type {LineDataType} from \"../parser-type\";\nimport {\n oLParseDataList,\n selectorBlockquoteList,\n selectorCodeList,\n selectorHeaderList,\n selectorLineList,\n selectorTableList,\n selectorULItemList,\n} from \"../parser-selector\";\n\nexport function getIsHeader(lineData: LineDataType): boolean {\n return selectorHeaderList.includes(lineData.selector);\n}\n\nexport function getIsUlItem(lineData: LineDataType): boolean {\n return selectorULItemList.includes(lineData.selector);\n}\n\nexport function getIsOlItem(lineData: LineDataType): boolean {\n for (const oLParseData of oLParseDataList) {\n if (oLParseData.selector === lineData.selector) {\n return true;\n }\n }\n\n return false;\n}\n\nexport function getIsLine(lineData: LineDataType): boolean {\n return selectorLineList.includes(lineData.selector);\n}\n\nexport function getIsTable(lineData: LineDataType): boolean {\n return selectorTableList.includes(lineData.selector);\n}\n\nexport function getIsCode(lineData: LineDataType): boolean {\n return selectorCodeList.includes(lineData.selector);\n}\n\nexport function getIsBlockquote(lineData: LineDataType): boolean {\n return selectorBlockquoteList.includes(lineData.selector);\n}\n\nconst htmlPairTag = /<(\\w+)[^>]*>[\\S\\s]*?<\\/\\1>/u;\nconst htmlSingleTag = /<\\w+[^>]*?\\s*\\/>/u;\n\nexport function getIsStartWithHtml(lineData: LineDataType): boolean {\n const {trimmedLine} = lineData;\n\n return trimmedLine.search(htmlPairTag) === 0 || trimmedLine.search(htmlSingleTag) === 0;\n}\n","export function hasStringNonEmptySymbols(value: unknown): value is string {\n return typeof value === \"string\" && value.trim().length > 0;\n}\n\nexport function hasEmailSymbol(value: string): boolean {\n return value.includes(\"@\");\n}\n","export type PairNumberArrayType = [number, number];\n\nexport function harArrayOverflow(arrayA: PairNumberArrayType, arrayB: PairNumberArrayType): boolean {\n const [startA, endA] = arrayA;\n const [startB, endB] = arrayB;\n\n return !(endA < startB || endB < startA);\n}\n\nexport function harArrayListOverflow(\n pairNumberArray: PairNumberArrayType,\n arrayList: Array\n): boolean {\n for (const arrayInList of arrayList) {\n if (harArrayOverflow(pairNumberArray, arrayInList)) {\n return true;\n }\n }\n\n return false;\n}\n\nfunction getMatchIndexList(html: string, regExp: RegExp): Array {\n const resultList: Array = [];\n\n const matchList = html.match(regExp);\n\n if (!matchList) {\n return [];\n }\n\n let currentIndex = 0;\n\n for (const matchedString of matchList) {\n const start = html.indexOf(matchedString, currentIndex);\n const end = start + matchedString.length - 1;\n\n currentIndex = end;\n\n resultList.push([start, end]);\n }\n\n return resultList;\n}\n\nconst tagSelectorRegExpGlobal = /(<\\w+[\\S\\s]*?>)|(<\\/\\w+?>)|(<\\w+[\\S\\s]*?\\/>)/gu;\n\nexport function getTagIndexList(html: string): Array {\n return getMatchIndexList(html, tagSelectorRegExpGlobal);\n}\n\nconst linkSelectorRegExpGlobal = /([\\S\\s]*?<\\/a>)|([\\S\\s]*?<\\/a>)|()/gu;\n\nexport function getLinkIndexList(html: string): Array {\n return getMatchIndexList(html, linkSelectorRegExpGlobal);\n}\n","import {mailPrefix} from \"../markdown-const\";\n\nimport {getLinkIndexList, getTagIndexList, harArrayListOverflow, type PairNumberArrayType} from \"./render-util\";\n\nconst linkTextRegExpGlobal = /(\\w+:\\/\\/[\\w.]+\\.\\w+[\\w+/]*)/giu;\nconst mailTextRegExpGlobal = /([\\w.-]+@[\\w.]+\\.\\w+[\\w+/]*)/giu;\n\nfunction linkReplacer(html: string, replacer: Readonly, hrefPrefix: string): string {\n const linkPairIndexList = getLinkIndexList(html);\n const tagIndexList = getTagIndexList(html);\n\n return html.replace(replacer, (match: string, brackets1: string, offset: number): string => {\n const rawLinkIndexArray: PairNumberArrayType = [offset, offset];\n\n if (harArrayListOverflow(rawLinkIndexArray, tagIndexList)) {\n return match;\n }\n\n if (harArrayListOverflow(rawLinkIndexArray, linkPairIndexList)) {\n return match;\n }\n\n return `${match}`;\n });\n}\n\nexport function makeLinkFromText(html: string): string {\n return linkReplacer(html, linkTextRegExpGlobal, \"\");\n}\n\nexport function makeMailFromText(html: string): string {\n return linkReplacer(html, mailTextRegExpGlobal, mailPrefix);\n}\n","import type {PairTagSelectorType} from \"../parser/parser-type\";\nimport {pairTagSelectorList} from \"../parser/parser-selector\";\n\nimport {getTagIndexList, harArrayOverflow} from \"./render-util\";\n\nexport function getSelectorIndexList(html: string, pairTagSelector: PairTagSelectorType): Array {\n const {selector, equal} = pairTagSelector;\n\n const resultList: Array = [];\n const selectorLength = selector.length;\n\n if (selectorLength === 0) {\n // Console.error('Selector is empty string');\n return resultList;\n }\n\n let indexOfSelector: number = html.indexOf(selector, 0);\n\n while (indexOfSelector !== -1) {\n const equalSymbolsMatch: Array | null = html.slice(indexOfSelector).match(equal);\n\n if (!equalSymbolsMatch) {\n return [];\n }\n\n const [equalSymbolLine] = equalSymbolsMatch;\n const equalSymbolLineLength = equalSymbolLine.length;\n\n if (equalSymbolLineLength === selectorLength) {\n resultList.push(indexOfSelector);\n }\n\n indexOfSelector = html.indexOf(selector, indexOfSelector + equalSymbolLineLength);\n }\n\n if (resultList.length % 2 === 1) {\n return resultList.slice(0, -1);\n }\n\n return resultList;\n}\n\nfunction addPairTag(html: string, pairTagSelector: PairTagSelectorType): string {\n const {selector, openTag, closeTag} = pairTagSelector;\n const selectorLength = selector.length;\n\n if (!html.includes(selector)) {\n return html;\n }\n\n const tagPairIndexList = getTagIndexList(html);\n\n let selectorIndexList: Array = getSelectorIndexList(html, pairTagSelector);\n\n // Remove indexes into tags, f.e. - text\n selectorIndexList = selectorIndexList.filter((selectorIndex: number): boolean => {\n for (const tagPairIndex of tagPairIndexList) {\n const selectorStart = selectorIndex;\n const selectorEnd = selectorIndex + selectorLength - 1;\n\n if (harArrayOverflow(tagPairIndex, [selectorStart, selectorEnd])) {\n return false;\n }\n }\n\n return true;\n });\n\n const selectorIndexListLength = selectorIndexList.length;\n\n if (selectorIndexListLength === 0) {\n return html;\n }\n\n let resultTagPairedList: string = html.slice(0, selectorIndexList[0]);\n\n for (let selectorIndexInList = 1; selectorIndexInList <= selectorIndexListLength; selectorIndexInList += 1) {\n const selectorIndex = selectorIndexList[selectorIndexInList];\n const htmlPart = html.slice(selectorIndexList[selectorIndexInList - 1] + selectorLength, selectorIndex);\n\n resultTagPairedList += selectorIndexInList % 2 === 1 ? openTag + htmlPart + closeTag : htmlPart;\n }\n\n return resultTagPairedList;\n}\n\nexport function makePairTag(html: string): string {\n let result = html;\n\n for (const pairTagSelector of pairTagSelectorList) {\n result = addPairTag(result, pairTagSelector);\n }\n\n return result;\n}\n","import type {DocumentMetaType, LineDataType, OlAttributeType, SelectorType} from \"../parser/parser-type\";\nimport {olNumericType, oLParseDataList} from \"../parser/parser-selector\";\nimport {hasEmailSymbol, hasStringNonEmptySymbols} from \"../parser/util/is\";\nimport {makeFootnoteSuper} from \"../parser/footnote/footnote\";\nimport {mailPrefix} from \"../markdown-const\";\n\nimport {breakLineTag, emptyString, space} from \"./render-const\";\nimport {makeLinkFromText, makeMailFromText} from \"./render-link\";\nimport {makePairTag} from \"./render-pair-tag\";\n\nexport const breakLineRegExp = /\\s*?\\\\$/u;\n\nexport function addBreakLine(line: string): string {\n return line.replace(breakLineRegExp, \"
    \");\n}\n\nexport function removeEndBreakLine(line: string): string {\n return line.replace(breakLineRegExp, emptyString);\n}\n\nexport function getHasEndBreakLine(lineContent: string, useLineBreak: boolean): boolean {\n return useLineBreak || breakLineRegExp.test(lineContent);\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction imageReplacer(matchedString: string, alt: unknown, src: string, title: unknown): string {\n const titleAndOtherAttrValue = hasStringNonEmptySymbols(title) ? ` title=\"${title}\"` : \"\";\n const altAttrValue = hasStringNonEmptySymbols(alt) ? ` alt=\"${alt}\"` : \"\";\n\n return ``;\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction imageReplacerVariable(\n matchedString: string,\n alt: unknown,\n srcVariable: string,\n documentMeta: DocumentMetaType\n): string {\n const altAttrValue = hasStringNonEmptySymbols(alt) ? ` alt=\"${alt}\"` : \"\";\n const {variable} = documentMeta;\n\n if (srcVariable in variable) {\n return ``;\n }\n\n return ``;\n}\n\nconst findImageRegExpGlobal = /!\\[([\\S\\s]*?)\\]\\((\\S+?)(?:\\s+\"([\\S\\s]+?)\")?\\)/gu;\nconst findImageVariableRegExpGlobal = /!\\[([\\S\\s]*?)\\]\\[([\\S\\s]+?)\\]/gu;\n\nexport function makeImage(html: string, documentMeta: DocumentMetaType): string {\n return html\n\n .replace(findImageRegExpGlobal, imageReplacer)\n\n .replace(findImageVariableRegExpGlobal, (matchedString: string, alt: unknown, srcVariable: string): string => {\n return imageReplacerVariable(matchedString, alt, srcVariable, documentMeta);\n });\n}\n\nconst findCheckboxCheckedRegExoGlobal = /\\[x\\]/giu;\nconst findCheckboxUncheckedRegExoGlobal = /\\[\\s\\]/gu;\n\nexport function makeCheckbox(html: string): string {\n return html\n\n .replace(findCheckboxCheckedRegExoGlobal, '')\n\n .replace(findCheckboxUncheckedRegExoGlobal, '');\n}\n\nexport function isImageListOnly(lineContent: string): boolean {\n return lineContent.replace(findImageRegExpGlobal, \"\").trim() === emptyString;\n}\n\nconst findMailRegExpGlobal = /\\[([\\S\\s]*?)\\]\\((\\S+?)(?:\\s+\"([\\S\\s]+?)\")?(?:\\s+\"([\\S\\s]+?)\")?\\)/gu;\nconst findLinkRegExpGlobal = /\\[([\\S\\s]*?)\\]\\((\\S+?)(?:\\s+\"([\\S\\s]+?)\")?\\)/gu;\nconst findLinkVariableRegExpGlobal = /\\[([\\S\\s]*?)\\]\\[([\\S\\s]+?)\\]/gu;\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction mailReplacer(matchedString: string, linkText: string, href: string, title: unknown, subject: unknown): string {\n const titleAttrValue = hasStringNonEmptySymbols(title) ? ` title=\"${title}\"` : \"\";\n const subjectValue = hasStringNonEmptySymbols(subject) ? `?subject=${subject}` : \"\";\n const text = linkText.length > 0 ? linkText : href;\n\n if (hasEmailSymbol(matchedString)) {\n return `${text}`;\n }\n\n // Leave it for link\n return matchedString;\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction linkReplacer(matchedString: string, linkText: string, href: string, title: unknown): string {\n const titleAttrValue = hasStringNonEmptySymbols(title) ? ` title=\"${title}\"` : \"\";\n const text = linkText.length > 0 ? linkText : href;\n\n return `${text}`;\n}\n\nfunction getMailToPrefix(href: string): string {\n return hasEmailSymbol(href) ? mailPrefix : \"\";\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction linkReplacerVariable(\n matchedString: string,\n linkText: string,\n hrefVariable: string,\n documentMeta: DocumentMetaType\n): string {\n const {variable} = documentMeta;\n\n if (hrefVariable in variable) {\n const href = variable[hrefVariable].value;\n const textVariable = linkText.length > 0 ? linkText : href;\n\n return `${textVariable}`;\n }\n\n const text = linkText.length > 0 ? linkText : hrefVariable;\n\n return `${text}`;\n}\n\nfunction defineVariables(html: string, documentMeta: DocumentMetaType): string {\n return html.replace(\n findLinkVariableRegExpGlobal,\n (matchedString: string, linkText: string, hrefVariable: string): string => {\n return linkReplacerVariable(matchedString, linkText, hrefVariable, documentMeta);\n }\n );\n}\n\nexport function makeMail(html: string): string {\n return html.replace(findMailRegExpGlobal, mailReplacer);\n}\n\nexport function makeLink(html: string): string {\n return html.replace(findLinkRegExpGlobal, linkReplacer);\n}\n\nexport function getOlTypeBySelector(dataLineSelector: SelectorType): OlAttributeType {\n for (const oLParseData of oLParseDataList) {\n const {selector, olAttributeType} = oLParseData;\n\n if (dataLineSelector === selector) {\n return olAttributeType;\n }\n }\n\n // Console.error('Can not detect ol type by selector', dataLineSelector);\n\n return olNumericType;\n}\n\nexport function getOlStart(trimmedLine: string): string {\n const dotIndex = trimmedLine.indexOf(\".\");\n\n return trimmedLine.slice(0, dotIndex);\n}\n\nexport function renderAdditionalLineList(lineData: LineDataType): string {\n const {additionalLineList, config} = lineData;\n const {lineContent} = lineData;\n const {useLineBreak} = config;\n\n if (additionalLineList.length === 0) {\n return emptyString;\n }\n\n const hasParentEndBreakLine = getHasEndBreakLine(lineContent, useLineBreak);\n const prefix = hasParentEndBreakLine ? breakLineTag : space;\n const additionalLineListLength = additionalLineList.length;\n const additionalLineLastIndex = additionalLineListLength - 1;\n const lineResult: Array = Array.from({length: additionalLineListLength}).fill(\"\");\n\n for (let lineIndex = 0; lineIndex < additionalLineListLength; lineIndex += 1) {\n const additionalLine = additionalLineList[lineIndex];\n const hasBreakLine = getHasEndBreakLine(additionalLine, useLineBreak);\n\n if (hasBreakLine) {\n const additionalLineWithoutBreakLine = additionalLine.replace(breakLineRegExp, emptyString);\n\n lineResult[lineIndex] =\n lineIndex === additionalLineLastIndex\n ? additionalLineWithoutBreakLine\n : additionalLineWithoutBreakLine + breakLineTag;\n } else {\n lineResult[lineIndex] = lineIndex === additionalLineLastIndex ? additionalLine : additionalLine + space;\n }\n }\n\n return prefix + lineResult.join(emptyString);\n}\n\nexport function renderInlineHtml(html: string, documentMeta: DocumentMetaType): string {\n const {config} = documentMeta;\n const {parseLink} = config;\n\n let fullLineContent = makeFootnoteSuper(html, documentMeta);\n\n fullLineContent = makeImage(fullLineContent, documentMeta);\n\n fullLineContent = makeMail(fullLineContent);\n if (parseLink) {\n fullLineContent = makeMailFromText(fullLineContent);\n }\n\n fullLineContent = makeLink(fullLineContent);\n if (parseLink) {\n fullLineContent = makeLinkFromText(fullLineContent);\n }\n\n fullLineContent = defineVariables(fullLineContent, documentMeta);\n\n fullLineContent = makeCheckbox(fullLineContent);\n return makePairTag(fullLineContent);\n}\n","import type {CellAlignType, CellTagNameType} from \"./render-table-type\";\n\nexport const cellAlignTypeMap: Record = {\n center: \"center\",\n \"default\": \"left\",\n left: \"left\",\n right: \"right\",\n};\n\nexport const cellTagNameTypeMap: Record = {\n tdCell: \"td\",\n thCell: \"th\",\n};\n","import type {DocumentMetaType, SelectorType} from \"../../parser/parser-type\";\nimport {filterEmptyString} from \"../../parser/util/string\";\nimport {emptyString} from \"../render-const\";\nimport {renderInlineHtml} from \"../render-helper\";\n\nimport {cellAlignTypeMap} from \"./render-table-const\";\nimport type {CellAlignType} from \"./render-table-type\";\n\nexport function renderTableCellContent(line: string, documentMeta: DocumentMetaType): string {\n return renderInlineHtml(line, documentMeta).trim();\n}\n\nexport function isTableDivideLine(line: string): boolean {\n return line.replace(/[\\s:|-]/gu, \"\") === emptyString;\n}\n\nexport function lineToAlign(divideRaw: string): CellAlignType {\n const alignMark = \":\";\n const divide: string = divideRaw.trim();\n\n const divideCharList: Array = divide.split(\"\");\n const [firstChar] = divideCharList;\n\n const lastChar = divide[divide.length - 1];\n\n if (firstChar === lastChar && firstChar === alignMark) {\n return cellAlignTypeMap.center;\n }\n\n if (lastChar === alignMark) {\n return cellAlignTypeMap.right;\n }\n\n return cellAlignTypeMap.left;\n}\n\nexport function getAlignList(selector: SelectorType, divideLine: string): Array {\n return divideLine.split(selector).filter(filterEmptyString).map(lineToAlign);\n}\n","import type {DocumentMetaType, LineDataType} from \"../../parser/parser-type\";\nimport {filterEmptyString} from \"../../parser/util/string\";\nimport {emptyString} from \"../render-const\";\n\nimport {getAlignList, isTableDivideLine, renderTableCellContent} from \"./render-table-helper\";\nimport {cellAlignTypeMap, cellTagNameTypeMap} from \"./render-table-const\";\nimport type {CellAlignType, CellTagNameType} from \"./render-table-type\";\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction renderTableRow(\n lineData: LineDataType,\n line: string,\n alignList: Array,\n cellName: CellTagNameType,\n documentMeta: DocumentMetaType\n): string {\n const {selector} = lineData;\n\n return line\n .split(selector)\n .filter(filterEmptyString)\n .map((cellContent: string, cellIndex: number): string => {\n const align = alignList[cellIndex] || cellAlignTypeMap.default;\n\n return `<${cellName} align=\"${align}\">${renderTableCellContent(cellContent, documentMeta)}`;\n })\n .join(emptyString);\n}\n\n// eslint-disable-next-line @typescript-eslint/max-params\nfunction renderTableRowList(\n lineData: LineDataType,\n lineList: Array,\n alignList: Array,\n cellName: CellTagNameType,\n documentMeta: DocumentMetaType\n): string {\n return lineList\n .map((line: string): string => {\n return `${renderTableRow(lineData, line, alignList, cellName, documentMeta)}`;\n })\n .join(emptyString);\n}\n\nexport function renderTable(lineData: LineDataType, documentMeta: DocumentMetaType): string {\n const {selector, additionalLineList, line} = lineData;\n\n const lineList = [line, ...additionalLineList];\n\n const dividerLine = lineList.find(isTableDivideLine);\n\n // eslint-disable-next-line no-undefined\n if (dividerLine === undefined) {\n const bodyOnlyContent = renderTableRowList(lineData, lineList, [], cellTagNameTypeMap.tdCell, documentMeta);\n\n return `${bodyOnlyContent}
    `;\n }\n\n const dividerLineIndex = lineList.indexOf(dividerLine);\n const headLineList = lineList.slice(0, dividerLineIndex);\n const bodyLineList = lineList.slice(dividerLineIndex + 1);\n const alignList = getAlignList(selector, dividerLine);\n\n const headContent = renderTableRowList(lineData, headLineList, alignList, cellTagNameTypeMap.thCell, documentMeta);\n const bodyContent = renderTableRowList(lineData, bodyLineList, alignList, cellTagNameTypeMap.tdCell, documentMeta);\n\n return `${headContent}${bodyContent}
    `;\n}\n","import {\n getIsBlockquote,\n getIsCode,\n getIsHeader,\n getIsLine,\n getIsOlItem,\n getIsStartWithHtml,\n getIsTable,\n getIsUlItem,\n} from \"../parser/util/is-tag\";\nimport type {DocumentMetaType, LineDataType} from \"../parser/parser-type\";\n\nimport {getIsEdgeLine} from \"../parser/util/navigation\";\nimport {getIsFootnoteDescription} from \"../parser/footnote/footnote-helper\";\n// Import {makeFootnoteSuper} from '../parser/footnote/footnote';\n\nimport {\n addBreakLine,\n getOlStart,\n getOlTypeBySelector,\n isImageListOnly,\n removeEndBreakLine,\n renderAdditionalLineList,\n renderInlineHtml,\n} from \"./render-helper\";\nimport {emptyString} from \"./render-const\";\nimport {renderTable} from \"./render-table/render-table\";\n\nexport function renderChildList(lineDataList: Array, documentMeta: DocumentMetaType): string {\n return lineDataList\n .map((lineData: LineDataType, lineDataIndex: number): string => {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return renderLineData(lineData, lineDataIndex, lineDataList, documentMeta);\n })\n .map(addBreakLine)\n .join(emptyString);\n}\n\n// eslint-disable-next-line max-statements, @typescript-eslint/max-params\nexport function renderLineData(\n lineData: LineDataType,\n lineDataIndex: number,\n lineDataList: Array,\n documentMeta: DocumentMetaType\n): string {\n const {selector, childList, lineContent, trimmedLine, additionalLineList, config} = lineData;\n const {codeHighlight} = config;\n const additionLineListRender = renderAdditionalLineList(lineData);\n const childListRender = renderChildList(childList, documentMeta);\n\n let fullLineContent = removeEndBreakLine(lineContent) + additionLineListRender;\n\n fullLineContent = renderInlineHtml(fullLineContent, documentMeta);\n\n fullLineContent += childListRender;\n\n if (getIsFootnoteDescription(lineContent)) {\n return \"\";\n }\n\n if (getIsLine(lineData)) {\n return \"
    \";\n }\n\n if (getIsTable(lineData)) {\n return renderTable(lineData, documentMeta);\n }\n\n if (getIsCode(lineData)) {\n const codeText = codeHighlight(lineContent, additionalLineList.join(\"\\n\"));\n\n return lineContent ? `${codeText}` : `${codeText}`;\n }\n\n if (lineContent === emptyString && childList.length === 0) {\n return emptyString;\n }\n\n if (getIsHeader(lineData)) {\n const headerTag = selector.length - 1;\n\n return `${fullLineContent}`;\n }\n\n if (getIsBlockquote(lineData)) {\n return `
    ${fullLineContent}
    `;\n }\n\n if (getIsUlItem(lineData)) {\n const isFirstItem = getIsEdgeLine(lineData, lineDataList, -1);\n const isLastItem = getIsEdgeLine(lineData, lineDataList, 1);\n const prefix = isFirstItem ? \"
      \" : \"\";\n const postfix = isLastItem ? \"
    \" : \"\";\n\n return `${prefix}
  • ${fullLineContent}
  • ${postfix}`;\n }\n\n if (getIsOlItem(lineData)) {\n const isFirstItem = getIsEdgeLine(lineData, lineDataList, -1);\n const isLastItem = getIsEdgeLine(lineData, lineDataList, 1);\n const {selector: lineDataSelector} = lineData;\n const prefix = isFirstItem\n ? `
      `\n : \"\";\n const postfix = isLastItem ? \"
    \" : \"\";\n\n return `${prefix}
  • ${fullLineContent}
  • ${postfix}`;\n }\n\n if (lineContent === emptyString || getIsStartWithHtml(lineData) || isImageListOnly(lineContent)) {\n return fullLineContent;\n }\n\n return `

    ${fullLineContent}

    `;\n}\n","import type {MarkdownConfigShallowType, MarkdownConfigType} from \"../library\";\n\nimport {parseLine} from \"./parser/parse-line\";\nimport type {DocumentMetaType, FootnoteType, LineDataType} from \"./parser/parser-type\";\nimport {emptyString} from \"./render/render-const\";\nimport {renderChildList} from \"./render/render\";\nimport {defaultMarkdownConfig} from \"./markdown-const\";\nimport {getMdFootnoteContent} from \"./parser/footnote/footnote-helper\";\nimport {getFullWrapperClassName} from \"./helper\";\n\nexport function markdown(mdInput: string, config: MarkdownConfigShallowType = defaultMarkdownConfig): string {\n const markdownConfig: MarkdownConfigType = {\n ...defaultMarkdownConfig,\n ...config,\n };\n\n const {useWrapper} = markdownConfig;\n\n const markdownFootnoteConfig: MarkdownConfigType = {\n ...defaultMarkdownConfig,\n ...config,\n useWrapper: false,\n };\n\n const mainParent: LineDataType = {\n additionalLineList: [],\n childList: [],\n config: markdownConfig,\n line: emptyString,\n lineContent: \"\",\n lineIndex: -1,\n selector: emptyString,\n spaceCount: -1,\n trimmedLine: \"\",\n };\n const structuredLineDataList: Array = [mainParent];\n const savedLineDataList: Array = [mainParent];\n const documentMeta: DocumentMetaType = {\n codeLineData: null,\n config: markdownConfig,\n footnoteList: [],\n tableLineData: null,\n variable: {},\n };\n\n mdInput.split(\"\\n\").forEach((line: string, lineIndex: number, allLineList: ReadonlyArray) => {\n parseLine(line, lineIndex, allLineList, structuredLineDataList, savedLineDataList, documentMeta);\n });\n\n const mainContent = renderChildList(structuredLineDataList, documentMeta);\n\n const footnoteDescriptionList: Array = documentMeta.footnoteList.map((footnote: FootnoteType): string => {\n const {id} = footnote;\n const mdFootnoteContent = getMdFootnoteContent(footnote);\n\n return `
  • ${markdown(mdFootnoteContent, markdownFootnoteConfig)}
  • `;\n });\n\n const footnoteDescriptionHtml: string =\n footnoteDescriptionList.length === 0\n ? \"\"\n : [\"
    \", '
      ', ...footnoteDescriptionList, \"
    \"].join(\"\");\n\n const fullContent = [mainContent, footnoteDescriptionHtml].join(\"\");\n\n if (!useWrapper) {\n return fullContent;\n }\n\n const fullWrapperClassName: string = getFullWrapperClassName(markdownConfig);\n\n return `
    ${fullContent}
    `;\n}\n","import {emptyString} from \"../render/render-const\";\n\nimport {cleanLine, getIsAllSymbolsEqual} from \"./util/string\";\nimport {getParent} from \"./util/navigation\";\nimport type {DocumentMetaType, LineDataType, ShortLineInfoType} from \"./parser-type\";\nimport {oLParseDataList, selectorCodeList, selectorLineList, selectorList, selectorTableList} from \"./parser-selector\";\nimport {addLineData, fromToFootnoteList, getFootnoteList} from \"./footnote/footnote\";\nimport {getIsFootnoteDescription} from \"./footnote/footnote-helper\";\nimport {getVariableData} from \"./util/variable\";\n\nfunction getShortInfo(trimmedLine: string): ShortLineInfoType {\n for (const selector of selectorList) {\n if (trimmedLine.startsWith(selector)) {\n return {\n lineContent: cleanLine(trimmedLine.replace(selector, emptyString)),\n selector,\n };\n }\n }\n\n for (const lineSelector of selectorLineList) {\n if (trimmedLine.startsWith(lineSelector) && getIsAllSymbolsEqual(trimmedLine)) {\n return {\n lineContent: emptyString,\n selector: lineSelector,\n };\n }\n }\n\n for (const oLParseData of oLParseDataList) {\n const {selector, regExpSearchSelector} = oLParseData;\n\n if (trimmedLine.search(regExpSearchSelector) === 0) {\n return {\n lineContent: cleanLine(trimmedLine.replace(regExpSearchSelector, emptyString)),\n selector,\n };\n }\n }\n\n return {\n lineContent: cleanLine(trimmedLine),\n selector: emptyString,\n };\n}\n\n// eslint-disable-next-line complexity, max-params, max-statements, @typescript-eslint/max-params\nexport function parseLine(\n line: string,\n lineIndex: number,\n allLineList: ReadonlyArray,\n structuredLineDataList: ReadonlyArray,\n savedLineDataList: Array,\n documentMeta: DocumentMetaType\n): boolean {\n const trimmedLine = line.trim();\n const isEmptyString = trimmedLine === emptyString;\n const rawSpaceCount = isEmptyString\n ? savedLineDataList[savedLineDataList.length - 1].spaceCount\n : line.search(/\\S/u);\n const spaceCount = Math.max(0, rawSpaceCount);\n const defaultSelectorData: ShortLineInfoType = {\n lineContent: emptyString,\n selector: emptyString,\n };\n\n const {selector, lineContent} = isEmptyString ? defaultSelectorData : getShortInfo(trimmedLine);\n\n const lineData: LineDataType = {\n additionalLineList: [],\n childList: [],\n config: documentMeta.config,\n line: isEmptyString ? emptyString : line,\n lineContent,\n lineIndex,\n selector,\n spaceCount,\n trimmedLine,\n };\n\n if (selectorCodeList.includes(selector)) {\n if (documentMeta.codeLineData && lineContent === emptyString) {\n documentMeta.codeLineData = null;\n return true;\n }\n\n documentMeta.codeLineData = lineData;\n }\n\n const {codeLineData} = documentMeta;\n\n if (codeLineData && codeLineData !== lineData) {\n codeLineData.additionalLineList.push(lineData.line);\n return true;\n }\n\n const updatedFootnoteList = getFootnoteList(lineContent);\n const {footnoteList, tableLineData, variable} = documentMeta;\n\n fromToFootnoteList(updatedFootnoteList, footnoteList);\n\n if (selectorTableList.includes(selector)) {\n if (tableLineData) {\n // Append new line in current block\n\n tableLineData.additionalLineList.push(lineData.line);\n return true;\n }\n // Create new block\n\n documentMeta.tableLineData = lineData;\n } else {\n // Close table block\n\n documentMeta.tableLineData = null;\n }\n\n const variableData = getVariableData(lineContent);\n\n if (lineData.selector === emptyString && lineContent.length > 0) {\n const prevItemIndex = savedLineDataList.length - 1;\n const prevItem = savedLineDataList.at(prevItemIndex);\n const isTable = Boolean(prevItem && selectorTableList.includes(prevItem.selector));\n\n if (variableData) {\n variable[variableData.key] = variableData;\n }\n\n if (prevItem && prevItem.lineContent.length > 0 && !isTable && !variableData) {\n prevItem.additionalLineList.push(lineContent);\n return true;\n }\n }\n\n const parentLineData = getParent(lineData, savedLineDataList);\n\n if (!parentLineData) {\n // Console.error('Parent not found');\n return false;\n }\n\n if (variableData) {\n return true;\n }\n\n parentLineData.childList.push(lineData);\n savedLineDataList.push(lineData);\n\n if (getIsFootnoteDescription(lineContent)) {\n addLineData(lineData, footnoteList);\n }\n\n return true;\n}\n","import type {VariableType} from \"../parser-type\";\n\nexport function getVariableData(lineContent: string): VariableType | null {\n const matchData = /\\[([^^][\\S\\s]+?)\\]:\\s+?\\S/u.exec(lineContent);\n\n if (!matchData) {\n return null;\n }\n\n // eslint-disable-next-line @typescript-eslint/prefer-destructuring\n const key = matchData[1];\n\n const value = lineContent.slice(lineContent.indexOf(\"]:\") + 3).trim();\n\n return {\n key,\n value,\n };\n}\n","import type {MarkdownConfigType} from \"../library\";\n\nimport {themeClassNameMap, defaultMarkdownConfig} from \"./markdown-const\";\n\nexport function getFullWrapperClassName(markdownConfig: MarkdownConfigType): string {\n const {wrapperClassName: wrapperClassNameConfig, themeName} = markdownConfig;\n const {wrapperClassName: wrapperClassNameDefault} = defaultMarkdownConfig;\n\n const wrapperClassName: string =\n wrapperClassNameConfig === wrapperClassNameDefault\n ? wrapperClassNameDefault\n : `${wrapperClassNameDefault} ${wrapperClassNameConfig}`;\n\n const themeClassName: string = themeClassNameMap[themeName];\n\n return `${wrapperClassName} ${themeClassName}`;\n}\n","import \"./src/markdown.scss\";\n\nimport {defaultMarkdownConfig, type ThemeNameEnum} from \"./src/markdown-const\";\n\nexport {markdown, markdown as default} from \"./src/markdown\";\nexport {defaultMarkdownConfig, ThemeNameEnum} from \"./src/markdown-const\";\n\nexport const classNameMdProThemeDark = \"md-pro-theme-dark\";\nexport const classNameMdProThemeLight = \"md-pro-theme-light\";\nexport const classNameMdPro: string = defaultMarkdownConfig.wrapperClassName;\n\nexport type MarkdownConfigType = Readonly<{\n // Code highlight\n codeHighlight: (langName: string, code: string) => string;\n // https://exmaple.com -> https://exmaple.com\n parseLink: boolean;\n // The themeName: light | dark | auto (auto - will use current system theme i.e. light or dark), needed class will be added to the wrapper div\n themeName: ThemeNameEnum;\n // Make \\n =>
    \n useLineBreak: boolean;\n // Use wrapper
    ...
    \n useWrapper: boolean;\n // Additional css class for wrapper\n wrapperClassName: string;\n}>;\n\nexport type MarkdownConfigShallowType = Readonly>;\n"],"names":["ThemeNameEnum","__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","defaultMarkdownConfig","codeHighlight","langName","code","parseLink","themeName","auto","useLineBreak","useWrapper","wrapperClassName","themeClassNameMap","dark","light","mailPrefix","emptyString","space","breakLineTag","filterEmptyString","line","trim","cleanLine","replace","getIsAllSymbolsEqual","charList","split","firstSymbol","char","searchSiblingItem","lineData","lineDataList","direction","index","indexOf","siblingIndex","siblingItem","trimmedLine","getIsEdgeLine","selector","foundItem","selectorHeaderList","selectorBlockquoteList","selectorLineList","selectorTableList","selectorCodeList","selectorULItemList","olNumericType","oLParseDataList","olAttributeType","regExpSearchSelector","selectorList","sort","itemA","itemB","length","pairTagSelectorList","closeTag","equal","openTag","footnoteTypeMap","inline","findFootnoteMarkGlobalRegExp","getIsFootnoteDescription","lineContent","test","getFootnoteById","id","list","find","footnote","getFootnoteInlineLineContent","match","slice","getFootnoteMarkId","toLowerCase","matchToFootnote","inlineLineContent","descriptionLineData","type","super","htmlPairTag","htmlSingleTag","hasStringNonEmptySymbols","hasEmailSymbol","includes","harArrayOverflow","arrayA","arrayB","startA","endA","startB","endB","harArrayListOverflow","pairNumberArray","arrayList","arrayInList","getMatchIndexList","html","regExp","resultList","matchList","currentIndex","matchedString","start","end","push","tagSelectorRegExpGlobal","getTagIndexList","linkSelectorRegExpGlobal","linkTextRegExpGlobal","mailTextRegExpGlobal","linkReplacer","replacer","hrefPrefix","linkPairIndexList","getLinkIndexList","tagIndexList","brackets1","offset","rawLinkIndexArray","addPairTag","pairTagSelector","selectorLength","tagPairIndexList","selectorIndexList","indexOfSelector","equalSymbolsMatch","equalSymbolLine","equalSymbolLineLength","getSelectorIndexList","filter","selectorIndex","tagPairIndex","selectorIndexListLength","resultTagPairedList","selectorIndexInList","htmlPart","breakLineRegExp","addBreakLine","getHasEndBreakLine","imageReplacer","alt","src","title","titleAndOtherAttrValue","findImageRegExpGlobal","findImageVariableRegExpGlobal","findCheckboxCheckedRegExoGlobal","findCheckboxUncheckedRegExoGlobal","findMailRegExpGlobal","findLinkRegExpGlobal","findLinkVariableRegExpGlobal","mailReplacer","linkText","href","subject","titleAttrValue","subjectValue","text","getMailToPrefix","renderInlineHtml","documentMeta","config","fullLineContent","firstLetter","footnoteList","makeFootnoteSuper","srcVariable","altAttrValue","variable","imageReplacerVariable","makeImage","makeMail","makeMailFromText","makeLink","makeLinkFromText","hrefVariable","textVariable","linkReplacerVariable","defineVariables","makeCheckbox","result","makePairTag","cellAlignTypeMap","center","left","right","cellTagNameTypeMap","tdCell","thCell","isTableDivideLine","lineToAlign","divideRaw","divide","divideCharList","firstChar","lastChar","renderTableRowList","lineList","alignList","cellName","map","cellContent","cellIndex","align","default","renderTableCellContent","join","renderTableRow","renderChildList","lineDataIndex","childList","additionalLineList","additionLineListRender","prefix","additionalLineListLength","additionalLineLastIndex","lineResult","Array","from","fill","lineIndex","additionalLine","additionalLineWithoutBreakLine","renderAdditionalLineList","childListRender","getIsLine","getIsTable","dividerLine","undefined","dividerLineIndex","headLineList","bodyLineList","divideLine","getAlignList","renderTable","getIsCode","codeText","getIsHeader","headerTag","getIsBlockquote","getIsUlItem","oLParseData","getIsOlItem","isFirstItem","isLastItem","lineDataSelector","dataLineSelector","getOlTypeBySelector","dotIndex","getOlStart","search","getIsStartWithHtml","isImageListOnly","renderLineData","markdown","mdInput","markdownConfig","markdownFootnoteConfig","mainParent","spaceCount","structuredLineDataList","savedLineDataList","codeLineData","tableLineData","forEach","allLineList","isEmptyString","rawSpaceCount","Math","max","defaultSelectorData","startsWith","lineSelector","getShortInfo","updatedFootnoteList","matchedList","getFootnoteList","fromList","toList","fromItem","candidateToExtend","toItem","fromToFootnoteList","variableData","matchData","exec","getVariableData","prevItemIndex","prevItem","at","isTable","Boolean","parentLineData","lineDataCandidate","getParent","rawMatchId","rawId","addLineData","parseLine","mainContent","footnoteDescriptionList","mdFootnoteContent","getMdFootnoteContent","fullContent","fullWrapperClassName","wrapperClassNameConfig","wrapperClassNameDefault","getFullWrapperClassName","classNameMdProThemeDark","classNameMdProThemeLight","classNameMdPro"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/library.js b/dist/library.js index 68182f6..4c73742 100644 --- a/dist/library.js +++ b/dist/library.js @@ -1,12 +1,8 @@ import "./src/markdown.scss"; import { defaultMarkdownConfig } from "./src/markdown-const"; -// eslint-disable-next-line import/no-default-export export { markdown, markdown as default } from "./src/markdown"; export { defaultMarkdownConfig, ThemeNameEnum } from "./src/markdown-const"; -// eslint-disable-next-line unicorn/no-keyword-prefix export const classNameMdProThemeDark = "md-pro-theme-dark"; -// eslint-disable-next-line unicorn/no-keyword-prefix export const classNameMdProThemeLight = "md-pro-theme-light"; -// eslint-disable-next-line unicorn/no-keyword-prefix export const classNameMdPro = defaultMarkdownConfig.wrapperClassName; //# sourceMappingURL=library.js.map \ No newline at end of file diff --git a/dist/library.js.map b/dist/library.js.map index 24f92b2..f47bd91 100644 --- a/dist/library.js.map +++ b/dist/library.js.map @@ -1 +1 @@ -{"version":3,"file":"library.js","sourceRoot":"","sources":["../www/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAC,qBAAqB,EAAqB,MAAM,sBAAsB,CAAC;AAE/E,oDAAoD;AACpD,OAAO,EAAC,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAAE,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAE1E,qDAAqD;AACrD,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAC3D,qDAAqD;AACrD,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAC7D,qDAAqD;AACrD,MAAM,CAAC,MAAM,cAAc,GAAW,qBAAqB,CAAC,gBAAgB,CAAC"} \ No newline at end of file +{"version":3,"file":"library.js","sourceRoot":"","sources":["../www/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAC,qBAAqB,EAAqB,MAAM,sBAAsB,CAAC;AAE/E,OAAO,EAAC,QAAQ,EAAE,QAAQ,IAAI,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAC,qBAAqB,EAAE,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CAAC;AAC3D,MAAM,CAAC,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAC7D,MAAM,CAAC,MAAM,cAAc,GAAW,qBAAqB,CAAC,gBAAgB,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/footnote/footnote-const.js b/dist/src/parser/footnote/footnote-const.js index 26e0625..2f73955 100644 --- a/dist/src/parser/footnote/footnote-const.js +++ b/dist/src/parser/footnote/footnote-const.js @@ -3,6 +3,5 @@ export const footnoteTypeMap = { "super": "super", }; // Export const footnotePrefix = 'fn-'; -// eslint-disable-next-line optimize-regex/optimize-regex export const findFootnoteMarkGlobalRegExp = /\S\[\^[^\]]+?\]|\S\^\[[^\]]+?\]/gu; //# sourceMappingURL=footnote-const.js.map \ No newline at end of file diff --git a/dist/src/parser/footnote/footnote-const.js.map b/dist/src/parser/footnote/footnote-const.js.map index fdc7fbe..f31e0a4 100644 --- a/dist/src/parser/footnote/footnote-const.js.map +++ b/dist/src/parser/footnote/footnote-const.js.map @@ -1 +1 @@ -{"version":3,"file":"footnote-const.js","sourceRoot":"","sources":["../../../../www/library/src/parser/footnote/footnote-const.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAkD;IAC1E,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,OAAO;CACnB,CAAC;AAEF,uCAAuC;AAEvC,yDAAyD;AACzD,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAAC"} \ No newline at end of file +{"version":3,"file":"footnote-const.js","sourceRoot":"","sources":["../../../../www/library/src/parser/footnote/footnote-const.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAkD;IAC1E,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,OAAO;CACnB,CAAC;AAEF,uCAAuC;AAEvC,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/footnote/footnote-helper.js b/dist/src/parser/footnote/footnote-helper.js index dde52f5..6bfbe80 100644 --- a/dist/src/parser/footnote/footnote-helper.js +++ b/dist/src/parser/footnote/footnote-helper.js @@ -1,5 +1,4 @@ export function getIsFootnoteDescription(lineContent) { - // eslint-disable-next-line optimize-regex/optimize-regex return /^\[\^[^\]]+\]:/u.test(lineContent); } export function getFootnoteById(id, list) { @@ -12,7 +11,7 @@ export function getFootnoteInlineLineContent(match) { } // See findFootnoteMarkGlobalRegExp export function getFootnoteMarkId(match) { - // eslint-disable-next-line unicorn/prefer-string-replace-all, newline-per-chained-call + // eslint-disable-next-line newline-per-chained-call return getFootnoteInlineLineContent(match).toLowerCase().replace(/\W/gu, " ").trim().replace(/\s+/gu, "-"); } export function getMdFootnoteContent(footnote) { diff --git a/dist/src/parser/footnote/footnote-helper.js.map b/dist/src/parser/footnote/footnote-helper.js.map index b13523e..fc61aed 100644 --- a/dist/src/parser/footnote/footnote-helper.js.map +++ b/dist/src/parser/footnote/footnote-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"footnote-helper.js","sourceRoot":"","sources":["../../../../www/library/src/parser/footnote/footnote-helper.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IACxD,yDAAyD;IACzD,OAAO,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAU,EAAE,IAAyB;IACjE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,QAAsB,EAAW,EAAE;QACjD,OAAO,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,KAAa;IACtD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC3C,uFAAuF;IACvF,OAAO,4BAA4B,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC/G,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAsB;IACvD,MAAM,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,GAAG,QAAQ,CAAC;IAE1D,IAAI,mBAAmB,EAAE,CAAC;QACtB,MAAM,EAAC,WAAW,EAAE,kBAAkB,EAAC,GAAG,mBAAmB,CAAC;QAC9D,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE5C,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC3E,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC7B,CAAC"} \ No newline at end of file +{"version":3,"file":"footnote-helper.js","sourceRoot":"","sources":["../../../../www/library/src/parser/footnote/footnote-helper.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,wBAAwB,CAAC,WAAmB;IACxD,OAAO,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,EAAU,EAAE,IAAyB;IACjE,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,QAAsB,EAAW,EAAE;QACjD,OAAO,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,KAAa;IACtD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC;AAED,mCAAmC;AACnC,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC3C,oDAAoD;IACpD,OAAO,4BAA4B,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC/G,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,QAAsB;IACvD,MAAM,EAAC,iBAAiB,EAAE,mBAAmB,EAAC,GAAG,QAAQ,CAAC;IAE1D,IAAI,mBAAmB,EAAE,CAAC;QACtB,MAAM,EAAC,WAAW,EAAE,kBAAkB,EAAC,GAAG,mBAAmB,CAAC;QAC9D,MAAM,KAAK,GAAG,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE5C,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;IAC3E,CAAC;IAED,OAAO,iBAAiB,CAAC;AAC7B,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/footnote/footnote.js b/dist/src/parser/footnote/footnote.js index ca49534..6e74eb8 100644 --- a/dist/src/parser/footnote/footnote.js +++ b/dist/src/parser/footnote/footnote.js @@ -26,7 +26,6 @@ export function getFootnoteList(lineContent) { return matchedList.map(matchToFootnote); } export function fromToFootnoteList(fromList, toList) { - // eslint-disable-next-line no-loops/no-loops for (const fromItem of fromList) { const { id, descriptionLineData } = fromItem; const candidateToExtend = toList.find((toItem) => { @@ -44,7 +43,6 @@ export function fromToFootnoteList(fromList, toList) { } export function addLineData(lineData, toList) { const { lineContent } = lineData; - // eslint-disable-next-line optimize-regex/optimize-regex const rawMatchId = /\[\^[^\]]+?\]:/u.exec(lineContent); if (!rawMatchId) { return; @@ -65,7 +63,6 @@ export function addLineData(lineData, toList) { } export function makeFootnoteSuper(fullLineContent, documentMeta) { return fullLineContent.replace(findFootnoteMarkGlobalRegExp, (match) => { - // eslint-disable-next-line unicorn/prefer-spread const charList = match.split(""); const [firstLetter] = charList; const { footnoteList } = documentMeta; diff --git a/dist/src/parser/footnote/footnote.js.map b/dist/src/parser/footnote/footnote.js.map index d8eb3f6..1570e1e 100644 --- a/dist/src/parser/footnote/footnote.js.map +++ b/dist/src/parser/footnote/footnote.js.map @@ -1 +1 @@ -{"version":3,"file":"footnote.js","sourceRoot":"","sources":["../../../../www/library/src/parser/footnote/footnote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,4BAA4B,EAAE,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAC,eAAe,EAAE,4BAA4B,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEnG,SAAS,eAAe,CAAC,KAAa;IAClC,MAAM,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAE9D,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;YACH,mBAAmB,EAAE,IAAI;YACzB,EAAE;YACF,iBAAiB;YACjB,IAAI,EAAE,eAAe,CAAC,KAAK;SAC9B,CAAC;IACN,CAAC;IAED,OAAO;QACH,mBAAmB,EAAE,IAAI;QACzB,EAAE;QACF,iBAAiB;QACjB,IAAI,EAAE,eAAe,CAAC,MAAM;KAC/B,CAAC;AACN,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,WAAmB;IAC/C,MAAM,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAEpE,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,EAAE,CAAC;IACd,CAAC;IAED,OAAO,WAAW,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;AAC5C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,QAA6B,EAAE,MAA2B;IACzF,6CAA6C;IAC7C,KAAK,MAAM,QAAQ,IAAI,QAAQ,EAAE,CAAC;QAC9B,MAAM,EAAC,EAAE,EAAE,mBAAmB,EAAC,GAAG,QAAQ,CAAC;QAC3C,MAAM,iBAA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AAE;QACnF,iDAAiD;QACjD,MAAM,QAAQ,GAAkB,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChD,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;QAC/B,MAAM,EAAC,YAAY,EAAC,GAAG,YAAY,CAAC;QACpC,MAAM,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAEpC,MAAM,QAAQ,GAAG,eAAe,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QAEnD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACd,CAAC;QAED,OAAO,GAAG,WAAW,aAAa,EAAE,WAAW,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;IACnG,CAAC,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file +{"version":3,"file":"footnote.js","sourceRoot":"","sources":["../../../../www/library/src/parser/footnote/footnote.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,4BAA4B,EAAE,eAAe,EAAC,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAC,eAAe,EAAE,4BAA4B,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAEnG,SAAS,eAAe,CAAC,KAAa;IAClC,MAAM,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;IACpC,MAAM,iBAAiB,GAAG,4BAA4B,CAAC,KAAK,CAAC,CAAC;IAE9D,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAC5B,OAAO;YACH,mBAAmB,EAAE,IAAI;YACzB,EAAE;YACF,iBAAiB;YACjB,IAAI,EAAE,eAAe,CAAC,KAAK;SAC9B,CAAC;IACN,CAAC;IAED,OAAO;QACH,mBAAmB,EAAE,IAAI;QACzB,EAAE;QACF,iBAAiB;QACjB,IAAI,EAAE,eAAe,CAAC,MAAM;KAC/B,CAAC;AACN,CAAC;AAED,MA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AAE,MAAM,CAAC,CAAC;IAE7C,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,CAAC,mBAAmB,GAAG,QAAQ,CAAC;QACxC,OAAO;IACX,CAAC;IAED,MAAM,CAAC,IAAI,CAAC;QACR,mBAAmB,EAAE,QAAQ;QAC7B,EAAE;QACF,iBAAiB,EAAE,WAAW;QAC9B,IAAI,EAAE,eAAe,CAAC,KAAK;KAC9B,CAAC,CAAC;AACP,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,eAAuB,EAAE,YAA8B;IACrF,OAAO,eAAe,CAAC,OAAO,CAAC,4BAA4B,EAAE,CAAC,KAAa,EAAU,EAAE;QACnF,MAAM,QAAQ,GAAkB,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAChD,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;QAC/B,MAAM,EAAC,YAAY,EAAC,GAAG,YAAY,CAAC;QACpC,MAAM,EAAE,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC;QAEpC,MAAM,QAAQ,GAAG,eAAe,CAAC,EAAE,EAAE,YAAY,CAAC,CAAC;QAEnD,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,OAAO,EAAE,CAAC;QACd,CAAC;QAED,OAAO,GAAG,WAAW,aAAa,EAAE,WAAW,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;IACnG,CAAC,CAAC,CAAC;AACP,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/parse-line.js b/dist/src/parser/parse-line.js index d613887..a42f992 100644 --- a/dist/src/parser/parse-line.js +++ b/dist/src/parser/parse-line.js @@ -5,9 +5,7 @@ import { oLParseDataList, selectorCodeList, selectorLineList, selectorList, sele import { addLineData, fromToFootnoteList, getFootnoteList } from "./footnote/footnote"; import { getIsFootnoteDescription } from "./footnote/footnote-helper"; import { getVariableData } from "./util/variable"; -// eslint-disable-next-line complexity function getShortInfo(trimmedLine) { - // eslint-disable-next-line no-loops/no-loops for (const selector of selectorList) { if (trimmedLine.startsWith(selector)) { return { @@ -16,7 +14,6 @@ function getShortInfo(trimmedLine) { }; } } - // eslint-disable-next-line no-loops/no-loops for (const lineSelector of selectorLineList) { if (trimmedLine.startsWith(lineSelector) && getIsAllSymbolsEqual(trimmedLine)) { return { @@ -25,7 +22,6 @@ function getShortInfo(trimmedLine) { }; } } - // eslint-disable-next-line no-loops/no-loops for (const oLParseData of oLParseDataList) { const { selector, regExpSearchSelector } = oLParseData; if (trimmedLine.search(regExpSearchSelector) === 0) { @@ -40,13 +36,12 @@ function getShortInfo(trimmedLine) { selector: emptyString, }; } -// eslint-disable-next-line complexity, max-params, max-statements, sonarjs/cognitive-complexity, @typescript-eslint/max-params +// eslint-disable-next-line complexity, max-params, max-statements, @typescript-eslint/max-params export function parseLine(line, lineIndex, allLineList, structuredLineDataList, savedLineDataList, documentMeta) { const trimmedLine = line.trim(); const isEmptyString = trimmedLine === emptyString; const rawSpaceCount = isEmptyString - ? // eslint-disable-next-line unicorn/prefer-at - savedLineDataList[savedLineDataList.length - 1].spaceCount + ? savedLineDataList[savedLineDataList.length - 1].spaceCount : line.search(/\S/u); const spaceCount = Math.max(0, rawSpaceCount); const defaultSelectorData = { @@ -67,11 +62,9 @@ export function parseLine(line, lineIndex, allLineList, structuredLineDataList, }; if (selectorCodeList.includes(selector)) { if (documentMeta.codeLineData && lineContent === emptyString) { - // eslint-disable-next-line no-param-reassign documentMeta.codeLineData = null; return true; } - // eslint-disable-next-line no-param-reassign documentMeta.codeLineData = lineData; } const { codeLineData } = documentMeta; @@ -85,17 +78,14 @@ export function parseLine(line, lineIndex, allLineList, structuredLineDataList, if (selectorTableList.includes(selector)) { if (tableLineData) { // Append new line in current block - // eslint-disable-next-line no-param-reassign tableLineData.additionalLineList.push(lineData.line); return true; } // Create new block - // eslint-disable-next-line no-param-reassign documentMeta.tableLineData = lineData; } else { // Close table block - // eslint-disable-next-line no-param-reassign documentMeta.tableLineData = null; } const variableData = getVariableData(lineContent); @@ -104,7 +94,6 @@ export function parseLine(line, lineIndex, allLineList, structuredLineDataList, const prevItem = savedLineDataList.at(prevItemIndex); const isTable = Boolean(prevItem && selectorTableList.includes(prevItem.selector)); if (variableData) { - // eslint-disable-next-line no-param-reassign variable[variableData.key] = variableData; } if (prevItem && prevItem.lineContent.length > 0 && !isTable && !variableData) { diff --git a/dist/src/parser/parse-line.js.map b/dist/src/parser/parse-line.js.map index 1cb4725..2286ecf 100644 --- a/dist/src/parser/parse-line.js.map +++ b/dist/src/parser/parse-line.js.map @@ -1 +1 @@ -{"version":3,"file":"parse-line.js","sourceRoot":"","sources":["../../../www/library/src/parser/parse-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,sCAAsC;AACtC,SAAS,YAAY,CAAC,WAAmB;IACrC,6CAA6C;IAC7C,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,CAAC;QAClC,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,OAAO;gBACH,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;gBAClE,QAAQ;aACX,CAAC;QACN,CAAC;IACL,CAAC;IAED,6CAA6C;IAC7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C;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,cAAc,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEjC,IAAI,wBAAwB,CAAC,WAAW,CAAC,EAAE,CAAC;QACxC,WAAW,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file +{"version":3,"file":"parse-line.js","sourceRoot":"","sources":["../../../www/library/src/parser/parse-line.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,wBAAwB,CAAC;AAEnD,OAAO,EAAC,SAAS,EAAE,oBAAoB,EAAC,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAY,EAAE,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AACvH,OAAO,EAAC,WAAW,EAAE,kBAAkB,EAAE,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACrF,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAC,eAAe,EAAC,MAAM,iBAAiB,CAAC;AAEhD,SAAS,YAAY,CAAC,WAAmB;IACrC,KAAK,MAAM,QAAQ,IAAI,YAAY,EAAE,CAAC;QAClC,IAAI,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,OAAO;gBACH,WAAW,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC;gBAClE,QAAQ;aACX,CAAC;QACN,CAAC;IACL,CAAC;IAED,KAAK,MAAM,YAAY,IAAI,gBAAgB,EAAE,CAAC;QAC1C,IAAI,WAAW,CAAC,UAAU,CAAC,YAAY,CAAC,IAAI,o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EAAE,YAAY,CAAC,CAAC;IACxC,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/util/is-tag.js b/dist/src/parser/util/is-tag.js index 85887e9..e7b028d 100644 --- a/dist/src/parser/util/is-tag.js +++ b/dist/src/parser/util/is-tag.js @@ -6,7 +6,6 @@ export function getIsUlItem(lineData) { return selectorULItemList.includes(lineData.selector); } export function getIsOlItem(lineData) { - // eslint-disable-next-line no-loops/no-loops for (const oLParseData of oLParseDataList) { if (oLParseData.selector === lineData.selector) { return true; diff --git a/dist/src/parser/util/is-tag.js.map b/dist/src/parser/util/is-tag.js.map index 6d77b47..6f979d0 100644 --- a/dist/src/parser/util/is-tag.js.map +++ b/dist/src/parser/util/is-tag.js.map @@ -1 +1 @@ -{"version":3,"file":"is-tag.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/is-tag.ts"],"names":[],"mappings":"AACA,OAAO,EACH,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACrB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,UAAU,WAAW,CAAC,QAAsB;IAC9C,OAAO,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAsB;IAC9C,OAAO,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAsB;IAC9C,6CAA6C;IAC7C,KAAK,MAAM,WAAW,IAAI,eAAe,EAAE,CAAC;QACxC,IAAI,WAAW,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC7C,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,SAAS,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AAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAsB;IAC9C,KAAK,MAAM,WAAW,IAAI,eAAe,EAAE,CAAC;QACxC,IAAI,WAAW,CAAC,QAAQ,KAAK,QAAQ,CAAC,QAAQ,EAAE,CAAC;YAC7C,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,QAAsB;IAC5C,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,QAAsB;IAC7C,OAAO,iBAAiB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,QAAsB;IAC5C,OAAO,gBAAgB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AACxD,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,QAAsB;IAClD,OAAO,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC9D,CAAC;AAED,MAAM,WAAW,GAAG,6BAA6B,CAAC;AAClD,MAAM,aAAa,GAAG,mBAAmB,CAAC;AAE1C,MAAM,UAAU,kBAAkB,CAAC,QAAsB;IACrD,MAAM,EAAC,WAAW,EAAC,GAAG,QAAQ,CAAC;IAE/B,OAAO,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC5F,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/util/navigation.js b/dist/src/parser/util/navigation.js index 16bdf86..68cd11b 100644 --- a/dist/src/parser/util/navigation.js +++ b/dist/src/parser/util/navigation.js @@ -1,5 +1,4 @@ import { emptyString } from "../../render/render-const"; -// eslint-disable-next-line complexity export function searchSiblingItem(lineData, lineDataList, direction) { const index = lineDataList.indexOf(lineData); if (index === -1) { @@ -24,7 +23,6 @@ export function getIsEdgeLine(lineData, lineDataList, direction) { } export function getParent(lineData, lineDataList) { const linaDataListLength = lineDataList.length; - // eslint-disable-next-line no-loops/no-loops for (let lineDataIndex = linaDataListLength - 1; lineDataIndex >= 0; lineDataIndex -= 1) { const lineDataCandidate = lineDataList[lineDataIndex]; if (lineDataCandidate.spaceCount < lineData.spaceCount) { diff --git a/dist/src/parser/util/navigation.js.map b/dist/src/parser/util/navigation.js.map index b2b2160..d78d553 100644 --- a/dist/src/parser/util/navigation.js.map +++ b/dist/src/parser/util/navigation.js.map @@ -1 +1 @@ -{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/navigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,sCAAsC;AACtC,MAAM,UAAU,iBAAiB,CAC7B,QAAsB,EACtB,YAAiC,EACjC,SAAiB;IAEjB,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE7C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,yDAAyD;QACzD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,YAAY,GAAG,KAAK,GAAG,SAAS,CAAC;IAEvC,MAAM,WAAW,GAAG,YAAY,IAAI,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAErF,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,WAAW,CAAC,WAAW,KAAK,WAAW,EAAE,CAAC;QAC1C,MAAM,gBAAgB,GAAG,SAAS,GAAG,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAE/D,OAAO,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC;IACvE,CAAC;IAED,OAAO,WAAW,CAAC;AACvB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,QAAsB,EAAE,YAAiC,EAAE,SAAiB;IACtG,MAAM,EAAC,QAAQ,EAAC,GAAG,QAAQ,CAAC;IAC5B,MAAM,SAAS,GAAG,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;IAEvE,OAAO,CAAC,SAAS,IAAI,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,QAAsB,EAAE,YAAiC;IAC/E,MAAM,kBAAkB,GAAG,YAAY,CAAC,MAAM,CAAC;IAE/C,6CAA6C;IAC7C,KAAK,IAAI,aAAa,GAAG,kBAAkB,GAAG,CAAC,EAAE,aAAa,IAAI,CAAC,EAAE,aAAa,IAAI,CAAC,EAAE,CAAC;QACtF,MAAM,iBAAiB,GAAG,YAAY,CAAC,aAAa,CAAC,CAAC;QAEtD,IAAI,iBAAiB,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU,EAAE,CAAC;YACrD,OAAO,iBAAiB,CAAC;QAC7B,CAAC;IACL,CAAC;IAED,qCAAqC;IAErC,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file +{"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/navigation.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,MAAM,UAAU,iBAAiB,CAC7B,QAAsB,EACtB,YAAiC,EACjC,SAAiB;IAEjB,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE7C,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;QACf,yDAAyD;QACzD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,YAAY,GAAG,KAA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No newline at end of file diff --git a/dist/src/parser/util/string.js b/dist/src/parser/util/string.js index 799e0e5..b86f8db 100644 --- a/dist/src/parser/util/string.js +++ b/dist/src/parser/util/string.js @@ -3,17 +3,14 @@ export function filterEmptyString(line) { return line.trim() !== emptyString; } export function cleanLine(line) { - // eslint-disable-next-line unicorn/prefer-string-replace-all return line.trim().replace(/\s+/gu, " "); } export function getIsAllSymbolsEqual(line) { - // eslint-disable-next-line unicorn/prefer-spread const charList = line.split(""); const [firstSymbol] = charList; if (!firstSymbol) { return true; } - // eslint-disable-next-line no-loops/no-loops for (const char of charList) { if (char !== firstSymbol) { return false; diff --git a/dist/src/parser/util/string.js.map b/dist/src/parser/util/string.js.map index 114dcfe..2233633 100644 --- a/dist/src/parser/util/string.js.map +++ b/dist/src/parser/util/string.js.map @@ -1 +1 @@ -{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,WAAW,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,6DAA6D;IAC7D,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC7C,iDAAiD;IACjD,MAAM,QAAQ,GAAkB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE/C,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;IAE/B,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,6CAA6C;IAC7C,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC1B,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACvB,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file +{"version":3,"file":"string.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/string.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAC;AAEtD,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,WAAW,CAAC;AACvC,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,IAAY;IAClC,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC7C,MAAM,QAAQ,GAAkB,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAE/C,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC;IAE/B,IAAI,CAAC,WAAW,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,KAAK,MAAM,IAAI,IAAI,QAAQ,EAAE,CAAC;QAC1B,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;YACvB,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC"} \ No newline at end of file diff --git a/dist/src/parser/util/variable.js b/dist/src/parser/util/variable.js index 723b933..800c39b 100644 --- a/dist/src/parser/util/variable.js +++ b/dist/src/parser/util/variable.js @@ -1,10 +1,9 @@ export function getVariableData(lineContent) { - // eslint-disable-next-line optimize-regex/optimize-regex const matchData = /\[([^^][\S\s]+?)\]:\s+?\S/u.exec(lineContent); if (!matchData) { return null; } - // eslint-disable-next-line prefer-destructuring, @typescript-eslint/prefer-destructuring + // eslint-disable-next-line @typescript-eslint/prefer-destructuring const key = matchData[1]; const value = lineContent.slice(lineContent.indexOf("]:") + 3).trim(); return { diff --git a/dist/src/parser/util/variable.js.map b/dist/src/parser/util/variable.js.map index c9ed6b5..45e2193 100644 --- a/dist/src/parser/util/variable.js.map +++ b/dist/src/parser/util/variable.js.map @@ -1 +1 @@ -{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/variable.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,WAAmB;IAC/C,yDAAyD;IACzD,MAAM,SAAS,GAAG,4BAA4B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEjE,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,yFAAyF;IACzF,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAEzB,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEtE,OAAO;QACH,GAAG;QACH,KAAK;KACR,CAAC;AACN,CAAC"} \ No newline at end of file +{"version":3,"file":"variable.js","sourceRoot":"","sources":["../../../../www/library/src/parser/util/variable.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,eAAe,CAAC,WAAmB;IAC/C,MAAM,SAAS,GAAG,4BAA4B,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAEjE,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,mEAAmE;IACnE,MAAM,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;IAEzB,MAAM,KAAK,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAEtE,OAAO;QACH,GAAG;QACH,KAAK;KACR,CAAC;AACN,CAAC"} \ No newline at end of file diff --git a/dist/src/render/render-helper.js b/dist/src/render/render-helper.js index 2f2611a..c5ed312 100644 --- a/dist/src/render/render-helper.js +++ b/dist/src/render/render-helper.js @@ -30,39 +30,27 @@ function imageReplacerVariable(matchedString, alt, srcVariable, documentMeta) { } return ``; } -// eslint-disable-next-line optimize-regex/optimize-regex const findImageRegExpGlobal = /!\[([\S\s]*?)\]\((\S+?)(?:\s+"([\S\s]+?)")?\)/gu; -// eslint-disable-next-line optimize-regex/optimize-regex const findImageVariableRegExpGlobal = /!\[([\S\s]*?)\]\[([\S\s]+?)\]/gu; export function makeImage(html, documentMeta) { - return (html - // eslint-disable-next-line unicorn/prefer-string-replace-all + return html .replace(findImageRegExpGlobal, imageReplacer) - // eslint-disable-next-line unicorn/prefer-string-replace-all .replace(findImageVariableRegExpGlobal, (matchedString, alt, srcVariable) => { return imageReplacerVariable(matchedString, alt, srcVariable, documentMeta); - })); + }); } -// eslint-disable-next-line optimize-regex/optimize-regex const findCheckboxCheckedRegExoGlobal = /\[x\]/giu; -// eslint-disable-next-line optimize-regex/optimize-regex const findCheckboxUncheckedRegExoGlobal = /\[\s\]/gu; export function makeCheckbox(html) { - return (html - // eslint-disable-next-line unicorn/prefer-string-replace-all + return html .replace(findCheckboxCheckedRegExoGlobal, '') - // eslint-disable-next-line unicorn/prefer-string-replace-all - .replace(findCheckboxUncheckedRegExoGlobal, '')); + .replace(findCheckboxUncheckedRegExoGlobal, ''); } export function isImageListOnly(lineContent) { - // eslint-disable-next-line unicorn/prefer-string-replace-all return lineContent.replace(findImageRegExpGlobal, "").trim() === emptyString; } -// eslint-disable-next-line optimize-regex/optimize-regex const findMailRegExpGlobal = /\[([\S\s]*?)\]\((\S+?)(?:\s+"([\S\s]+?)")?(?:\s+"([\S\s]+?)")?\)/gu; -// eslint-disable-next-line optimize-regex/optimize-regex const findLinkRegExpGlobal = /\[([\S\s]*?)\]\((\S+?)(?:\s+"([\S\s]+?)")?\)/gu; -// eslint-disable-next-line optimize-regex/optimize-regex const findLinkVariableRegExpGlobal = /\[([\S\s]*?)\]\[([\S\s]+?)\]/gu; // eslint-disable-next-line @typescript-eslint/max-params function mailReplacer(matchedString, linkText, href, title, subject) { @@ -96,21 +84,17 @@ function linkReplacerVariable(matchedString, linkText, hrefVariable, documentMet return `${text}`; } function defineVariables(html, documentMeta) { - // eslint-disable-next-line unicorn/prefer-string-replace-all return html.replace(findLinkVariableRegExpGlobal, (matchedString, linkText, hrefVariable) => { return linkReplacerVariable(matchedString, linkText, hrefVariable, documentMeta); }); } export function makeMail(html) { - // eslint-disable-next-line unicorn/prefer-string-replace-all return html.replace(findMailRegExpGlobal, mailReplacer); } export function makeLink(html) { - // eslint-disable-next-line unicorn/prefer-string-replace-all return html.replace(findLinkRegExpGlobal, linkReplacer); } export function getOlTypeBySelector(dataLineSelector) { - // eslint-disable-next-line no-loops/no-loops for (const oLParseData of oLParseDataList) { const { selector, olAttributeType } = oLParseData; if (dataLineSelector === selector) { @@ -124,7 +108,6 @@ export function getOlStart(trimmedLine) { const dotIndex = trimmedLine.indexOf("."); return trimmedLine.slice(0, dotIndex); } -// eslint-disable-next-line complexity, max-statements export function renderAdditionalLineList(lineData) { const { additionalLineList, config } = lineData; const { lineContent } = lineData; @@ -137,7 +120,6 @@ export function renderAdditionalLineList(lineData) { const additionalLineListLength = additionalLineList.length; const additionalLineLastIndex = additionalLineListLength - 1; const lineResult = Array.from({ length: additionalLineListLength }).fill(""); - // eslint-disable-next-line no-loops/no-loops for (let lineIndex = 0; lineIndex < additionalLineListLength; lineIndex += 1) { const additionalLine = additionalLineList[lineIndex]; const hasBreakLine = getHasEndBreakLine(additionalLine, useLineBreak); @@ -149,7 +131,6 @@ export function renderAdditionalLineList(lineData) { : additionalLineWithoutBreakLine + breakLineTag; } else { - // eslint-disable-next-line no-lonely-if lineResult[lineIndex] = lineIndex === additionalLineLastIndex ? additionalLine : additionalLine + space; } } diff --git a/dist/src/render/render-helper.js.map b/dist/src/render/render-helper.js.map index f39cd1b..d2f57a5 100644 --- a/dist/src/render/render-helper.js.map +++ b/dist/src/render/render-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"render-helper.js","sourceRoot":"","sources":["../../../www/library/src/render/render-helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAE1C,MAAM,UAAU,YAAY,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,WAAW,CAAC,CAAC;AACtD,CAAC;AAED,MAAM,UAAU,kBAAkB,CAAC,WAAmB,EAAE,YAAqB;IACzE,OAAO,YAAY,IAAI,eAAe,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC7D,CAAC;AAED,yDAAyD;AACzD,SAAS,aAAa,CAAC,aAAqB,EAAE,GAAY,EAAE,GAAW,EAAE,KAAc;IACnF,MAAM,sBAAsB,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC1F,MAAM,YAAY,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,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EAAE,YAAY,CAAC,CAAC;IAE5D,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAE3D,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,SAAS,EAAE,CAAC;QACZ,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACxD,CAAC;IAED,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,SAAS,EAAE,CAAC;QACZ,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACxD,CAAC;IAED,eAAe,GAAG,eAAe,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAEjE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;IAChD,OAAO,WAAW,CAAC,eAAe,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file +{"version":3,"file":"render-helper.js","sourceRoot":"","sources":["../../../www/library/src/render/render-helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAE,eAAe,EAAC,MAAM,2BAA2B,CAAC;AACzE,OAAO,EAAC,cAAc,EAAE,wBAAwB,EAAC,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAC,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,KAAK,EAAC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AACjE,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAE9C,MAAM,CAAC,MAAM,eAAe,GAAG,UAAU,CAAC;AAE1C,MAAM,UAAU,YAAY,CAAC,IAAY;IACrC,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,kBAAk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C;AACjD,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,YAA8B;IACzE,MAAM,EAAC,MAAM,EAAC,GAAG,YAAY,CAAC;IAC9B,MAAM,EAAC,SAAS,EAAC,GAAG,MAAM,CAAC;IAE3B,IAAI,eAAe,GAAG,iBAAiB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAE5D,eAAe,GAAG,SAAS,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAE3D,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,SAAS,EAAE,CAAC;QACZ,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACxD,CAAC;IAED,eAAe,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC5C,IAAI,SAAS,EAAE,CAAC;QACZ,eAAe,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;IACxD,CAAC;IAED,eAAe,GAAG,eAAe,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IAEjE,eAAe,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;IAChD,OAAO,WAAW,CAAC,eAAe,CAAC,CAAC;AACxC,CAAC"} \ No newline at end of file diff --git a/dist/src/render/render-pair-tag.js b/dist/src/render/render-pair-tag.js index 7777271..33a3861 100644 --- a/dist/src/render/render-pair-tag.js +++ b/dist/src/render/render-pair-tag.js @@ -1,6 +1,5 @@ import { pairTagSelectorList } from "../parser/parser-selector"; import { getTagIndexList, harArrayOverflow } from "./render-util"; -// eslint-disable-next-line complexity, max-statements export function getSelectorIndexList(html, pairTagSelector) { const { selector, equal } = pairTagSelector; const resultList = []; @@ -10,7 +9,6 @@ export function getSelectorIndexList(html, pairTagSelector) { return resultList; } let indexOfSelector = html.indexOf(selector, 0); - // eslint-disable-next-line no-loops/no-loops while (indexOfSelector !== -1) { const equalSymbolsMatch = html.slice(indexOfSelector).match(equal); if (!equalSymbolsMatch) { @@ -38,7 +36,6 @@ function addPairTag(html, pairTagSelector) { let selectorIndexList = getSelectorIndexList(html, pairTagSelector); // Remove indexes into tags, f.e. - text selectorIndexList = selectorIndexList.filter((selectorIndex) => { - // eslint-disable-next-line no-loops/no-loops for (const tagPairIndex of tagPairIndexList) { const selectorStart = selectorIndex; const selectorEnd = selectorIndex + selectorLength - 1; @@ -53,7 +50,6 @@ function addPairTag(html, pairTagSelector) { return html; } let resultTagPairedList = html.slice(0, selectorIndexList[0]); - // eslint-disable-next-line no-loops/no-loops for (let selectorIndexInList = 1; selectorIndexInList <= selectorIndexListLength; selectorIndexInList += 1) { const selectorIndex = selectorIndexList[selectorIndexInList]; const htmlPart = html.slice(selectorIndexList[selectorIndexInList - 1] + selectorLength, selectorIndex); @@ -63,7 +59,6 @@ function addPairTag(html, pairTagSelector) { } export function makePairTag(html) { let result = html; - // eslint-disable-next-line no-loops/no-loops for (const pairTagSelector of pairTagSelectorList) { result = addPairTag(result, pairTagSelector); } diff --git a/dist/src/render/render-pair-tag.js.map b/dist/src/render/render-pair-tag.js.map index 43958e9..1dce5e2 100644 --- a/dist/src/render/render-pair-tag.js.map +++ b/dist/src/render/render-pair-tag.js.map @@ -1 +1 @@ -{"version":3,"file":"render-pair-tag.js","sourceRoot":"","sources":["../../../www/library/src/render/render-pair-tag.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAEhE,sDAAsD;AACtD,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,eAAoC;IACnF,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAC,GAAG,eAAe,CAAC;IAE1C,MAAM,UAAU,GAAkB,EAAE,CAAC;IACrC,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;IAEvC,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;QACvB,6CAA6C;QAC7C,OAAO,UAAU,CAAC;IACtB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AA6C;IAC7C,KAAK,MAAM,eAAe,IAAI,mBAAmB,EAAE,CAAC;QAChD,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"} \ No newline at end of file +{"version":3,"file":"render-pair-tag.js","sourceRoot":"","sources":["../../../www/library/src/render/render-pair-tag.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,mBAAmB,EAAC,MAAM,2BAA2B,CAAC;AAE9D,OAAO,EAAC,eAAe,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAEhE,MAAM,UAAU,oBAAoB,CAAC,IAAY,EAAE,eAAoC;IACnF,MAAM,EAAC,QAAQ,EAAE,KAAK,EAAC,GAAG,eAAe,CAAC;IAE1C,MAAM,UAAU,GAAkB,EAAE,CAAC;IACrC,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;IAEvC,IAAI,cAAc,KAAK,CAAC,EAAE,CAAC;QACvB,6CAA6C;QAC7C,OAAO,UAAU,CAAC;IACtB,CAAC;IAED,IAAI,eAAe,GAAW,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;IAExD,OAAO,eAAe,KAAK,CAAC,CAAC,EAAE,CAAC;QAC5B,MAAM,iBAAiB,GAAyB,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEzF,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACrB,OAAO,EAAE,CAAC;QACd,CAAC;QAED,MAAM,CAAC,eAAe,CAAC,GAAG,iBAAiB,CAAC;QAC5C,MAAM,qBAAqB,GAAG,eAAe,CAAC,MAAM,CAAC;QAErD,IAAI,qBAAqB,KAAK,cAAc,EAAE,CAAC;YAC3C,UAAU,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACrC,CAAC;QAED,eAAe,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAA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K,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;IAEtE,KAAK,IAAI,mBAAmB,GAAG,CAAC,EAAE,mBAAmB,IAAI,uBAAuB,EAAE,mBAAmB,IAAI,CAAC,EAAE,CAAC;QACzG,MAAM,aAAa,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,GAAG,CAAC,CAAC,GAAG,cAAc,EAAE,aAAa,CAAC,CAAC;QAExG,mBAAmB,IAAI,mBAAmB,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;IACpG,CAAC;IAED,OAAO,mBAAmB,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,IAAY;IACpC,IAAI,MAAM,GAAG,IAAI,CAAC;IAElB,KAAK,MAAM,eAAe,IAAI,mBAAmB,EAAE,CAAC;QAChD,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"} \ No newline at end of file diff --git a/dist/src/render/render-table/render-table-helper.js b/dist/src/render/render-table/render-table-helper.js index db47991..8e0b1df 100644 --- a/dist/src/render/render-table/render-table-helper.js +++ b/dist/src/render/render-table/render-table-helper.js @@ -6,16 +6,13 @@ export function renderTableCellContent(line, documentMeta) { return renderInlineHtml(line, documentMeta).trim(); } export function isTableDivideLine(line) { - // eslint-disable-next-line unicorn/prefer-string-replace-all return line.replace(/[\s:|-]/gu, "") === emptyString; } export function lineToAlign(divideRaw) { const alignMark = ":"; const divide = divideRaw.trim(); - // eslint-disable-next-line unicorn/prefer-spread const divideCharList = divide.split(""); const [firstChar] = divideCharList; - // eslint-disable-next-line unicorn/prefer-at const lastChar = divide[divide.length - 1]; if (firstChar === lastChar && firstChar === alignMark) { return cellAlignTypeMap.center; diff --git a/dist/src/render/render-table/render-table-helper.js.map b/dist/src/render/render-table/render-table-helper.js.map index 38329a8..4eebe54 100644 --- a/dist/src/render/render-table/render-table-helper.js.map +++ b/dist/src/render/render-table/render-table-helper.js.map @@ -1 +1 @@ -{"version":3,"file":"render-table-helper.js","sourceRoot":"","sources":["../../../../www/library/src/render/render-table/render-table-helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAGtD,MAAM,UAAU,sBAAsB,CAAC,IAAY,EAAE,YAA8B;IAC/E,OAAO,gBAAgB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC1C,6DAA6D;IAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,KAAK,WAAW,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB;IACzC,MAAM,SAAS,GAAG,GAAG,CAAC;IACtB,MAAM,MAAM,GAAW,SAAS,CAAC,IAAI,EAAE,CAAC;IACxC,iDAAiD;IACjD,MAAM,cAAc,GAAkB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC;IACnC,6CAA6C;IAC7C,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE3C,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gBAAgB,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,gBAAgB,CAAC,KAAK,CAAC;IAClC,CAAC;IAED,OAAO,gBAAgB,CAAC,IAAI,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAsB,EAAE,UAAkB;IACnE,OAAO,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAgB,WAAW,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file +{"version":3,"file":"render-table-helper.js","sourceRoot":"","sources":["../../../../www/library/src/render/render-table/render-table-helper.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAC;AAGtD,MAAM,UAAU,sBAAsB,CAAC,IAAY,EAAE,YAA8B;IAC/E,OAAO,gBAAgB,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC,IAAI,EAAE,CAAC;AACvD,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,IAAY;IAC1C,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,KAAK,WAAW,CAAC;AACzD,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,SAAiB;IACzC,MAAM,SAAS,GAAG,GAAG,CAAC;IACtB,MAAM,MAAM,GAAW,SAAS,CAAC,IAAI,EAAE,CAAC;IAExC,MAAM,cAAc,GAAkB,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACvD,MAAM,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC;IAEnC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAE3C,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QACpD,OAAO,gBAAgB,CAAC,MAAM,CAAC;IACnC,CAAC;IAED,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QACzB,OAAO,gBAAgB,CAAC,KAAK,CAAC;IAClC,CAAC;IAED,OAAO,gBAAgB,CAAC,IAAI,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,QAAsB,EAAE,UAAkB;IACnE,OAAO,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,iBAAiB,CAAC,CAAC,GAAG,CAAgB,WAAW,CAAC,CAAC;AAChG,CAAC"} \ No newline at end of file diff --git a/dist/src/render/render-util.js b/dist/src/render/render-util.js index b6c9f86..6491c22 100644 --- a/dist/src/render/render-util.js +++ b/dist/src/render/render-util.js @@ -4,7 +4,6 @@ export function harArrayOverflow(arrayA, arrayB) { return !(endA < startB || endB < startA); } export function harArrayListOverflow(pairNumberArray, arrayList) { - // eslint-disable-next-line no-loops/no-loops for (const arrayInList of arrayList) { if (harArrayOverflow(pairNumberArray, arrayInList)) { return true; @@ -19,7 +18,6 @@ function getMatchIndexList(html, regExp) { return []; } let currentIndex = 0; - // eslint-disable-next-line no-loops/no-loops for (const matchedString of matchList) { const start = html.indexOf(matchedString, currentIndex); const end = start + matchedString.length - 1; diff --git a/dist/src/render/render-util.js.map b/dist/src/render/render-util.js.map index dd2c8d8..776f03b 100644 --- a/dist/src/render/render-util.js.map +++ b/dist/src/render/render-util.js.map @@ -1 +1 @@ -{"version":3,"file":"render-util.js","sourceRoot":"","sources":["../../../www/library/src/render/render-util.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,MAA2B,EAAE,MAA2B;IACrF,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC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EAAE,wBAAwB,CAAC,CAAC;AAC7D,CAAC"} \ No newline at end of file +{"version":3,"file":"render-util.js","sourceRoot":"","sources":["../../../www/library/src/render/render-util.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,gBAAgB,CAAC,MAA2B,EAAE,MAA2B;IACrF,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,MAAM,CAAC;IAE9B,OAAO,CAAC,CAAC,IAAI,GAAG,MAAM,IAAI,IAAI,GAAG,MAAM,CAAC,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,oBAAoB,CAChC,eAAoC,EACpC,SAAqC;IAErC,KAAK,MAAM,WAAW,IAAI,SAAS,EAAE,CAAC;QAClC,IAAI,gBAAgB,CAAC,eAAe,EAAE,WAAW,CAAC,EAAE,CAAC;YACjD,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;IAED,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY,EAAE,MAAc;IACnD,MAAM,UAAU,GAA+B,EAAE,CAAC;IAElD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAErC,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACd,CAAC;IAED,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,KAAK,MAAM,aAAa,IAAI,SAAS,EAAE,CAAC;QACpC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;QACxD,MAAM,GAAG,GAAG,KAAK,GAAG,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC;QAE7C,YAAY,GAAG,GAAG,CAAC;QAEnB,UAAU,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC;AAED,MAAM,uBAAuB,GAAG,gDAAgD,CAAC;AAEjF,MAAM,UAAU,eAAe,CAAC,IAAY;IACxC,OAAO,iBAAiB,CAAC,IAAI,EAAE,uBAAuB,CAAC,CAAC;AAC5D,CAAC;AAED,MAAM,wBAAwB,GAAG,0EAA0E,CAAC;AAE5G,MAAM,UAAU,gBAAgB,CAAC,IAAY;IACzC,OAAO,iBAAiB,CAAC,IAAI,EAAE,wBAAwB,CAAC,CAAC;AAC7D,CAAC"} \ No newline at end of file diff --git a/dist/src/render/render.js b/dist/src/render/render.js index 64ff20e..8f908a3 100644 --- a/dist/src/render/render.js +++ b/dist/src/render/render.js @@ -8,13 +8,13 @@ import { renderTable } from "./render-table/render-table"; export function renderChildList(lineDataList, documentMeta) { return lineDataList .map((lineData, lineDataIndex) => { - // eslint-disable-next-line no-use-before-define, @typescript-eslint/no-use-before-define + // eslint-disable-next-line @typescript-eslint/no-use-before-define return renderLineData(lineData, lineDataIndex, lineDataList, documentMeta); }) .map(addBreakLine) .join(emptyString); } -// eslint-disable-next-line complexity, sonarjs/cognitive-complexity, max-statements, @typescript-eslint/max-params +// eslint-disable-next-line max-statements, @typescript-eslint/max-params export function renderLineData(lineData, lineDataIndex, lineDataList, documentMeta) { const { selector, childList, lineContent, trimmedLine, additionalLineList, config } = lineData; const { codeHighlight } = config; diff --git a/dist/src/render/render.js.map b/dist/src/render/render.js.map index 051d0eb..98da007 100644 --- a/dist/src/render/render.js.map +++ b/dist/src/render/render.js.map @@ -1 +1 @@ -{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../www/library/src/render/render.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,WAAW,GACd,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC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AE1C,OAAO,GAAG,MAAM,OAAO,eAAe,QAAQ,OAAO,EAAE,CAAC;IAC5D,CAAC;IAED,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,MAAM,WAAW,GAAG,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,EAAC,QAAQ,EAAE,gBAAgB,EAAC,GAAG,QAAQ,CAAC;QAC9C,MAAM,MAAM,GAAG,WAAW;YACtB,CAAC,CAAC,aAAa,mBAAmB,CAAC,gBAAgB,CAAC,YAAY,UAAU,CAAC,WAAW,CAAC,IAAI;YAC3F,CAAC,CAAC,EAAE,CAAC;QACT,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAE1C,OAAO,GAAG,MAAM,OAAO,eAAe,QAAQ,OAAO,EAAE,CAAC;IAC5D,CAAC;IAED,IAAI,WAAW,KAAK,WAAW,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9F,OAAO,eAAe,CAAC;IAC3B,CAAC;IAED,OAAO,MAAM,eAAe,MAAM,CAAC;AACvC,CAAC"} \ No newline at end of file +{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../www/library/src/render/render.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,eAAe,EACf,SAAS,EACT,WAAW,EACX,SAAS,EACT,WAAW,EACX,kBAAkB,EAClB,UAAU,EACV,WAAW,GACd,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAC,aAAa,EAAC,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAC,wBAAwB,EAAC,MAAM,oCAAoC,CAAC;AAC5E,iEAAiE;AAEjE,OAAO,EACH,YAAY,EACZ,UAAU,EACV,mBAAmB,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C;IAED,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxB,MAAM,WAAW,GAAG,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;QAC9D,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,EAAE,YAAY,EAAE,CAAC,CAAC,CAAC;QAC5D,MAAM,EAAC,QAAQ,EAAE,gBAAgB,EAAC,GAAG,QAAQ,CAAC;QAC9C,MAAM,MAAM,GAAG,WAAW;YACtB,CAAC,CAAC,aAAa,mBAAmB,CAAC,gBAAgB,CAAC,YAAY,UAAU,CAAC,WAAW,CAAC,IAAI;YAC3F,CAAC,CAAC,EAAE,CAAC;QACT,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAE1C,OAAO,GAAG,MAAM,OAAO,eAAe,QAAQ,OAAO,EAAE,CAAC;IAC5D,CAAC;IAED,IAAI,WAAW,KAAK,WAAW,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,eAAe,CAAC,WAAW,CAAC,EAAE,CAAC;QAC9F,OAAO,eAAe,CAAC;IAC3B,CAAC;IAED,OAAO,MAAM,eAAe,MAAM,CAAC;AACvC,CAAC"} \ No newline at end of file diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..793abbe --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,444 @@ +/* eslint-disable sort-keys, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment */ +import eslintJs from "@eslint/js"; +import eslintConfigPrettier from "eslint-config-prettier"; +import typescriptEslint from "typescript-eslint"; +import sonarjs from "eslint-plugin-sonarjs"; +import eslintPluginUnicorn from "eslint-plugin-unicorn"; +import jest from "eslint-plugin-jest"; + +/** + * List of plugins to add + * react + * react-hooks + * babel - maybe not needed + * JSX-a11y + * filenames + * import + * optimize-regex + */ + +export default [ + eslintJs.configs.all, + ...typescriptEslint.configs.all, + jest.configs["flat/all"], + sonarjs.configs.recommended, + eslintConfigPrettier, + { + languageOptions: { + parserOptions: { + project: [ + "./tsconfig.json", + ], + ecmaVersion: 2020, + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, + }, + globals: { + JSX: true, + require: true, + module: true, + console: true, + }, + }, + plugins: { + unicorn: eslintPluginUnicorn, + // Sonarjs: sonarjs, + + }, + rules: { + // Jest + ...jest.configs["flat/all"].rules, + "jest/require-hook": [ + 2, + { + allowedFunctionCalls: [ + "innerInitialization", + ], + }, + ], + + // React, need to uncomment + // "react/jsx-uses-react": 2, + // "react/react-in-jsx-scope": 0, + // "react/jsx-no-bind": 0, + // "react/jsx-newline": 0, + // "react/jsx-filename-extension": [ + // 2, + // { + // "extensions": [ + // ".ts", + // ".tsx", + // ], + // }, + // ], + // "react/no-unused-prop-types": 2, + // "react/sort-comp": 2, + // "react/jsx-sort-props": [ + // 2, + // { + // "reservedFirst": false, + // "shorthandLast": false, + // "ignoreCase": false, + // "callbacksLast": false, + // "noSortAlphabetically": false, + // }, + // ], + // "react/jsx-closing-bracket-location": [ + // 2, + // "line-aligned", + // ], + // "react/forbid-component-props": 0, + // "react/jsx-indent-props": [ + // 2, + // "first", + // ], + // "react/jsx-no-literals": 0, + // "react/require-default-props": 0, + // "react/require-optimization": 0, + // "react/jsx-max-depth": [ + // 2, + // { + // "max": 5, + // }, + // ], + // "react/jsx-tag-spacing": [ + // 2, + // { + // "closingSlash": "never", + // "beforeSelfClosing": "always", + // "afterOpening": "never", + // "beforeClosing": "never", + // }, + // ], + // "react/jsx-max-props-per-line": [ + // 2, + // { + // "maximum": 5, + // }, + // ], + // "react/jsx-one-expression-per-line": 0, + // "react/state-in-constructor": 0, + // "react/no-set-state": 0, + + // React-hooks, need to uncomment + // "react-hooks/rules-of-hooks": 2, + // "react-hooks/exhaustive-deps": 2, + + // Babel, need to uncomment + // "babel/new-cap": 2, + // "babel/camelcase": 2, + // "babel/no-invalid-this": 2, + // "babel/object-curly-spacing": 2, + // "babel/quotes": 0, + // "babel/semi": 2, + // "babel/no-unused-expressions": 2, + // "babel/valid-typeof": 2, + + // JSX-a11y, need to uncomment + // Deprecated + // "jsx-a11y/label-has-for": 0, + // "jsx-a11y/no-access-key": 2, + // "jsx-a11y/no-autofocus": 2, + // "jsx-a11y/no-onchange": 2, + + // Filenames, need to uncomment + // "filenames/no-index": 2, + // "filenames/match-regex": [ + // 2, + // "^[a-z\\.\\-\\d]+$", + // True + // ], + // "filenames/match-exported": 0, + + // Import, need to uncomment + // "import/no-named-as-default-member": 0, + // "import/default": 2, + // "import/no-unused-modules": 2, + // "import/no-useless-path-segments": 2, + // "import/no-default-export": 2, + // "import/order": [ + // 2, + // { + // "newlines-between": "always-and-inside-groups", + // "groups": [ + // "builtin", + // "internal", + // "external", + // "parent", + // "sibling", + // "index" + // ] + // } + // ], + + // Optimize-regex, need to uncomment + // "optimize-regex/optimize-regex": 2, + + // Typescript + "@typescript-eslint/array-type": [ + 2, + { + "default": "generic", + }, + ], + "@typescript-eslint/ban-ts-comment": 1, + "@typescript-eslint/naming-convention": [ + 2, + { + selector: "typeAlias", + format: [ + "StrictPascalCase", + ], + suffix: [ + "Type", + ], + }, + { + selector: "enum", + format: [ + "StrictPascalCase", + ], + suffix: [ + "Enum", + ], + }, + ], + "@typescript-eslint/no-shadow": [ + 2, + { + builtinGlobals: false, + hoist: "all", + }, + ], + "@typescript-eslint/no-unused-vars": [ + 2, + { + varsIgnorePattern: "[iI]gnored", + }, + ], + "@typescript-eslint/no-use-before-define": 2, + "@typescript-eslint/no-misused-promises": [ + 2, + { + checksVoidReturn: { + arguments: true, + attributes: true, + properties: true, + returns: true, + variables: true, + }, + }, + ], + "@typescript-eslint/no-floating-promises": [ + 2, + { + ignoreIIFE: true, + }, + ], + "@typescript-eslint/no-unnecessary-boolean-literal-compare": 0, + // Typescript - defined by eslint + "@typescript-eslint/space-before-function-paren": 0, + "@typescript-eslint/indent": 0, + "@typescript-eslint/comma-dangle": 0, + "@typescript-eslint/no-magic-numbers": 0, + "@typescript-eslint/no-extra-parens": 0, + "@typescript-eslint/lines-around-comment": 0, + "@typescript-eslint/lines-between-class-members": 0, + "@typescript-eslint/block-spacing": 0, + "@typescript-eslint/quotes": 0, + "@typescript-eslint/use-unknown-in-catch-callback-variable": 0, + // TODO: enable this + "@typescript-eslint/prefer-readonly-parameter-types": 0, + // "@typescript-eslint/prefer-readonly-parameter-types": [ + // 2, + // { + // "allow": [ + // { + // "from": "package", + // "name": "Compiler", + // "package": "webpack" + // } + // ] + // } + // ], + + // Unicorn + "unicorn/prefer-string-replace-all": 0, + "unicorn/prefer-node-protocol": 2, + "unicorn/no-array-callback-reference": 0, + "unicorn/no-array-for-each": 0, + "unicorn/filename-case": 2, + "unicorn/no-array-reduce": 0, + "unicorn/no-null": 0, + "unicorn/no-fn-reference-in-iterator": 2, + "unicorn/prevent-abbreviations": [ + 2, + { + replacements: { + attr: false, + attrs: false, + arg: false, + args: false, + prop: false, + props: false, + prev: false, + dev: false, + evt: false, + src: false, + ref: false, + }, + }, + ], + + // eslint + "padded-blocks": [ + 2, + { + blocks: "never", + classes: "never", + switches: "never", + }, + ], + "func-style": [ + 2, + "declaration", + ], + "function-call-argument-newline": [ + 2, + "consistent", + ], + "max-len": [ + 2, + 120, + 4, + { + ignoreComments: true, + ignoreUrls: true, + }, + ], + "quote-props": [ + 2, + "as-needed", + { + keywords: true, + unnecessary: true, + numbers: true, + }, + ], + quotes: 0, + "sort-imports": 0, + "array-element-newline": [ + 2, + "consistent", + ], + "one-var": [ + 2, + { + "var": "always", + let: "never", + "const": "never", + }, + ], + "arrow-body-style": [ + 2, + "always", + ], + "max-statements": [ + 2, + 20, + ], + "dot-location": [ + 2, + "property", + ], + "max-lines-per-function": [ + 2, + 600, + ], + "object-property-newline": [ + 2, + { + allowAllPropertiesOnSameLine: true, + }, + ], + "multiline-ternary": 0, + "max-lines": [ + 2, + 1000, + ], + "newline-per-chained-call": [ + 2, + { + ignoreChainWithDepth: 4, + }, + ], + "function-paren-newline": 0, + "capitalized-comments": [ + 2, + "always", + { + ignorePattern: "ignored|webpackChunkName", + ignoreInlineComments: true, + }, + ], + "prefer-named-capture-group": 0, + "no-console": 0, + "no-warning-comments": 0, + "no-inline-comments": 0, + "multiline-comment-style": 0, + "no-ternary": 0, + "wrap-regex": 0, + "wrap-iife": [ + 2, + "inside", + ], + "max-params": [ + 2, + 5, + ], + "id-length": [ + 2, + { + min: 3, + max: 34, + exceptions: [ + "id", + "to", + "x", + "y", + ], + }, + ], + }, + }, + { + ignores: [ + // Dist + "dist/*", + "dist-server/*", + + // NPM + "node_modules/*", + + // Report + "coverage-ts/*", + "tsc-check/*", + "coverage/*", + + // Style's d.ts + // eslint-disable-next-line arrow-body-style, @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/no-unsafe-argument + pathToFile => /\S+\.s?css\.d\.ts/u.test(pathToFile), + + // Test + "test-backstop/*", + + // Static site + "static-site/*", + + // Storybook + "storybook-static/*", + ], + }, +]; diff --git a/flow-typed/markdown-pro.js b/flow-typed/markdown-pro.js index 7f70ada..6df34f7 100644 --- a/flow-typed/markdown-pro.js +++ b/flow-typed/markdown-pro.js @@ -1,6 +1,6 @@ // @flow -/* eslint-disable multiline-comment-style, capitalized-comments, line-comment-position, multiline-comment-style */ +/* eslint-disable capitalized-comments */ // TODO: you should uncomment this diff --git a/license b/license index 07ce202..53051ff 100644 --- a/license +++ b/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2023 Dzmitry Turautsou +Copyright (c) 2024 Dzmitry Turautsou Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index a5b2281..f3ed891 100644 --- a/package.json +++ b/package.json @@ -31,111 +31,118 @@ "/dist" ], "engines": { - "node": ">=16.0.0" + "node": ">=18.0.0" }, "scripts": { "front:start-dev": "cross-env NODE_ENV=development SIDE=front webpack-cli serve --progress", "front:start-dev:transpile-only": "cross-env NODE_ENV=development SIDE=front TS_TRANSPILE_ONLY=true webpack-cli serve --progress", "front:build": "cross-env NODE_ENV=production SIDE=front NODE_OPTIONS=--max-old-space-size=512 webpack --progress", - "_back:start": "cross-env NODE_ENV=production node ./dist-server/dist/index.js", - "_back:build": "cross-env NODE_ENV=production SIDE=back IS_SERVER_PROD_BUILD=true NODE_OPTIONS=--max-old-space-size=256 webpack --progress", - "_back:build:watch": "cross-env NODE_ENV=production SIDE=back webpack --progress --watch", - "_back:nodemon": "nodemon ./dist-server/dist/index.js", - "_build:prod:start": "npm run front:build && npm run back:build && npm run back:start", - "front:build-library": "cross-env NODE_ENV=production SIDE=front IS_BUILD_LIBRARY=true NODE_OPTIONS=--max-old-space-size=256 webpack --progress && npm run front:tsc-library", - "_make-static-site": "cross-env MAKE_STATIC_SITE=TRUE npm run build:prod:start", + "back:start": "cross-env NODE_ENV=production node ./dist-server/dist/index.js", + "back:build": "cross-env NODE_ENV=production SIDE=back IS_SERVER_PROD_BUILD=true NODE_OPTIONS=--max-old-space-size=512 webpack --progress", + "back:build:watch": "cross-env NODE_ENV=production SIDE=back webpack --progress --watch", + "back:nodemon": "nodemon ./dist-server/dist/index.js", + "build:prod:start": "npm run front:build && npm run back:build && npm run back:start", + "front:build-library": "cross-env NODE_ENV=production SIDE=front IS_BUILD_LIBRARY=true NODE_OPTIONS=--max-old-space-size=512 webpack --progress && npm run front:tsc-library", + "make-static-site": "cross-env MAKE_STATIC_SITE=TRUE npm run build:prod:start", "check": "npm run ts-coverage && npm run tsc && npm run eslint && npm run stylelint", "check:fix": "npm run prettier && npm run ts-coverage && npm run tsc && npm run eslint:fix && npm run stylelint:fix", "eslint": "eslint .", "eslint:fix": "eslint . --fix", + "eslint:watch": "npm-watch eslint", "stylelint": "stylelint ./**.scss", "stylelint:fix": "stylelint ./**.scss --fix", + "stylelint:watch": "npm-watch stylelint", "prettier": "prettier --write \"./**/*.(js|ts|tsx)\" --log-level warn", "tsc": "tsc -p ./tsconfig.json", + "tsc-init": "npx tsc --init", "tsc:watch": "tsc -p ./tsconfig.json --watch", "front:tsc-library": "tsc -p ./tsconfig.library.json && npm run front:tsc-library-css", - "front:tsc-library-css": "cross-env NODE_ENV=production SIDE=front IS_BUILD_LIBRARY=true ts-node ./webpack/util/library/css.ts", - "front:ts-coverage": "typescript-coverage-report --threshold=100 --strict=true --project ./www/", - "back:ts-coverage": "typescript-coverage-report --threshold=100 --strict=true --project ./server/", - "webpack:ts-coverage": "typescript-coverage-report --threshold=100 --strict=true --project ./webpack/", - "ts-coverage": "npm run front:ts-coverage && npm run back:ts-coverage && npm run webpack:ts-coverage", - "test:e2e": "jest --config='test-e2e/config/jest.config.js' ./test-e2e/ --runInBand", + "front:tsc-library-css": "cross-env NODE_ENV=production SIDE=front IS_BUILD_LIBRARY=true ts-node --files ./webpack/util/library/css.ts", + "ts-coverage": "rimraf coverage-ts && typescript-coverage-report --threshold=100 --strict=true --project ./", + "ts-coverage:watch": "npm-watch ts-coverage", + "test:e2e": "jest --config='test-e2e/config/jest.config.ts' ./test-e2e/ --runInBand", "test:unit": "jest --config='test-unit/config/jest.config.ts' ./www/ --runInBand", "test:unit:watch": "jest --config='test-unit/config/jest.config.ts' ./www/ --runInBand --watch", - "_backstop:approve": "backstop approve --config=./test-backstop/backstop-config.json", - "_backstop:test": "backstop test --config=./test-backstop/backstop-config.json", + "backstop:approve": "backstop approve --config=./test-backstop/backstop-config.json", + "backstop:test": "backstop test --config=./test-backstop/backstop-config.json", "pre-commit-hook": "npm run check", "_postinstall": "cp ./git-hooks/pre-commit ./.git/hooks", - "zip": "zip -9 --exclude=*node_modules* --exclude=*.git* -r my-project_`git symbolic-ref --short HEAD`-`date +%Y-%m-%d--%H-%M-%S` ./" + "__start-site": "sudo nginx -c ~/user/master-git/db-cms/site/nginx/nginx.site.conf -g 'daemon off;'", + "lighthouse:run": "ts-node --project ./tsconfig.lighthouse.json --files ./lighthouse/lighthouse.ts", + "storybook:start-dev": "storybook dev -p 6006 -c storybook", + "storybook:build": "storybook build -c storybook", + "clean-install-windows": "rd .\\node_modules\\ -r; npm i" }, "devDependencies": { - "@babel/core": "^7.23.6", - "@babel/plugin-transform-strict-mode": "^7.23.3", - "@testing-library/react": "^14.1.2", + "@babel/core": "^7.24.5", + "@babel/plugin-transform-strict-mode": "^7.24.1", + "@eslint/js": "^9.3.0", + "@storybook/addon-actions": "^8.1.1", + "@storybook/addon-essentials": "^8.1.1", + "@storybook/addon-interactions": "^8.1.1", + "@storybook/addon-links": "^8.1.1", + "@storybook/blocks": "^8.1.1", + "@storybook/builder-webpack5": "^8.1.1", + "@storybook/manager-webpack5": "^6.5.16", + "@storybook/react": "^8.1.1", + "@storybook/react-webpack5": "^8.1.1", + "@storybook/testing-library": "^0.2.2", + "@testing-library/react": "^15.0.7", "@types/circular-dependency-plugin": "^5.0.8", "@types/duplicate-package-checker-webpack-plugin": "^2.1.5", "@types/script-ext-html-webpack-plugin": "^2.1.6", - "@types/webpack-bundle-analyzer": "^4.6.3", + "@types/webpack-bundle-analyzer": "^4.7.0", "@types/webpack-node-externals": "^3.0.4", - "@typescript-eslint/eslint-plugin": "^6.15.0", - "@typescript-eslint/parser": "^6.15.0", - "ajv": "^8.12.0", + "@typescript-eslint/eslint-plugin": "^7.9.0", + "@typescript-eslint/parser": "^7.9.0", + "ajv": "^8.13.0", "babel-loader": "^9.1.3", + "backstopjs": "^6.3.23", "circular-dependency-plugin": "^5.2.2", "clean-webpack-plugin": "^4.0.0", - "copy-webpack-plugin": "^11.0.0", + "copy-webpack-plugin": "^12.0.2", "cross-env": "^7.0.3", - "css-loader": "^6.8.1", - "css-minimizer-webpack-plugin": "^5.0.1", - "css-modules-typescript-loader": "^4.0.1", + "css-loader": "^7.1.1", + "css-minimizer-webpack-plugin": "^7.0.0", + "css-module-typescript-loader": "^0.0.3", "duplicate-package-checker-webpack-plugin": "^3.0.0", - "eslint": "^8.56.0", + "eslint": "^9.3.0", "eslint-config-prettier": "^9.1.0", - "eslint-import-resolver-typescript": "^3.6.1", - "eslint-plugin-babel": "^5.3.1", - "eslint-plugin-filenames": "^1.3.2", - "eslint-plugin-import": "^2.29.1", - "eslint-plugin-jest": "^27.6.0", - "eslint-plugin-jsx-a11y": "^6.8.0", - "eslint-plugin-no-loops": "^0.3.0", - "eslint-plugin-no-use-extend-native": "^0.5.0", - "eslint-plugin-optimize-regex": "^1.2.1", - "eslint-plugin-prettier": "^5.1.1", - "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-react": "^7.33.2", - "eslint-plugin-react-hooks": "^4.6.0", - "eslint-plugin-sonarjs": "^0.23.0", - "eslint-plugin-typescript-sort-keys": "^3.1.0", - "eslint-plugin-unicorn": "^50.0.1", + "eslint-plugin-jest": "^28.5.0", + "eslint-plugin-sonarjs": "^1.0.3", + "eslint-plugin-unicorn": "^53.0.0", "html-webpack-plugin": "^5.6.0", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "jest-transform-stub": "^2.0.0", - "mini-css-extract-plugin": "^2.7.6", - "nodemon": "^3.0.2", - "postcss": "^8.4.32", - "prettier": "^3.1.1", - "puppeteer": "^21.6.1", + "lighthouse": "^12.0.0", + "mini-css-extract-plugin": "^2.9.0", + "nodemon": "^3.1.0", + "npm-watch": "^0.13.0", + "prettier": "^3.2.5", + "puppeteer": "^22.9.0", "raw-loader": "^4.0.2", - "sass": "^1.69.5", - "sass-loader": "^13.3.2", + "sass": "^1.77.2", + "sass-loader": "^14.2.1", "script-ext-html-webpack-plugin": "^2.1.5", - "style-loader": "^3.3.3", - "stylelint": "^16.0.2", - "stylelint-config-standard": "^35.0.0", - "stylelint-config-standard-scss": "^12.0.0", + "storybook": "^8.1.1", + "style-loader": "^4.0.0", + "stylelint": "^16.5.0", + "stylelint-config-standard": "^36.0.0", + "stylelint-config-standard-scss": "^13.1.0", "stylelint-order": "^6.0.4", - "stylelint-scss": "^6.0.0", - "terser-webpack-plugin": "^5.3.9", - "ts-jest": "^29.1.1", + "stylelint-scss": "^6.3.0", + "terser-webpack-plugin": "^5.3.10", + "ts-jest": "^29.1.2", "ts-loader": "^9.5.1", "ts-node": "^10.9.2", - "typescript": "^5.3.3", - "typescript-coverage-report": "^0.8.0", - "webpack": "^5.89.0", - "webpack-bundle-analyzer": "^4.10.1", + "typescript": "^5.4.5", + "typescript-coverage-report": "^1.0.0", + "typescript-eslint": "^7.9.0", + "webpack": "^5.91.0", + "webpack-bundle-analyzer": "^4.10.2", "webpack-cli": "^5.1.4", - "webpack-dev-server": "^4.15.1", + "webpack-dev-server": "^5.0.4", "webpack-node-externals": "^3.0.0" } } diff --git a/test-unit/config/jest.config.ts b/test-unit/config/jest.config.ts index 4f99f2f..c575410 100644 --- a/test-unit/config/jest.config.ts +++ b/test-unit/config/jest.config.ts @@ -21,5 +21,4 @@ const config: Config = { testTimeout: 10e3, }; -// eslint-disable-next-line import/no-default-export export default config; diff --git a/tsconfig.json b/tsconfig.json index ae72ffa..a719643 100755 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,4 @@ { - // https://www.typescriptlang.org/tsconfig - // "files": ["fie.ts"], // Specifies an allowlist of files to include in the program. An error occurs if any of the files can’t be found. // "extends": "./tsconfig.json", // The value of extends is a string which contains a path to another configuration file to inherit from. The path may use Node.js style resolution. // "include": ["src/**/*", "tests/**/*"], // Specifies an array of filenames or patterns to include in the program. These filenames are resolved relative to the directory containing the tsconfig.json file. @@ -14,93 +12,170 @@ "./node_modules/" ], "compilerOptions": { - // -=-=-=- Type Checking -=-=-=- - "allowUnreachableCode": true, - "allowUnusedLabels": false, - "alwaysStrict": true, - "exactOptionalPropertyTypes": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "strict": true, - "strictBindCallApply": true, - "strictFunctionTypes": true, - "strictNullChecks": true, - "strictPropertyInitialization": true, - "useUnknownInCatchVariables": true, - "noFallthroughCasesInSwitch": false, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": false, - "noUncheckedIndexedAccess": false, + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "es2019", + /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + "jsx": "react-jsx", + /* Specify what JSX code is generated. */ + "experimentalDecorators": true, + /* Enable experimental support for legacy experimental decorators. */ + "emitDecoratorMetadata": false, + /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + "noLib": false, + /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": false, + /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - // -=-=-=- Modules -=-=-=- + /* Modules */ "module": "es2020", + /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ "moduleResolution": "node", + /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ "resolveJsonModule": true, - // no defined my config - // "allowArbitraryExtensions": false, - // "allowImportingTsExtensions": false, - // "allowUmdGlobalAccess": false, - // "baseUrl": false, - // "customConditions": false, - // "moduleSuffixes": false, - // "noResolve": false, - // "paths": false, - // "resolvePackageJsonExports": false, - // "resolvePackageJsonImports": false, - // "rootDir": false, - // "rootDirs": false, - // "typeRoots": false, - // "types": false, + /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + "allowJs": false, + /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": false, + /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ - // -=-=-=- Emit -=-=-=- + /* Emit */ "declaration": false, - "downlevelIteration": false, + /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ "emitDeclarationOnly": false, - "noEmit": false, - "noEmitHelpers": false, + /* Only output d.ts files and not JavaScript files. */ + "sourceMap": true, + /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ "outDir": "./tsc-check/", - "preserveConstEnums": true, + /* Specify an output folder for all emitted files. */ "removeComments": false, - "sourceMap": true, - "newLine": "lf", + /* Disable emitting comments. */ + "noEmit": false, + /* Disable emitting files from a compilation. */ "importHelpers": false, + /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + "downlevelIteration": false, + /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ "emitBOM": false, - // no defined my config - // "declarationDir": false, - // "declarationMap": false, - // "importsNotUsedAsValues": false, - // "inlineSourceMap": false, - // "inlineSources": false, - // "mapRoot": false, - // "noEmitOnError": false, - // "outFile": false, - // "preserveValueImports": false, - // "sourceRoot": false, - // "stripInternal": false, + /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + "newLine": "lf", + /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + "noEmitHelpers": false, + /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + "preserveConstEnums": true, + /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ - // -=-=-=- JavaScript Support -=-=-=- - "allowJs": false, - "checkJs": false, - // no defined my config - // "maxNodeModuleJsDepth": false, + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + "allowSyntheticDefaultImports": true, + /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, + /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, + /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, + /* Enable all strict type-checking options. */ + "noImplicitAny": true, + /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + "strictNullChecks": true, + /* When type checking, take into account 'null' and 'undefined'. */ + "strictFunctionTypes": true, + /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + "strictBindCallApply": true, + /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + "strictPropertyInitialization": true, + /* Check for class properties that are declared but not set in the constructor. */ + "noImplicitThis": true, + /* Enable error reporting when 'this' is given the type 'any'. */ + "useUnknownInCatchVariables": true, + /* Default catch clause variables as 'unknown' instead of 'any'. */ + "alwaysStrict": true, + /* Ensure 'use strict' is always emitted. */ + "noUnusedLocals": false, + /* Enable error reporting when local variables aren't read. */ + "noUnusedParameters": false, + /* Raise an error when a function parameter isn't read. */ + "exactOptionalPropertyTypes": true, + /* Interpret optional property types as written, rather than adding 'undefined'. */ + "noImplicitReturns": true, + /* Enable error reporting for codepaths that do not explicitly return in a function. */ + "noFallthroughCasesInSwitch": true, + /* Enable error reporting for fallthrough cases in switch statements. */ + "noUncheckedIndexedAccess": false, + /* Add 'undefined' to a type when accessed using an index. */ + "noImplicitOverride": true, + /* Ensure overriding members in derived classes are marked with an override modifier. */ + "noPropertyAccessFromIndexSignature": false, + /* Enforces using indexed accessors for keys declared using an indexed type. */ + "allowUnusedLabels": false, + /* Disable error reporting for unused labels. */ + "allowUnreachableCode": true, + /* Disable error reporting for unreachable code. */ + + /* Completeness */ + "skipDefaultLibCheck": true, + /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true, + /* Skip type checking all .d.ts files. */ + + ////////////// + // Appendix // + ////////////// + + // https://www.typescriptlang.org/tsconfig // -=-=-=- Editor Support -=-=-=- "disableSizeLimit": true, // no defined my config // "plugins": false, - // -=-=-=- Interop Constraints -=-=-=- - "allowSyntheticDefaultImports": true, - "esModuleInterop": true, - // no defined my config - // "forceConsistentCasingInFileNames": false, - // "isolatedModules": false, - // "preserveSymlinks": false, - // "verbatimModuleSyntax": false, - // -=-=-=- Backwards Compatibility -=-=-=- "noStrictGenericChecks": false, // no defined my config @@ -111,21 +186,6 @@ // "suppressExcessPropertyErrors": false, // "suppressImplicitAnyIndexErrors": false, - // -=-=-=- Language and Environment -=-=-=- - "emitDecoratorMetadata": false, - "experimentalDecorators": true, - "jsx": "react-jsx", - "noLib": false, - "target": "es2019", - "useDefineForClassFields": false, - // no defined my config - // "jsxFactory": false, - // "jsxFragmentFactory": false, - // "jsxImportSource": false, - // "lib": false, - // "moduleDetection": false, - // "reactNamespace": false, - // -=-=-=- Compiler Diagnostics -=-=-=- // no defined my config // "diagnostics": false, @@ -136,27 +196,13 @@ // "listFiles": false, // "traceResolution": false, - // -=-=-=- Projects -=-=-=- - // no defined my config - // "composite": false, - // "disableReferencedProjectLoad": false, - // "disableSolutionSearching": false, - // "disableSourceOfProjectReferenceRedirect": false, - // "incremental": false, - // "tsBuildInfoFile": false, - // -=-=-=- Output Formatting -=-=-=- "pretty": true, "noErrorTruncation": true, "preserveWatchOutput": false, - // -=-=-=- Command Line -=-=-=- // no properties yet - // -=-=-=- Completeness -=-=-=- - "skipLibCheck": true, - "skipDefaultLibCheck": true, - // -=-=-=- Watch Options -=-=-=- "assumeChangesOnlyAffectDirectDependencies": false }, diff --git a/tsconfig.lighthouse.json b/tsconfig.lighthouse.json new file mode 100644 index 0000000..6b73b5e --- /dev/null +++ b/tsconfig.lighthouse.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "ts-node": { + "compilerOptions": { + "target": "ES2020", + "moduleResolution": "NodeNext", + "module": "CommonJS", + "exactOptionalPropertyTypes": false, + } + } +} diff --git a/webpack.config.ts b/webpack.config.ts index a99e465..b12b7f8 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -1,2 +1 @@ -// eslint-disable-next-line import/no-default-export export {webpackRunningConfig as default} from "./webpack/running-config"; diff --git a/webpack/config.ts b/webpack/config.ts index c26d73d..dfef228 100644 --- a/webpack/config.ts +++ b/webpack/config.ts @@ -1,11 +1,11 @@ -/* eslint id-match: 0, optimize-regex/optimize-regex: 0, multiline-comment-style: 0, capitalized-comments: 0 */ +/* eslint id-match: 0, multiline-comment-style: 0, capitalized-comments: 0 */ import {env} from "node:process"; export const pathToStaticFileFolder = "/static/"; -const modeDevelopmentName = "development" as const; -const modeProductionName = "production" as const; +const modeDevelopmentName = "development"; +const modeProductionName = "production"; export const isDevelopment: boolean = env.NODE_ENV === modeDevelopmentName; export const isProduction: boolean = env.NODE_ENV === modeProductionName; diff --git a/webpack/running-config.ts b/webpack/running-config.ts index b4cc35e..4ca6603 100644 --- a/webpack/running-config.ts +++ b/webpack/running-config.ts @@ -1,11 +1,11 @@ -/* eslint-disable multiline-comment-style, capitalized-comments, line-comment-position */ +/* eslint-disable capitalized-comments */ import {cwd} from "node:process"; import path from "node:path"; import type {Configuration} from "webpack"; import nodeExternals from "webpack-node-externals"; -// import {BundleAnalyzerPlugin} from 'webpack-bundle-analyzer'; +// import {BundleAnalyzerPlugin} from "webpack-bundle-analyzer"; import {optimization} from "./setting/optimization"; import {rules} from "./setting/module/rules"; @@ -14,6 +14,7 @@ import {extensions} from "./setting/resolve/extensions"; import {plugins} from "./setting/plugins"; import {devServer} from "./setting/dev-server"; import {watchOptions} from "./setting/watch-options"; +import {experiments} from "./setting/experiments"; const externals = [nodeExternals()]; // in order to ignore all modules in node_modules folder const externalsPresets = {node: true}; // in order to ignore built-in modules like path, fs, etc. @@ -33,9 +34,10 @@ import { const configFront: Configuration = { devtool: "source-map", // isDevelopment ? 'source-map' : false, entry: ["./www/css/root.scss", "./www/root.tsx"], + experiments: {...experiments}, mode: nodeEnvironment, module: {rules}, - // optimization, + optimization: {...optimization}, output: { assetModuleFilename: isDevelopment ? "build-asset/[name]----[hash:6][ext][query]" @@ -48,8 +50,7 @@ const configFront: Configuration = { }, plugins, resolve: {alias, extensions}, - // devServer, - // watchOptions: watchOptions, + watchOptions: {...watchOptions}, }; const configBack: Configuration = { @@ -68,8 +69,10 @@ const configLibraryFront: Configuration = { externals, externalsPresets, mode: nodeEnvironment, - module: {rules}, // optimization, + module: {rules}, + // devServer, + optimization: {...optimization}, output: { filename: "index.js", libraryTarget: "commonjs2", @@ -77,10 +80,9 @@ const configLibraryFront: Configuration = { pathinfo: false, publicPath: "", }, - // devServer, plugins, resolve: {alias, extensions}, - // watchOptions: watchOptions, + watchOptions: {...watchOptions}, /* externals: { @@ -109,7 +111,6 @@ const configLibraryFront: Configuration = { const configLibraryBack: Configuration = {...configLibraryFront}; -// eslint-disable-next-line complexity const webpackConfig: Configuration = ((): Configuration => { if (isBuildLibrary && isFront) { return configLibraryFront; @@ -130,6 +131,6 @@ const webpackConfig: Configuration = ((): Configuration => { throw new Error("Can not detect config"); })(); -// webpackConfig?.plugins?.push(new BundleAnalyzerPlugin()); +// webpackConfig.plugins?.push(new BundleAnalyzerPlugin()); -export const webpackRunningConfig = {...webpackConfig, devServer, optimization, watchOptions}; +export const webpackRunningConfig = {...webpackConfig, devServer}; diff --git a/webpack/setting/dev-server.ts b/webpack/setting/dev-server.ts index 6b544e6..71350ca 100644 --- a/webpack/setting/dev-server.ts +++ b/webpack/setting/dev-server.ts @@ -1,4 +1,4 @@ -/* eslint-disable multiline-comment-style, capitalized-comments */ +/* eslint-disable capitalized-comments */ import type {WebpackOptionsNormalized} from "webpack"; import {webpackDevServerPort} from "../config"; @@ -26,19 +26,22 @@ export const devServer: WebpackOptionsNormalized["devServer"] = { // writeToDisk: isBack, // inline: false, port: webpackDevServerPort, - proxy: { - // TODO: need watch nginx - "/api-image/": { + proxy: [ + { + // TODO: need watch nginx + context: ["/api-image/"], target: `http://127.0.0.1:${serverPort}/`, }, - "/api/": { + { + context: ["/api/"], target: `http://127.0.0.1:${serverPort}/`, }, - // TODO: need watch nginx - "/static-file/": { + { + // TODO: need watch nginx + context: ["/static-file/"], target: `http://127.0.0.1:${serverPort}/`, }, - }, + ], // hotOnly: false, // disableHostCheck: true, // proxy: { diff --git a/webpack/setting/experiments.ts b/webpack/setting/experiments.ts new file mode 100644 index 0000000..42acbaa --- /dev/null +++ b/webpack/setting/experiments.ts @@ -0,0 +1,6 @@ +import type {Configuration} from "webpack"; + +export const experiments: Configuration["experiments"] = { + asyncWebAssembly: true, + syncWebAssembly: true, +}; diff --git a/webpack/setting/module/rules.ts b/webpack/setting/module/rules.ts index 900383b..0d71edf 100644 --- a/webpack/setting/module/rules.ts +++ b/webpack/setting/module/rules.ts @@ -14,6 +14,10 @@ const styleLoader = { const cssLoader = isProduction ? MiniCssExtractPlugin.loader : styleLoader; export const rules: Array = [ + { + test: /\.wasm$/u, + type: "asset/inline", + }, { exclude: /node_modules/u, test: /\.tsx?$/u, @@ -47,7 +51,7 @@ export const rules: Array = [ test: /\.scss$/u, use: [ cssLoader, - "css-modules-typescript-loader", + "css-module-typescript-loader", { loader: "css-loader", options: { @@ -68,7 +72,7 @@ export const rules: Array = [ test: /\.css$/u, use: [ cssLoader, - "css-modules-typescript-loader", + "css-module-typescript-loader", { loader: "css-loader", options: { diff --git a/webpack/setting/optimization.ts b/webpack/setting/optimization.ts index 1ea4050..cb11b23 100644 --- a/webpack/setting/optimization.ts +++ b/webpack/setting/optimization.ts @@ -1,3 +1,5 @@ +/* eslint-disable capitalized-comments */ + import type {Configuration} from "webpack"; import CssMinimizerPlugin from "css-minimizer-webpack-plugin"; @@ -12,7 +14,6 @@ const optimizationDevelopment: Configuration["optimization"] = { runtimeChunk: true, splitChunks: { cacheGroups: { - // eslint-disable-next-line sort-keys main: { chunks: "all", name: "main", @@ -27,7 +28,7 @@ const optimizationDevelopment: Configuration["optimization"] = { reuseExistingChunk: true, test: /www\/assets/u, }, - // eslint-disable-next-line sort-keys + util: { chunks: "all", name: "util", @@ -51,7 +52,7 @@ const optimizationDevelopment: Configuration["optimization"] = { reuseExistingChunk: true, test: /www\/layout/u, }, - // eslint-disable-next-line sort-keys + provider: { chunks: "all", name: "provider", @@ -59,7 +60,7 @@ const optimizationDevelopment: Configuration["optimization"] = { reuseExistingChunk: true, test: /www\/provider/u, }, - // eslint-disable-next-line sort-keys + service: { chunks: "all", name: "service", @@ -68,7 +69,6 @@ const optimizationDevelopment: Configuration["optimization"] = { test: /www\/service/u, }, - // eslint-disable-next-line sort-keys style: { chunks: "all", name: "style", @@ -76,7 +76,14 @@ const optimizationDevelopment: Configuration["optimization"] = { reuseExistingChunk: true, test: /\.s?css$/u, }, - // eslint-disable-next-line sort-keys + // files: { + // chunks: 'all', + // name: 'files', + // priority: -15, + // test: fileRegExp, + // reuseExistingChunk: true, + // }, + vendor: { chunks: "all", name: "vendor", @@ -95,7 +102,7 @@ const optimizationProduction: Configuration["optimization"] = { terserOptions: { compress: { passes: 3, - // eslint-disable-next-line camelcase, id-match, babel/camelcase + // eslint-disable-next-line camelcase pure_funcs: ["console.log"], }, output: { diff --git a/webpack/setting/plugins.ts b/webpack/setting/plugins.ts index 3c39f0b..9bbbe81 100644 --- a/webpack/setting/plugins.ts +++ b/webpack/setting/plugins.ts @@ -20,9 +20,8 @@ const filePathPrefix = isProduction ? "./../" : "./"; const date = new Date(); const definePluginParameters: Record = { - // eslint-disable-next-line id-match // BUILD_DATE: JSON.stringify(date.getTime()), - // eslint-disable-next-line id-match + BUILD_DATE_H: JSON.stringify(date.toISOString()), // NODE_ENV: JSON.stringify(NODE_ENV), IS_PRODUCTION: JSON.stringify(isProduction), @@ -44,7 +43,7 @@ const staticFilesSiteList: Array = ["favicon.ico"].map { // eslint-disable-next-line no-undefined return undefined; diff --git a/webpack/setting/resolve/alias.ts b/webpack/setting/resolve/alias.ts index 64ce55b..d2be80e 100644 --- a/webpack/setting/resolve/alias.ts +++ b/webpack/setting/resolve/alias.ts @@ -6,7 +6,7 @@ import {isProduction, isFront} from "../../config"; const duplicateList = ["rc-resize-observer", "isarray", "@segment/isodate", "component-type", "uuid", "ms", "debug"]; export const alias: Record = duplicateList.reduce( - (accumulator: Readonly>, packageName: string) => { + (accumulator: Record, packageName: string) => { return {...accumulator, [packageName]: path.resolve(cwd(), `node_modules/${packageName}`)}; }, {} diff --git a/webpack/util/library/css.ts b/webpack/util/library/css.ts index e829f01..959768e 100644 --- a/webpack/util/library/css.ts +++ b/webpack/util/library/css.ts @@ -47,5 +47,5 @@ async function innerInitialization(): Promise { console.log("[css util] declaration for css has been added."); } -// eslint-disable-next-line unicorn/prefer-top-level-await, @typescript-eslint/no-floating-promises +// eslint-disable-next-line @typescript-eslint/no-floating-promises innerInitialization(); diff --git a/www/const.ts b/www/const.ts index e66d9c8..a42c635 100644 --- a/www/const.ts +++ b/www/const.ts @@ -1,5 +1,4 @@ /* global BUILD_DATE_H, IS_PRODUCTION */ -/* eslint-disable id-match */ export const selector = { appWrapper: ".js-app-wrapper", diff --git a/www/demo/init.ts b/www/demo/init.ts index 82b7105..a419555 100644 --- a/www/demo/init.ts +++ b/www/demo/init.ts @@ -47,9 +47,8 @@ export function init( useLineBreak: useLineBreak.checked, }); - // eslint-disable-next-line no-param-reassign output.innerHTML = markdownHtml; - // eslint-disable-next-line no-param-reassign + outputDebug.textContent = formatHtml(markdownHtml); refreshResult(); } diff --git a/www/library/library.ts b/www/library/library.ts index 9c2254e..be52e4d 100644 --- a/www/library/library.ts +++ b/www/library/library.ts @@ -2,15 +2,11 @@ import "./src/markdown.scss"; import {defaultMarkdownConfig, type ThemeNameEnum} from "./src/markdown-const"; -// eslint-disable-next-line import/no-default-export export {markdown, markdown as default} from "./src/markdown"; export {defaultMarkdownConfig, ThemeNameEnum} from "./src/markdown-const"; -// eslint-disable-next-line unicorn/no-keyword-prefix export const classNameMdProThemeDark = "md-pro-theme-dark"; -// eslint-disable-next-line unicorn/no-keyword-prefix export const classNameMdProThemeLight = "md-pro-theme-light"; -// eslint-disable-next-line unicorn/no-keyword-prefix export const classNameMdPro: string = defaultMarkdownConfig.wrapperClassName; export type MarkdownConfigType = Readonly<{ diff --git a/www/library/src/parser/footnote/footnote-const.ts b/www/library/src/parser/footnote/footnote-const.ts index 5203784..e3ae4ce 100644 --- a/www/library/src/parser/footnote/footnote-const.ts +++ b/www/library/src/parser/footnote/footnote-const.ts @@ -7,5 +7,4 @@ export const footnoteTypeMap: {[key in FootnoteTypeType]: FootnoteTypeType} = { // Export const footnotePrefix = 'fn-'; -// eslint-disable-next-line optimize-regex/optimize-regex export const findFootnoteMarkGlobalRegExp = /\S\[\^[^\]]+?\]|\S\^\[[^\]]+?\]/gu; diff --git a/www/library/src/parser/footnote/footnote-helper.ts b/www/library/src/parser/footnote/footnote-helper.ts index 3a78170..99dab4b 100644 --- a/www/library/src/parser/footnote/footnote-helper.ts +++ b/www/library/src/parser/footnote/footnote-helper.ts @@ -1,7 +1,6 @@ import type {FootnoteType} from "../parser-type"; export function getIsFootnoteDescription(lineContent: string): boolean { - // eslint-disable-next-line optimize-regex/optimize-regex return /^\[\^[^\]]+\]:/u.test(lineContent); } @@ -17,7 +16,7 @@ export function getFootnoteInlineLineContent(match: string): string { // See findFootnoteMarkGlobalRegExp export function getFootnoteMarkId(match: string): string { - // eslint-disable-next-line unicorn/prefer-string-replace-all, newline-per-chained-call + // eslint-disable-next-line newline-per-chained-call return getFootnoteInlineLineContent(match).toLowerCase().replace(/\W/gu, " ").trim().replace(/\s+/gu, "-"); } diff --git a/www/library/src/parser/footnote/footnote.ts b/www/library/src/parser/footnote/footnote.ts index c6d1f25..012d961 100644 --- a/www/library/src/parser/footnote/footnote.ts +++ b/www/library/src/parser/footnote/footnote.ts @@ -35,7 +35,6 @@ export function getFootnoteList(lineContent: string): Array { } export function fromToFootnoteList(fromList: Array, toList: Array): void { - // eslint-disable-next-line no-loops/no-loops for (const fromItem of fromList) { const {id, descriptionLineData} = fromItem; const candidateToExtend = toList.find((toItem: FootnoteType): boolean => { @@ -54,7 +53,6 @@ export function fromToFootnoteList(fromList: Array, toList: Array< export function addLineData(lineData: LineDataType, toList: Array): void { const {lineContent} = lineData; - // eslint-disable-next-line optimize-regex/optimize-regex const rawMatchId = /\[\^[^\]]+?\]:/u.exec(lineContent); if (!rawMatchId) { @@ -82,7 +80,6 @@ export function addLineData(lineData: LineDataType, toList: Array) export function makeFootnoteSuper(fullLineContent: string, documentMeta: DocumentMetaType): string { return fullLineContent.replace(findFootnoteMarkGlobalRegExp, (match: string): string => { - // eslint-disable-next-line unicorn/prefer-spread const charList: Array = match.split(""); const [firstLetter] = charList; const {footnoteList} = documentMeta; diff --git a/www/library/src/parser/parse-line.ts b/www/library/src/parser/parse-line.ts index d0f9dc6..770d536 100644 --- a/www/library/src/parser/parse-line.ts +++ b/www/library/src/parser/parse-line.ts @@ -8,9 +8,7 @@ import {addLineData, fromToFootnoteList, getFootnoteList} from "./footnote/footn import {getIsFootnoteDescription} from "./footnote/footnote-helper"; import {getVariableData} from "./util/variable"; -// eslint-disable-next-line complexity function getShortInfo(trimmedLine: string): ShortLineInfoType { - // eslint-disable-next-line no-loops/no-loops for (const selector of selectorList) { if (trimmedLine.startsWith(selector)) { return { @@ -20,7 +18,6 @@ function getShortInfo(trimmedLine: string): ShortLineInfoType { } } - // eslint-disable-next-line no-loops/no-loops for (const lineSelector of selectorLineList) { if (trimmedLine.startsWith(lineSelector) && getIsAllSymbolsEqual(trimmedLine)) { return { @@ -30,7 +27,6 @@ function getShortInfo(trimmedLine: string): ShortLineInfoType { } } - // eslint-disable-next-line no-loops/no-loops for (const oLParseData of oLParseDataList) { const {selector, regExpSearchSelector} = oLParseData; @@ -48,7 +44,7 @@ function getShortInfo(trimmedLine: string): ShortLineInfoType { }; } -// eslint-disable-next-line complexity, max-params, max-statements, sonarjs/cognitive-complexity, @typescript-eslint/max-params +// eslint-disable-next-line complexity, max-params, max-statements, @typescript-eslint/max-params export function parseLine( line: string, lineIndex: number, @@ -60,8 +56,7 @@ export function parseLine( const trimmedLine = line.trim(); const isEmptyString = trimmedLine === emptyString; const rawSpaceCount = isEmptyString - ? // eslint-disable-next-line unicorn/prefer-at - savedLineDataList[savedLineDataList.length - 1].spaceCount + ? savedLineDataList[savedLineDataList.length - 1].spaceCount : line.search(/\S/u); const spaceCount = Math.max(0, rawSpaceCount); const defaultSelectorData: ShortLineInfoType = { @@ -85,11 +80,10 @@ export function parseLine( if (selectorCodeList.includes(selector)) { if (documentMeta.codeLineData && lineContent === emptyString) { - // eslint-disable-next-line no-param-reassign documentMeta.codeLineData = null; return true; } - // eslint-disable-next-line no-param-reassign + documentMeta.codeLineData = lineData; } @@ -108,16 +102,16 @@ export function parseLine( if (selectorTableList.includes(selector)) { if (tableLineData) { // Append new line in current block - // eslint-disable-next-line no-param-reassign + tableLineData.additionalLineList.push(lineData.line); return true; } // Create new block - // eslint-disable-next-line no-param-reassign + documentMeta.tableLineData = lineData; } else { // Close table block - // eslint-disable-next-line no-param-reassign + documentMeta.tableLineData = null; } @@ -129,7 +123,6 @@ export function parseLine( const isTable = Boolean(prevItem && selectorTableList.includes(prevItem.selector)); if (variableData) { - // eslint-disable-next-line no-param-reassign variable[variableData.key] = variableData; } diff --git a/www/library/src/parser/util/is-tag.ts b/www/library/src/parser/util/is-tag.ts index 102dddf..b738690 100644 --- a/www/library/src/parser/util/is-tag.ts +++ b/www/library/src/parser/util/is-tag.ts @@ -18,7 +18,6 @@ export function getIsUlItem(lineData: LineDataType): boolean { } export function getIsOlItem(lineData: LineDataType): boolean { - // eslint-disable-next-line no-loops/no-loops for (const oLParseData of oLParseDataList) { if (oLParseData.selector === lineData.selector) { return true; diff --git a/www/library/src/parser/util/navigation.ts b/www/library/src/parser/util/navigation.ts index df496d4..9587ce0 100644 --- a/www/library/src/parser/util/navigation.ts +++ b/www/library/src/parser/util/navigation.ts @@ -1,7 +1,6 @@ import type {LineDataType} from "../parser-type"; import {emptyString} from "../../render/render-const"; -// eslint-disable-next-line complexity export function searchSiblingItem( lineData: LineDataType, lineDataList: Array, @@ -41,7 +40,6 @@ export function getIsEdgeLine(lineData: LineDataType, lineDataList: Array): LineDataType | null { const linaDataListLength = lineDataList.length; - // eslint-disable-next-line no-loops/no-loops for (let lineDataIndex = linaDataListLength - 1; lineDataIndex >= 0; lineDataIndex -= 1) { const lineDataCandidate = lineDataList[lineDataIndex]; diff --git a/www/library/src/parser/util/string.ts b/www/library/src/parser/util/string.ts index eb39f3d..38cc62e 100644 --- a/www/library/src/parser/util/string.ts +++ b/www/library/src/parser/util/string.ts @@ -5,12 +5,10 @@ export function filterEmptyString(line: string): boolean { } export function cleanLine(line: string): string { - // eslint-disable-next-line unicorn/prefer-string-replace-all return line.trim().replace(/\s+/gu, " "); } export function getIsAllSymbolsEqual(line: string): boolean { - // eslint-disable-next-line unicorn/prefer-spread const charList: Array = line.split(""); const [firstSymbol] = charList; @@ -19,7 +17,6 @@ export function getIsAllSymbolsEqual(line: string): boolean { return true; } - // eslint-disable-next-line no-loops/no-loops for (const char of charList) { if (char !== firstSymbol) { return false; diff --git a/www/library/src/parser/util/variable.ts b/www/library/src/parser/util/variable.ts index 569606f..30b4240 100644 --- a/www/library/src/parser/util/variable.ts +++ b/www/library/src/parser/util/variable.ts @@ -1,14 +1,13 @@ import type {VariableType} from "../parser-type"; export function getVariableData(lineContent: string): VariableType | null { - // eslint-disable-next-line optimize-regex/optimize-regex const matchData = /\[([^^][\S\s]+?)\]:\s+?\S/u.exec(lineContent); if (!matchData) { return null; } - // eslint-disable-next-line prefer-destructuring, @typescript-eslint/prefer-destructuring + // eslint-disable-next-line @typescript-eslint/prefer-destructuring const key = matchData[1]; const value = lineContent.slice(lineContent.indexOf("]:") + 3).trim(); diff --git a/www/library/src/render/render-helper.ts b/www/library/src/render/render-helper.ts index 3d382e5..1926189 100644 --- a/www/library/src/render/render-helper.ts +++ b/www/library/src/render/render-helper.ts @@ -47,51 +47,36 @@ function imageReplacerVariable( return ``; } -// eslint-disable-next-line optimize-regex/optimize-regex const findImageRegExpGlobal = /!\[([\S\s]*?)\]\((\S+?)(?:\s+"([\S\s]+?)")?\)/gu; -// eslint-disable-next-line optimize-regex/optimize-regex const findImageVariableRegExpGlobal = /!\[([\S\s]*?)\]\[([\S\s]+?)\]/gu; export function makeImage(html: string, documentMeta: DocumentMetaType): string { - return ( - html - // eslint-disable-next-line unicorn/prefer-string-replace-all - .replace(findImageRegExpGlobal, imageReplacer) - // eslint-disable-next-line unicorn/prefer-string-replace-all - .replace( - findImageVariableRegExpGlobal, - (matchedString: string, alt: unknown, srcVariable: string): string => { - return imageReplacerVariable(matchedString, alt, srcVariable, documentMeta); - } - ) - ); + return html + + .replace(findImageRegExpGlobal, imageReplacer) + + .replace(findImageVariableRegExpGlobal, (matchedString: string, alt: unknown, srcVariable: string): string => { + return imageReplacerVariable(matchedString, alt, srcVariable, documentMeta); + }); } -// eslint-disable-next-line optimize-regex/optimize-regex const findCheckboxCheckedRegExoGlobal = /\[x\]/giu; -// eslint-disable-next-line optimize-regex/optimize-regex const findCheckboxUncheckedRegExoGlobal = /\[\s\]/gu; export function makeCheckbox(html: string): string { - return ( - html - // eslint-disable-next-line unicorn/prefer-string-replace-all - .replace(findCheckboxCheckedRegExoGlobal, '') - // eslint-disable-next-line unicorn/prefer-string-replace-all - .replace(findCheckboxUncheckedRegExoGlobal, '') - ); + return html + + .replace(findCheckboxCheckedRegExoGlobal, '') + + .replace(findCheckboxUncheckedRegExoGlobal, ''); } export function isImageListOnly(lineContent: string): boolean { - // eslint-disable-next-line unicorn/prefer-string-replace-all return lineContent.replace(findImageRegExpGlobal, "").trim() === emptyString; } -// eslint-disable-next-line optimize-regex/optimize-regex const findMailRegExpGlobal = /\[([\S\s]*?)\]\((\S+?)(?:\s+"([\S\s]+?)")?(?:\s+"([\S\s]+?)")?\)/gu; -// eslint-disable-next-line optimize-regex/optimize-regex const findLinkRegExpGlobal = /\[([\S\s]*?)\]\((\S+?)(?:\s+"([\S\s]+?)")?\)/gu; -// eslint-disable-next-line optimize-regex/optimize-regex const findLinkVariableRegExpGlobal = /\[([\S\s]*?)\]\[([\S\s]+?)\]/gu; // eslint-disable-next-line @typescript-eslint/max-params @@ -142,7 +127,6 @@ function linkReplacerVariable( } function defineVariables(html: string, documentMeta: DocumentMetaType): string { - // eslint-disable-next-line unicorn/prefer-string-replace-all return html.replace( findLinkVariableRegExpGlobal, (matchedString: string, linkText: string, hrefVariable: string): string => { @@ -152,17 +136,14 @@ function defineVariables(html: string, documentMeta: DocumentMetaType): string { } export function makeMail(html: string): string { - // eslint-disable-next-line unicorn/prefer-string-replace-all return html.replace(findMailRegExpGlobal, mailReplacer); } export function makeLink(html: string): string { - // eslint-disable-next-line unicorn/prefer-string-replace-all return html.replace(findLinkRegExpGlobal, linkReplacer); } export function getOlTypeBySelector(dataLineSelector: SelectorType): OlAttributeType { - // eslint-disable-next-line no-loops/no-loops for (const oLParseData of oLParseDataList) { const {selector, olAttributeType} = oLParseData; @@ -182,7 +163,6 @@ export function getOlStart(trimmedLine: string): string { return trimmedLine.slice(0, dotIndex); } -// eslint-disable-next-line complexity, max-statements export function renderAdditionalLineList(lineData: LineDataType): string { const {additionalLineList, config} = lineData; const {lineContent} = lineData; @@ -198,7 +178,6 @@ export function renderAdditionalLineList(lineData: LineDataType): string { const additionalLineLastIndex = additionalLineListLength - 1; const lineResult: Array = Array.from({length: additionalLineListLength}).fill(""); - // eslint-disable-next-line no-loops/no-loops for (let lineIndex = 0; lineIndex < additionalLineListLength; lineIndex += 1) { const additionalLine = additionalLineList[lineIndex]; const hasBreakLine = getHasEndBreakLine(additionalLine, useLineBreak); @@ -211,7 +190,6 @@ export function renderAdditionalLineList(lineData: LineDataType): string { ? additionalLineWithoutBreakLine : additionalLineWithoutBreakLine + breakLineTag; } else { - // eslint-disable-next-line no-lonely-if lineResult[lineIndex] = lineIndex === additionalLineLastIndex ? additionalLine : additionalLine + space; } } diff --git a/www/library/src/render/render-pair-tag.ts b/www/library/src/render/render-pair-tag.ts index 241bc9f..7b48600 100644 --- a/www/library/src/render/render-pair-tag.ts +++ b/www/library/src/render/render-pair-tag.ts @@ -3,7 +3,6 @@ import {pairTagSelectorList} from "../parser/parser-selector"; import {getTagIndexList, harArrayOverflow} from "./render-util"; -// eslint-disable-next-line complexity, max-statements export function getSelectorIndexList(html: string, pairTagSelector: PairTagSelectorType): Array { const {selector, equal} = pairTagSelector; @@ -17,7 +16,6 @@ export function getSelectorIndexList(html: string, pairTagSelector: PairTagSelec let indexOfSelector: number = html.indexOf(selector, 0); - // eslint-disable-next-line no-loops/no-loops while (indexOfSelector !== -1) { const equalSymbolsMatch: Array | null = html.slice(indexOfSelector).match(equal); @@ -56,7 +54,6 @@ function addPairTag(html: string, pairTagSelector: PairTagSelectorType): string // Remove indexes into tags, f.e. - text selectorIndexList = selectorIndexList.filter((selectorIndex: number): boolean => { - // eslint-disable-next-line no-loops/no-loops for (const tagPairIndex of tagPairIndexList) { const selectorStart = selectorIndex; const selectorEnd = selectorIndex + selectorLength - 1; @@ -77,7 +74,6 @@ function addPairTag(html: string, pairTagSelector: PairTagSelectorType): string let resultTagPairedList: string = html.slice(0, selectorIndexList[0]); - // eslint-disable-next-line no-loops/no-loops for (let selectorIndexInList = 1; selectorIndexInList <= selectorIndexListLength; selectorIndexInList += 1) { const selectorIndex = selectorIndexList[selectorIndexInList]; const htmlPart = html.slice(selectorIndexList[selectorIndexInList - 1] + selectorLength, selectorIndex); @@ -91,7 +87,6 @@ function addPairTag(html: string, pairTagSelector: PairTagSelectorType): string export function makePairTag(html: string): string { let result = html; - // eslint-disable-next-line no-loops/no-loops for (const pairTagSelector of pairTagSelectorList) { result = addPairTag(result, pairTagSelector); } diff --git a/www/library/src/render/render-table/render-table-helper.ts b/www/library/src/render/render-table/render-table-helper.ts index d902082..2a91a85 100644 --- a/www/library/src/render/render-table/render-table-helper.ts +++ b/www/library/src/render/render-table/render-table-helper.ts @@ -11,17 +11,16 @@ export function renderTableCellContent(line: string, documentMeta: DocumentMetaT } export function isTableDivideLine(line: string): boolean { - // eslint-disable-next-line unicorn/prefer-string-replace-all return line.replace(/[\s:|-]/gu, "") === emptyString; } export function lineToAlign(divideRaw: string): CellAlignType { const alignMark = ":"; const divide: string = divideRaw.trim(); - // eslint-disable-next-line unicorn/prefer-spread + const divideCharList: Array = divide.split(""); const [firstChar] = divideCharList; - // eslint-disable-next-line unicorn/prefer-at + const lastChar = divide[divide.length - 1]; if (firstChar === lastChar && firstChar === alignMark) { diff --git a/www/library/src/render/render-util.ts b/www/library/src/render/render-util.ts index 41484cd..ec0bd9f 100644 --- a/www/library/src/render/render-util.ts +++ b/www/library/src/render/render-util.ts @@ -11,7 +11,6 @@ export function harArrayListOverflow( pairNumberArray: PairNumberArrayType, arrayList: Array ): boolean { - // eslint-disable-next-line no-loops/no-loops for (const arrayInList of arrayList) { if (harArrayOverflow(pairNumberArray, arrayInList)) { return true; @@ -32,7 +31,6 @@ function getMatchIndexList(html: string, regExp: RegExp): Array, documentMeta: DocumentMetaType): string { return lineDataList .map((lineData: LineDataType, lineDataIndex: number): string => { - // eslint-disable-next-line no-use-before-define, @typescript-eslint/no-use-before-define + // eslint-disable-next-line @typescript-eslint/no-use-before-define return renderLineData(lineData, lineDataIndex, lineDataList, documentMeta); }) .map(addBreakLine) .join(emptyString); } -// eslint-disable-next-line complexity, sonarjs/cognitive-complexity, max-statements, @typescript-eslint/max-params +// eslint-disable-next-line max-statements, @typescript-eslint/max-params export function renderLineData( lineData: LineDataType, lineDataIndex: number, diff --git a/www/library/src/test/fixture/header.ts b/www/library/src/test/fixture/header.ts index 6c1e809..40296b6 100644 --- a/www/library/src/test/fixture/header.ts +++ b/www/library/src/test/fixture/header.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureHeader = { input: ` #header 1 diff --git a/www/library/src/test/fixture/image.ts b/www/library/src/test/fixture/image.ts index a0475e8..8d175a6 100644 --- a/www/library/src/test/fixture/image.ts +++ b/www/library/src/test/fixture/image.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureImage = { input: ` ### Images diff --git a/www/library/src/test/fixture/link.ts b/www/library/src/test/fixture/link.ts index e385b1f..3d04a91 100644 --- a/www/library/src/test/fixture/link.ts +++ b/www/library/src/test/fixture/link.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureLink = { input: ` You can use like this [link](http://example.com) diff --git a/www/library/src/test/fixture/mix-1.ts b/www/library/src/test/fixture/mix-1.ts index b13fae9..dc5d4c0 100644 --- a/www/library/src/test/fixture/mix-1.ts +++ b/www/library/src/test/fixture/mix-1.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureMix1 = { input: ` ### Mix 1 diff --git a/www/library/src/test/fixture/parse-link.ts b/www/library/src/test/fixture/parse-link.ts index 8057d27..d926324 100644 --- a/www/library/src/test/fixture/parse-link.ts +++ b/www/library/src/test/fixture/parse-link.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureParseLink = { input: ` var https://example.com - simple link https://example.com. diff --git a/www/library/src/test/fixture/table.ts b/www/library/src/test/fixture/table.ts index c17c32c..d87d4f2 100644 --- a/www/library/src/test/fixture/table.ts +++ b/www/library/src/test/fixture/table.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureTable1 = { input: ` Table with different cells align diff --git a/www/library/src/test/fixture/variables.ts b/www/library/src/test/fixture/variables.ts index e177d85..4460b2e 100644 --- a/www/library/src/test/fixture/variables.ts +++ b/www/library/src/test/fixture/variables.ts @@ -1,5 +1,3 @@ -/* eslint-disable max-len */ - export const fixtureVariable = { input: ` ### Variables diff --git a/www/library/src/test/util.ts b/www/library/src/test/util.ts index e8b5481..0d52cef 100644 --- a/www/library/src/test/util.ts +++ b/www/library/src/test/util.ts @@ -1,4 +1,3 @@ export function stringReverse(someString: string): string { - // eslint-disable-next-line unicorn/prefer-spread return someString.split("").reverse().join(""); }