mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
351 lines
16 KiB
JSON
351 lines
16 KiB
JSON
{
|
|
"$id": "https://deno.land/x/deno/cli/schemas/config-file.v1.json",
|
|
"$schema": "http://json-schema.org/draft-07/schema",
|
|
"description": "A JSON representation of a Deno configuration file.",
|
|
"required": [],
|
|
"title": "Deno configuration file Schema",
|
|
"type": "object",
|
|
"properties": {
|
|
"compilerOptions": {
|
|
"type": "object",
|
|
"description": "Instructs the TypeScript compiler how to compile .ts files.",
|
|
"properties": {
|
|
"allowJs": {
|
|
"description": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowJs"
|
|
},
|
|
"allowUnreachableCode": {
|
|
"description": "Disable error reporting for unreachable code.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Disable error reporting for unreachable code.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnreachableCode"
|
|
},
|
|
"allowUnusedLabels": {
|
|
"description": "Disable error reporting for unused labels.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Disable error reporting for unused labels.\n\nSee more: https://www.typescriptlang.org/tsconfig#allowUnusedLabels"
|
|
},
|
|
"checkJs": {
|
|
"description": "Enable error reporting in type-checked JavaScript files.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Enable error reporting in type-checked JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#checkJs"
|
|
},
|
|
"experimentalDecorators": {
|
|
"description": "Enable experimental support for TC39 stage 2 draft decorators.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Enable experimental support for TC39 stage 2 draft decorators.\n\nSee more: https://www.typescriptlang.org/tsconfig#experimentalDecorators"
|
|
},
|
|
"jsx": {
|
|
"description": "Specify what JSX code is generated.",
|
|
"default": "react",
|
|
"enum": [
|
|
"preserve",
|
|
"react",
|
|
"react-jsx",
|
|
"react-jsxdev",
|
|
"react-native"
|
|
]
|
|
},
|
|
"jsxFactory": {
|
|
"description": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'",
|
|
"type": "string",
|
|
"default": "React.createElement",
|
|
"markdownDescription": "Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFactory"
|
|
},
|
|
"jsxFragmentFactory": {
|
|
"description": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.",
|
|
"type": "string",
|
|
"default": "React.Fragment",
|
|
"markdownDescription": "Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'.\n\nSee more: https://www.typescriptlang.org/tsconfig#jsxFragmentFactory"
|
|
},
|
|
"jsxImportSource": {
|
|
"description": "Specify module specifier used to import the JSX factory functions when using jsx: 'react-jsx*'.",
|
|
"type": "string",
|
|
"default": "react",
|
|
"markdownDescription": "Specify module specifier used to import the JSX factory functions when using jsx: `react-jsx*`.\n\nSee more: https://www.typescriptlang.org/tsconfig/#jsxImportSource"
|
|
},
|
|
"keyofStringsOnly": {
|
|
"description": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Make keyof only return strings instead of string, numbers or symbols. Legacy option.\n\nSee more: https://www.typescriptlang.org/tsconfig#keyofStringsOnly"
|
|
},
|
|
"lib": {
|
|
"description": "Specify a set of bundled library declaration files that describe the target runtime environment.",
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"default": [
|
|
"deno.window"
|
|
],
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"markdownDescription": "Specify a set of bundled library declaration files that describe the target runtime environment.\n\nSee more: https://www.typescriptlang.org/tsconfig#lib"
|
|
},
|
|
"noFallthroughCasesInSwitch": {
|
|
"description": "Enable error reporting for fallthrough cases in switch statements.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Enable error reporting for fallthrough cases in switch statements.\n\nSee more: https://www.typescriptlang.org/tsconfig#noFallthroughCasesInSwitch"
|
|
},
|
|
"noImplicitAny": {
|
|
"description": "Enable error reporting for expressions and declarations with an implied `any` type..",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Enable error reporting for expressions and declarations with an implied `any` type..\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitAny"
|
|
},
|
|
"noImplicitOverride": {
|
|
"description": "Ensure overriding members in derived classes are marked with an override modifier.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Ensure overriding members in derived classes are marked with an override modifier.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitOverride"
|
|
},
|
|
"noImplicitReturns": {
|
|
"description": "Enable error reporting for codepaths that do not explicitly return in a function.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Enable error reporting for codepaths that do not explicitly return in a function.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitReturns"
|
|
},
|
|
"noImplicitThis": {
|
|
"description": "Enable error reporting when `this` is given the type `any`.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Enable error reporting when `this` is given the type `any`.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitThis"
|
|
},
|
|
"noImplicitUseStrict": {
|
|
"description": "Disable adding 'use strict' directives in emitted JavaScript files.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Disable adding 'use strict' directives in emitted JavaScript files.\n\nSee more: https://www.typescriptlang.org/tsconfig#noImplicitUseStrict"
|
|
},
|
|
"noStrictGenericChecks": {
|
|
"description": "Disable strict checking of generic signatures in function types.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Disable strict checking of generic signatures in function types.\n\nSee more: https://www.typescriptlang.org/tsconfig#noStrictGenericChecks"
|
|
},
|
|
"noUnusedLocals": {
|
|
"description": "Enable error reporting when a local variables aren't read.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Enable error reporting when a local variables aren't read.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedLocals"
|
|
},
|
|
"noUnusedParameters": {
|
|
"description": "Raise an error when a function parameter isn't read",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Raise an error when a function parameter isn't read\n\nSee more: https://www.typescriptlang.org/tsconfig#noUnusedParameters"
|
|
},
|
|
"noUncheckedIndexedAccess": {
|
|
"description": "Add `undefined` to a type when accessed using an index.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Add `undefined` to a type when accessed using an index.\n\nSee more: https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess"
|
|
},
|
|
"strict": {
|
|
"description": "Enable all strict type checking options.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Enable all strict type checking options.\n\nSee more: https://www.typescriptlang.org/tsconfig#strict"
|
|
},
|
|
"strictBindCallApply": {
|
|
"description": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Check that the arguments for `bind`, `call`, and `apply` methods match the original function.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictBindCallApply"
|
|
},
|
|
"strictFunctionTypes": {
|
|
"description": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "When assigning functions, check to ensure parameters and the return values are subtype-compatible.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictFunctionTypes"
|
|
},
|
|
"strictPropertyInitialization": {
|
|
"description": "Check for class properties that are declared but not set in the constructor.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "Check for class properties that are declared but not set in the constructor.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictPropertyInitialization"
|
|
},
|
|
"strictNullChecks": {
|
|
"description": "When type checking, take into account `null` and `undefined`.",
|
|
"type": "boolean",
|
|
"default": true,
|
|
"markdownDescription": "When type checking, take into account `null` and `undefined`.\n\nSee more: https://www.typescriptlang.org/tsconfig#strictNullChecks"
|
|
},
|
|
"suppressExcessPropertyErrors": {
|
|
"description": "Disable reporting of excess property errors during the creation of object literals.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Disable reporting of excess property errors during the creation of object literals.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressExcessPropertyErrors"
|
|
},
|
|
"suppressImplicitAnyIndexErrors": {
|
|
"description": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.",
|
|
"type": "boolean",
|
|
"default": false,
|
|
"markdownDescription": "Suppress `noImplicitAny` errors when indexing objects that lack index signatures.\n\nSee more: https://www.typescriptlang.org/tsconfig#suppressImplicitAnyIndexErrors"
|
|
}
|
|
}
|
|
},
|
|
"importMap": {
|
|
"description": "The location of an import map to be used when resolving modules. If an import map is explicitly specified, it will override this value.",
|
|
"type": "string"
|
|
},
|
|
"lint": {
|
|
"description": "Configuration for linter",
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "object",
|
|
"properties": {
|
|
"include": {
|
|
"type": "array",
|
|
"description": "List of files or directories that will be linted.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"exclude": {
|
|
"type": "array",
|
|
"description": "List of files or directories that will not be linted.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"rules": {
|
|
"type": "object",
|
|
"properties": {
|
|
"tags": {
|
|
"type": "array",
|
|
"description": "List of tag names that will be run. Empty list disables all tags and will only use rules from `include`.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 0,
|
|
"uniqueItems": true
|
|
},
|
|
"exclude": {
|
|
"type": "array",
|
|
"description": "List of rule names that will be excluded from configured tag sets. If the same rule is in `include` it be run.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 0,
|
|
"uniqueItems": true
|
|
},
|
|
"include": {
|
|
"type": "array",
|
|
"description": "List of rule names that will be run. Even if the same rule is in `exclude` it will be run.",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 0,
|
|
"uniqueItems": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"fmt": {
|
|
"description": "Configuration for formatter",
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "object",
|
|
"properties": {
|
|
"include": {
|
|
"type": "array",
|
|
"description": "List of files or directories that will be formatted.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"exclude": {
|
|
"type": "array",
|
|
"description": "List of files or directories that will not be formatted.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"properties": {
|
|
"useTabs": {
|
|
"description": "Whether to use tabs (true) or spaces (false) for indentation.",
|
|
"type": "boolean",
|
|
"default": false
|
|
},
|
|
"lineWidth": {
|
|
"description": "The width of a line the printer will try to stay under. Note that the printer may exceed this width in certain cases.",
|
|
"type": "number",
|
|
"default": 80
|
|
},
|
|
"indentWidth": {
|
|
"description": "The number of characters for an indent.",
|
|
"type": "number",
|
|
"default": 2
|
|
},
|
|
"singleQuote": {
|
|
"type": "boolean",
|
|
"description": "Whether to use single quote (true) or double quote (false) for quotation.",
|
|
"default": false
|
|
},
|
|
"proseWrap": {
|
|
"description": "Define how prose should be wrapped in Markdown files.",
|
|
"default": "always",
|
|
"enum": [
|
|
"always",
|
|
"never",
|
|
"preserve"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"tasks": {
|
|
"description": "Configuration for deno task",
|
|
"type": "object",
|
|
"patternProperties": {
|
|
"^[A-Za-z][A-Za-z0-9_\\-:]*$": {
|
|
"type": "string",
|
|
"description": "Command to execute for this task name."
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"test": {
|
|
"description": "Configuration for deno test",
|
|
"type": "object",
|
|
"properties": {
|
|
"files": {
|
|
"type": "object",
|
|
"properties": {
|
|
"include": {
|
|
"type": "array",
|
|
"description": "List of files or directories that will be searched for tests.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"exclude": {
|
|
"type": "array",
|
|
"description": "List of files or directories that will not be searched for tests.",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|