|
| 1 | +{ |
| 2 | + "contributions": { |
| 3 | + "settings": [ |
| 4 | + { |
| 5 | + "file_patterns": [ |
| 6 | + "/LSP-eslint.sublime-settings" |
| 7 | + ], |
| 8 | + "schema": { |
| 9 | + "$id": "sublime://settings/LSP-eslint", |
| 10 | + "definitions": { |
| 11 | + "PluginConfig": { |
| 12 | + "properties": { |
| 13 | + "env": { |
| 14 | + "properties": { |
| 15 | + "DEBUG": { |
| 16 | + "type": "string", |
| 17 | + "default": "", |
| 18 | + "description": "Enables ESLint debug mode (same as --debug on the command line)" |
| 19 | + }, |
| 20 | + "NODE_ENV": { |
| 21 | + "type": "string", |
| 22 | + "default": "", |
| 23 | + "description": "The value of NODE_ENV to use when running eslint tasks." |
| 24 | + }, |
| 25 | + } |
| 26 | + }, |
| 27 | + "settings": { |
| 28 | + "additionalProperties": false, |
| 29 | + "properties": { |
| 30 | + "codeActionOnSave.enable": { |
| 31 | + "type": "boolean", |
| 32 | + "default": true, |
| 33 | + "description": "Enables functionality to run code actions on save." |
| 34 | + }, |
| 35 | + "codeActionOnSave.mode": { |
| 36 | + "type": "string", |
| 37 | + "default": "all", |
| 38 | + "enum": [ |
| 39 | + "all", |
| 40 | + "problems" |
| 41 | + ], |
| 42 | + "enumDescriptions": [ |
| 43 | + "Fixes all possible problems in the file. This option might take some time.", |
| 44 | + "Only fixes reported problems that have non overlapping textual edits. This options runs a lot faster." |
| 45 | + ], |
| 46 | + "markdownDescription": "Specifies the code action mode. Possible values are `all` and `problems`." |
| 47 | + }, |
| 48 | + "format": { |
| 49 | + "type": "boolean", |
| 50 | + "default": false, |
| 51 | + "markdownDescription": "**Deprecated**. Enables DocumentFormattingRequest notification.\n\nRecommended to use global LSP option `lsp_code_actions_on_save` with the `\"source.fixAll.eslint\": true` key instead." |
| 52 | + }, |
| 53 | + "packageManager": { |
| 54 | + "type": "string", |
| 55 | + "enum": [ |
| 56 | + "npm", |
| 57 | + "yarn", |
| 58 | + "pnpm" |
| 59 | + ], |
| 60 | + "default": "npm", |
| 61 | + "description": "The package manager you use to install node modules." |
| 62 | + }, |
| 63 | + "nodePath": { |
| 64 | + "type": [ |
| 65 | + "string", |
| 66 | + "null" |
| 67 | + ], |
| 68 | + "default": null, |
| 69 | + "description": "A path added to NODE_PATH when resolving the eslint module." |
| 70 | + }, |
| 71 | + "options": { |
| 72 | + "type": "object", |
| 73 | + "default": {}, |
| 74 | + "markdownDescription": "The eslint options object to provide args normally passed to eslint when executed from a command line (see http://eslint.org/docs/developer-guide/nodejs-api#cliengine)." |
| 75 | + }, |
| 76 | + "run": { |
| 77 | + "type": "string", |
| 78 | + "enum": [ |
| 79 | + "onSave", |
| 80 | + "onType" |
| 81 | + ], |
| 82 | + "default": "onType", |
| 83 | + "markdownDescription": "Run the linter on save (`onSave`) or on type (`onType`)" |
| 84 | + }, |
| 85 | + "quiet": { |
| 86 | + "type": "boolean", |
| 87 | + "default": false, |
| 88 | + "description": "Turns on quiet mode, which ignores warnings." |
| 89 | + }, |
| 90 | + "onIgnoredFiles": { |
| 91 | + "type": "string", |
| 92 | + "enum": [ |
| 93 | + "warn", |
| 94 | + "off" |
| 95 | + ], |
| 96 | + "default": "off", |
| 97 | + "description": "Whether ESLint should issue a warning on ignored files." |
| 98 | + }, |
| 99 | + "workingDirectories": { |
| 100 | + "type": "array", |
| 101 | + "markdownDescription": "Specifies custom configuration for ESLint's working directories.", |
| 102 | + "defaultSnippets": [ |
| 103 | + { |
| 104 | + "body": [ |
| 105 | + "./folder1", |
| 106 | + "./folder2", |
| 107 | + ] |
| 108 | + }, |
| 109 | + { |
| 110 | + "body": [ |
| 111 | + { |
| 112 | + "mode": "location" |
| 113 | + } |
| 114 | + ] |
| 115 | + }, |
| 116 | + { |
| 117 | + "body": [ |
| 118 | + { |
| 119 | + "directory": "./folder", |
| 120 | + "!cwd": true |
| 121 | + } |
| 122 | + ] |
| 123 | + } |
| 124 | + ], |
| 125 | + "items": { |
| 126 | + "anyOf": [ |
| 127 | + { |
| 128 | + "type": "string", |
| 129 | + "description": "The project-relative path of the working directory." |
| 130 | + }, |
| 131 | + { |
| 132 | + "type": "object", |
| 133 | + "properties": { |
| 134 | + "mode": { |
| 135 | + "type": "string", |
| 136 | + "enum": [ |
| 137 | + "auto", |
| 138 | + "location" |
| 139 | + ], |
| 140 | + "markdownEnumDescriptions": [ |
| 141 | + "Instructs ESLint to infer a working directory based on the location of `package.json`, `.eslintignore` and `.eslintrc*` files. This might work in many cases but can lead to unexpected results as well.", |
| 142 | + "Instructs ESLint to uses the workspace folder location or the file location (if no workspace folder is open) as the working directory. This is the default." |
| 143 | + ], |
| 144 | + "default": "location", |
| 145 | + }, |
| 146 | + }, |
| 147 | + "required": [ |
| 148 | + "mode" |
| 149 | + ] |
| 150 | + }, |
| 151 | + { |
| 152 | + "type": "object", |
| 153 | + "properties": { |
| 154 | + "directory": { |
| 155 | + "type": "string", |
| 156 | + "description": "The working directory to use if a file's path starts with this directory." |
| 157 | + }, |
| 158 | + "changeProcessCWD": { |
| 159 | + "type": "boolean", |
| 160 | + "description": "Whether the process's cwd should be changed as well." |
| 161 | + } |
| 162 | + }, |
| 163 | + "deprecationMessage": "Use the new !cwd form.", |
| 164 | + "required": [ |
| 165 | + "directory" |
| 166 | + ] |
| 167 | + }, |
| 168 | + { |
| 169 | + "type": "object", |
| 170 | + "properties": { |
| 171 | + "directory": { |
| 172 | + "type": "string", |
| 173 | + "description": "The working directory to use if a file's path starts with this directory." |
| 174 | + }, |
| 175 | + "!cwd": { |
| 176 | + "type": "boolean", |
| 177 | + "description": "Set to true if ESLint shouldn't change the working directory." |
| 178 | + } |
| 179 | + }, |
| 180 | + "required": [ |
| 181 | + "directory" |
| 182 | + ] |
| 183 | + }, |
| 184 | + { |
| 185 | + "type": "object", |
| 186 | + "properties": { |
| 187 | + "pattern": { |
| 188 | + "type": "string", |
| 189 | + "description": "A glob pattern to match a working directory." |
| 190 | + }, |
| 191 | + "!cwd": { |
| 192 | + "type": "boolean", |
| 193 | + "description": "Set to true if ESLint shouldn't change the working directory." |
| 194 | + } |
| 195 | + }, |
| 196 | + "markdownDescription": "**Not supported in ST**. Allows to specify a pattern to detect the working directory. This is basically a short cut for listing every directory. If you have a mono repository with all your projects being below a packages folder you can use `{ \"pattern\": \"./packages/*/\" }` to make all these folders working directories.", |
| 197 | + "required": [ |
| 198 | + "pattern" |
| 199 | + ] |
| 200 | + } |
| 201 | + ] |
| 202 | + } |
| 203 | + }, |
| 204 | + "validate": { |
| 205 | + "type": "string", |
| 206 | + "enum": [ |
| 207 | + "off", |
| 208 | + "on", |
| 209 | + "probe" |
| 210 | + ], |
| 211 | + "description": "Whether validation is enabled." |
| 212 | + }, |
| 213 | + "codeAction.disableRuleComment": { |
| 214 | + "type": "object", |
| 215 | + "default": { |
| 216 | + "enable": true, |
| 217 | + "location": "separateLine" |
| 218 | + }, |
| 219 | + "properties": { |
| 220 | + "enable": { |
| 221 | + "type": "boolean", |
| 222 | + "default": true, |
| 223 | + "description": "Show the disable code actions." |
| 224 | + }, |
| 225 | + "location": { |
| 226 | + "type": "string", |
| 227 | + "enum": [ |
| 228 | + "separateLine", |
| 229 | + "sameLine" |
| 230 | + ], |
| 231 | + "default": "separateLine", |
| 232 | + "description": "Configure the disable rule code action to insert the comment on the same line or a new line." |
| 233 | + } |
| 234 | + } |
| 235 | + }, |
| 236 | + "codeAction.showDocumentation": { |
| 237 | + "type": "object", |
| 238 | + "default": { |
| 239 | + "enable": true |
| 240 | + }, |
| 241 | + "properties": { |
| 242 | + "enable": { |
| 243 | + "type": "boolean", |
| 244 | + "default": true, |
| 245 | + "description": "Show the documentation code actions." |
| 246 | + } |
| 247 | + } |
| 248 | + }, |
| 249 | + } |
| 250 | + } |
| 251 | + }, |
| 252 | + }, |
| 253 | + }, |
| 254 | + "allOf": [ |
| 255 | + { |
| 256 | + "$ref": "sublime://settings/LSP-plugin-base" |
| 257 | + }, |
| 258 | + { |
| 259 | + "$ref": "sublime://settings/LSP-eslint#/definitions/PluginConfig" |
| 260 | + } |
| 261 | + ], |
| 262 | + } |
| 263 | + }, |
| 264 | + { |
| 265 | + "file_patterns": [ |
| 266 | + "/*.sublime-project" |
| 267 | + ], |
| 268 | + "schema": { |
| 269 | + "properties": { |
| 270 | + "settings": { |
| 271 | + "properties": { |
| 272 | + "LSP": { |
| 273 | + "properties": { |
| 274 | + "LSP-eslint": { |
| 275 | + "$ref": "sublime://settings/LSP-eslint#/definitions/PluginConfig" |
| 276 | + } |
| 277 | + } |
| 278 | + } |
| 279 | + } |
| 280 | + } |
| 281 | + } |
| 282 | + } |
| 283 | + }, |
| 284 | + ] |
| 285 | + } |
| 286 | +} |
0 commit comments