UNPKG

@nx/eslint

Version:

The ESLint plugin for Nx contains executors, generators and utilities used for linting JavaScript/TypeScript projects within an Nx workspace.

149 lines (148 loc) • 4.47 kB
{ "version": 2, "outputCapture": "direct-nodejs", "$schema": "https://json-schema.org/schema", "title": "ESLint Lint Target", "description": "ESLint Lint Target.", "cli": "nx", "type": "object", "properties": { "eslintConfig": { "type": "string", "description": "The name of the ESLint configuration file.", "x-completion-type": "file", "x-completion-glob": ".eslintrc?(.json)", "x-priority": "important" }, "lintFilePatterns": { "type": "array", "description": "One or more files/dirs/globs to pass directly to ESLint's `lintFiles()` method.", "default": ["{projectRoot}"], "items": { "type": "string" } }, "format": { "type": "string", "description": "ESLint Output formatter (https://eslint.org/docs/user-guide/formatters).", "default": "stylish", "anyOf": [ { "enum": [ "stylish", "compact", "codeframe", "unix", "visualstudio", "table", "checkstyle", "html", "jslint-xml", "json", "json-with-metadata", "junit", "tap" ] }, { "minLength": 1 } ], "x-priority": "important" }, "force": { "type": "boolean", "description": "Succeeds even if there was linting errors.", "default": false }, "silent": { "type": "boolean", "description": "Hide output text.", "default": false }, "fix": { "type": "boolean", "description": "Fixes linting errors (may overwrite linted files).", "default": false, "x-priority": "important" }, "cache": { "type": "boolean", "description": "Only check changed files.", "default": false }, "cacheLocation": { "type": "string", "description": "Path to the cache file or directory.", "x-completion-type": "directory", "x-completion-glob": "tsconfig.*.json" }, "outputFile": { "type": "string", "description": "File to write report to.", "x-completion-type": "file" }, "maxWarnings": { "type": "number", "description": "Number of warnings to trigger nonzero exit code - default: `-1`.", "default": -1 }, "quiet": { "type": "boolean", "description": "Report errors only - default: `false`.", "default": false, "x-priority": "important" }, "ignorePath": { "type": "string", "description": "The path of the `.eslintignore` file. Not supported for Flat Config.", "x-completion-type": "file", "x-completion-glob": ".eslintignore" }, "noEslintrc": { "type": "boolean", "description": "The equivalent of the `--no-eslintrc` flag on the ESLint CLI, it is `false` by default.", "default": false }, "hasTypeAwareRules": { "type": "boolean", "description": "When set to `true`, the linter will invalidate its cache when any of its dependencies changes." }, "cacheStrategy": { "type": "string", "description": "Strategy to use for detecting changed files in the cache.", "default": "metadata", "enum": ["metadata", "content"] }, "rulesdir": { "type": "array", "description": "The equivalent of the `--rulesdir` flag on the ESLint CLI.", "default": [], "items": { "type": "string", "x-completion-type": "directory" } }, "resolvePluginsRelativeTo": { "type": "string", "description": "The equivalent of the `--resolve-plugins-relative-to` flag on the ESLint CLI. Not supported for Flat Config.", "x-completion-type": "directory" }, "reportUnusedDisableDirectives": { "type": "string", "enum": ["off", "warn", "error"], "description": "The equivalent of the `--report-unused-disable-directives` flag on the ESLint CLI." }, "printConfig": { "type": "string", "description": "The equivalent of the `--print-config` flag on the ESLint CLI.", "x-completion-type": "file" }, "errorOnUnmatchedPattern": { "type": "boolean", "description": "When set to false, equivalent of the `--no-error-on-unmatched-pattern` flag on the ESLint CLI.", "default": true } }, "examplesFile": "../../../docs/eslint-examples.md" }