From 51dc3f1407ee32912fb0f31bd279b5a4b12051a3 Mon Sep 17 00:00:00 2001 From: Daniel Yuschick Date: Sat, 16 Mar 2024 14:09:48 +0200 Subject: [PATCH] fix: return snippet to add plugin into stylelint settings --- README.md | 13 +++++++++++-- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ec32403..d25bcbd 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,17 @@ npm i stylelint-plugin-defensive-css --save-dev yarn add stylelint-plugin-defensive-css --dev ``` -With the plugin installed, the individual rule(s) can be added to the project's -Stylelint configuration. +With the plugin installed, the rule(s) can be added to the project's Stylelint +configuration. + +```json +{ + "plugins": ["stylelint-plugin-defensive-css"], + "rules": { + "plugin/use-defensive-css": [true, { "severity": "warning" }] + } +} +``` ## Rules / Options diff --git a/package-lock.json b/package-lock.json index ad6d420..f21a52e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "stylelint-plugin-defensive-css", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "1.0.2", + "version": "1.0.3", "license": "MIT", "devDependencies": { "@commitlint/cli": "^18.4.3", diff --git a/package.json b/package.json index 244deb4..83158f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "stylelint-plugin-defensive-css", - "version": "1.0.2", + "version": "1.0.3", "description": "A Stylelint plugin to enforce defensive CSS best practices.", "main": "src/index.js", "type": "module",