UNPKG

nest-prettier

Version:

A schematic to run prettier as an eslint rule

88 lines (87 loc) 3.68 kB
{ "$schema": "http://json-schema.org/schema", "$id": "SchematicsEslintPrettier", "title": "Add eslint-plugin-prettier", "description": "Run prettier as an eslint rule", "type": "object", "properties": { "eslintFileFormat": { "type": "string", "description": "Eslint file format.", "x-prompt": "Eslint file format.", "default": "javascript", "enum": ["javascript", "json", "package.json"] }, "printWidth": { "type": "integer", "description": "Print width of prettier.", "x-prompt": "What is the print width per line?", "default": 80, "enum": [80, 100, 120, 140] }, "tabWidth": { "type": "integer", "description": "Specify the number of spaces per indentation-level.", "x-prompt": "Specify the number of spaces per indentation-level.", "default": 2, "enum": [2, 4] }, "useTabs": { "type": "boolean", "description": "Indent lines with tabs instead of spaces.", "x-prompt": "Indent lines with tabs instead of spaces.", "default": false }, "semi": { "type": "boolean", "description": "Print semicolons at the ends of statements.", "x-prompt": "Print semicolons at the ends of statements.", "default": true }, "singleQuote": { "type": "boolean", "description": "Use single quotes instead of double quotes.", "x-prompt": "Use single quotes instead of double quotes.", "default": false }, "quoteProps": { "type": "string", "description": "Change when properties in objects are quoted.", "x-prompt": "Change when properties in objects are quoted.", "default": "as-needed", "enum": ["as-needed", "consistent", "preserve"] }, "trailComma": { "type": "string", "description": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.", "x-prompt": "Print trailing commas wherever possible in multi-line comma-separated syntactic structures.", "default": "es5", "enum": ["es5", "none", "all"] }, "bracketSpacing": { "type": "boolean", "description": "Print spaces between brackets in object literals.", "x-prompt": "Print spaces between brackets in object literals.", "default": true }, "arrowParens": { "type": "string", "description": "Include parentheses around a sole arrow function parameter.", "x-prompt": "Include parentheses around a sole arrow function parameter.", "default": "always", "enum": ["always", "avoid"] }, "requirePragma": { "type": "boolean", "description": "Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful when gradually transitioning large, unformatted codebases to prettier.", "x-prompt": "Prettier can restrict itself to only format files that contain a special comment, called a pragma, at the top of the file. This is very useful when gradually transitioning large, unformatted codebases to prettier.", "default": false }, "insertPragma": { "type": "boolean", "description": "Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier. This works well when used in tandem with the --require-pragma option.", "x-prompt": "Prettier can insert a special @format marker at the top of files specifying that the file has been formatted with prettier. This works well when used in tandem with the --require-pragma option.", "default": false } } }