使用 nx lint 时如何将参数传递给 eslint

Ada*_*all 16 eslint nrwl-nx

我想使用 eslint 参数,例如--no-error-on-unmatched-pattern.

https://eslint.org/docs/user-guide/command-line-interface#options

但是,当使用nx lint// nx run-many --all --target=lint-nx affected:lint这些参数似乎不受支持时,它是一个缩减集。

https://nx.dev/packages/linter/executors/eslint#options-playground

Options:
  --eslintConfig          The name of the ESLint configuration file.
  --lintFilePatterns      One or more files/dirs/globs to pass directly to ESLint's lintFiles() method. (default: )
  --format                ESLint Output formatter (https://eslint.org/docs/user-guide/formatters). (default: stylish)
  --force                 Succeeds even if there was linting errors.
  --silent                Hide output text.
  --fix                   Fixes linting errors (may overwrite linted files).
  --cache                 Only check changed files.
  --cacheLocation         Path to the cache file or directory.
  --outputFile            File to write report to.
  --maxWarnings           Number of warnings to trigger nonzero exit code - default: -1 (default: -1)
  --quiet                 Report errors only - default: false
  --ignorePath            The path of the .eslintignore file.
  --noEslintrc            The equivalent of the --no-eslintrc flag on the ESLint CLI, it is false by default
  --hasTypeAwareRules     When set to true, the linter will invalidate its cache when any of its dependencies changes.
  --skip-nx-cache         Skip the use of Nx cache.
  --help                  Show available options for project target.
Run Code Online (Sandbox Code Playgroud)

有些参数,例如reportUnusedDisableDirectives我能够添加到.eslintrc.json文件中,但我看不到如何获取--no-error-on-unmatched-pattern/noErrorOnUnmatchedPattern工作...