diff --git a/README.md b/README.md index 96b9d8f..05cde5c 100644 --- a/README.md +++ b/README.md @@ -255,6 +255,16 @@ Here is an example of a configuration file using JSON format: - **debug**: Enables debug mode with additional output if set to `true`. - **exclude**: Specifies files or directories to exclude from linting. +To enable editor autocompletion in a JSON configuration file, add a `$schema` property. +If you have installed `dclint`: +``` +"$schema": "./node_modules/dclint/schemas/linter-config.schema.json", +``` +Otherwise: +``` +"$schema": "https://raw.githubusercontent.com/zavoloklom/docker-compose-linter/refs/heads/main/schemas/linter-config.schema.json", +``` + ### Configure Rules In addition to enabling or disabling rules, some rules may support custom parameters to tailor them to your specific diff --git a/schemas/linter-config.schema.json b/schemas/linter-config.schema.json index 2016b36..1b316c1 100644 --- a/schemas/linter-config.schema.json +++ b/schemas/linter-config.schema.json @@ -2,6 +2,9 @@ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { + "$schema": { + "type": "string" + }, "rules": { "type": "object", "propertyNames": {