Use the webview-ui linter during npm run lint (#3938)
The webview-ui has an existing eslint config, but it was not being run as part of `npm run lint` command. Start running the webview specific linter (the top level linter doesn't run on tsx files, and webview linter has react specific checks). Fix lint errors in slash-commands file.
This commit is contained in:
1 parent
f10a82916f
commit
e0f9eeaa79
2 files changed
+3
-3
No files matched your search
+1
-1
@@ -279,7 +279,7 @@
|
||||
"watch-tests": "tsc -p . -w --outDir out",
|
||||
"pretest": "npm run compile-tests && npm run compile && npm run compile-standalone && npm run lint",
|
||||
"check-types": "npm run protos && tsc --noEmit",
|
||||
"lint": "eslint src --ext ts && eslint webview-ui/src --ext ts",
|
||||
"lint": "eslint src --ext ts && eslint webview-ui/src --ext ts && cd webview-ui && npm run lint",
|
||||
"format": "prettier . --check",
|
||||
"format:fix": "prettier . --write",
|
||||
"test": "npm-run-all test:unit test:integration",
|
||||
|
||||
@@ -75,9 +75,9 @@ export function getWorkflowCommands(
|
||||
|
||||
// Regex for detecting slash commands in text
|
||||
// currently doesn't allow whitespace inside of the filename
|
||||
export const slashCommandRegex = /\/([a-zA-Z0-9_\.-]+)(\s|$)/
|
||||
export const slashCommandRegex = /\/([a-zA-Z0-9_.-]+)(\s|$)/
|
||||
export const slashCommandRegexGlobal = new RegExp(slashCommandRegex.source, "g")
|
||||
export const slashCommandDeleteRegex = /^\s*\/([a-zA-Z0-9_\.-]+)$/
|
||||
export const slashCommandDeleteRegex = /^\s*\/([a-zA-Z0-9_.-]+)$/
|
||||
|
||||
/**
|
||||
* Removes a slash command at the cursor position
|
||||
|
||||
Reference in new issue
Block a user