Skip to content

Commit

Permalink
fix: includes_map path and READE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
TOsmanov committed Dec 4, 2024
1 parent 3c0e731 commit cae1534
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,12 @@ if you haven't installed it yet:
Run _foliant-md-linter_ from the project root with following commands and options:

- `full-check` – check md files with markdownlint and markdown-link-check
- `-v`, `--verbose` – print full linting results (default: false)
- `-v`, `--verbose` – print full linting results (default: _false_)
- `-s`, `--source <path-to-sources>` – specify source directory (default: _src_)
- `-c`, `--config <path-to-sources>` – path to custom config
- `-p`, `--project <project-name>` – specify project name
- `-d`, `--debug` – print executing command (default: false)
- `-a`, `--allowfailure` – allow exit with failure if errors (default: false)
- `-d`, `--debug` – print executing command (default: _false_)
- `-a`, `--allowfailure` – allow exit with failure if errors (default: _false_)
- `--node-modules <node-modules-path>` – custom path to node modules (the command to get the path to the node modules `npm list -g | head -1`)
- `-w --working-dir <working-dir>` – the working directory should be set if the project folder differs from the CWD. For example, when using the linter in vs code (the command to get the path to the working dir `pwd` in the foliant project folder)

Expand All @@ -108,13 +108,11 @@ Run _foliant-md-linter_ from the project root with following commands and option
- `slim` (default value) – check for critical errors with markdownlint
- `typograph` – fix typograph errors with markdownlint
- `mdlint-default` – check md files for critical formatting errors with markdownlint and validate external links with markdown-link-check

- `--includes-map` – set the path to the includes map (default: false)
- `--foliant-config` – set the configuration file is a foliant from which chapters (default: `./foliant.yml`)
- `--format` – set the format of the markdownlint-cli2 config file (default: `jsonc`, incompatible with `--project`, `--node-modules`, `--working-dir`)

- `markdown` – check md files for errors with markdownlint
- `-v`, `-s`, `-c`, `-d`, `-a`, `-l`, `-f`, `-m`, `--includes-map`, `--foliant-config`
- `-v`, `-s`, `-c`, `-d`, `-a`, `-l`, `-f`, `-m`, `--foliant-config`
- `urls` validate external links with markdown-link-check
- `-v`, `-s`, `-d`, `-a`, `-l`
- `print` print linting results
Expand Down
2 changes: 1 addition & 1 deletion generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function createConfig (mode = 'full', source = '', project = '', configPath = ''
const validateIntLinksConf = {}
validateIntLinksConf.src = source || undefined
validateIntLinksConf.project = project || undefined
validateIntLinksConf.includesMap = includesMap || './includes_map.json'
validateIntLinksConf.includesMap = includesMap || undefined
validateIntLinksConf.workingDir = workingDir || undefined

let customRules = [
Expand Down
2 changes: 1 addition & 1 deletion linter.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const genIncludesMapLog = '.gen_includes_map.log'
const defaultConfig = path.resolve(cwd, '.markdownlint-cli2')
const defaultSrc = 'src'
const defaultFoliantConfig = path.resolve(cwd, 'foliant.yml')
const defaultIncludesMap = 'includes_map.json'
const defaultIncludesMap = './includes_map.json'
const usedFoliantConfig = path.resolve(cwd, 'only_includes_map.yml')

// Options
Expand Down

0 comments on commit cae1534

Please sign in to comment.