Skip to content

Commit

Permalink
fix: limit snippets to only apply in ts/js/tsx/jsx files
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimLyon committed Dec 13, 2023
1 parent 5190949 commit 2ada04e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .vscode/remix.code-snippets
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"loader": {
"prefix": "/loader",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type DataFunctionArgs, json } from \"@remix-run/node\"",
"",
Expand All @@ -11,6 +12,7 @@
},
"action": {
"prefix": "/action",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import { type DataFunctionArgs, json } from \"@remix-run/node\"",
"",
Expand All @@ -21,6 +23,7 @@
},
"default": {
"prefix": "/default",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"export default function ${TM_FILENAME_BASE/[^a-zA-Z0-9]*([a-zA-Z0-9])([a-zA-Z0-9]*)/${1:/capitalize}${2}/g}() {",
" return (",
Expand All @@ -33,6 +36,7 @@
},
"headers": {
"prefix": "/headers",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import type { HeadersFunction } from '@remix-run/node'",
"",
Expand All @@ -43,6 +47,7 @@
},
"links": {
"prefix": "/links",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import type { LinksFunction } from '@remix-run/node'",
"",
Expand All @@ -53,6 +58,7 @@
},
"meta": {
"prefix": "/meta",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import type { MetaFunction } from '@remix-run/node'",
"",
Expand All @@ -63,6 +69,7 @@
},
"shouldRevalidate": {
"prefix": "/shouldRevalidate",
"scope": "typescriptreact,javascriptreact,typescript,javascript",
"body": [
"import type { ShouldRevalidateFunction } from '@remix-run/react'",
"",
Expand Down

0 comments on commit 2ada04e

Please sign in to comment.