Skip to content

Commit

Permalink
feat: Add stylelint-disable snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
ntwb committed Jan 5, 2020
1 parent 23c7008 commit 83eef51
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
17 changes: 16 additions & 1 deletion package.json
Expand Up @@ -20,7 +20,8 @@
"theme": "dark"
},
"categories": [
"Linters"
"Linters",
"Snippets"
],
"keywords": [
"css",
Expand Down Expand Up @@ -117,6 +118,20 @@
".stylelintignore"
]
}
],
"snippets": [
{
"language": "css",
"path": "./snippets/stylelint-disable.json"
},
{
"language": "postcss",
"path": "./snippets/stylelint-disable.json"
},
{
"language": "scss",
"path": "./snippets/stylelint-disable.json"
}
]
},
"dependencies": {
Expand Down
17 changes: 17 additions & 0 deletions snippets/stylelint-disable.json
@@ -0,0 +1,17 @@
{
"stylelint-disable": {
"prefix": "stylelint-disable",
"body": ["/* stylelint-disable ${1:rule} */", "$0/* stylelint-enable ${1:rule} */"],
"description": "Turn off all stylelint or individual rules, after which you do not need to re-enable stylelint."
},
"stylelint disable line": {
"prefix": "stylelint-disable-line",
"body": ["/* stylelint-disable-line ${0:rule} */"],
"description": "Turn off stylelint rules for individual lines only, after which you do not need to explicitly re-enable them."
},
"stylelint-disable-next-line": {
"prefix": "stylelint-disable-next-line",
"body": ["/* stylelint-disable-next-line ${0:rule} */"],
"description": "Turn off stylelint rules for the next line only, after which you do not need to explicitly re-enable them."
}
}

0 comments on commit 83eef51

Please sign in to comment.