From 8c73ab964a8a5928e9fee644cf237264dafdf238 Mon Sep 17 00:00:00 2001 From: Adrian Hesketh Date: Sat, 18 May 2024 12:50:51 +0100 Subject: [PATCH] refactor: minor linter improvements, add cspell ignore words for vscode users --- .vscode/settings.json | 12 ++++++++++++ parser/v2/conditionalattributeparser.go | 2 +- parser/v2/forexpressionparser.go | 2 +- parser/v2/switchexpressionparser.go | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..7ccb52a12 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,12 @@ +{ + "cSpell.words": [ + "blockquote", + "fieldset", + "figcaption", + "formatstring", + "goexpression", + "keygen", + "strs", + "templ" + ] +} \ No newline at end of file diff --git a/parser/v2/conditionalattributeparser.go b/parser/v2/conditionalattributeparser.go index b2110e80a..814de97a1 100644 --- a/parser/v2/conditionalattributeparser.go +++ b/parser/v2/conditionalattributeparser.go @@ -9,7 +9,7 @@ var conditionalAttribute parse.Parser[ConditionalAttribute] = conditionalAttribu type conditionalAttributeParser struct{} -func (_ conditionalAttributeParser) Parse(pi *parse.Input) (r ConditionalAttribute, ok bool, err error) { +func (conditionalAttributeParser) Parse(pi *parse.Input) (r ConditionalAttribute, ok bool, err error) { start := pi.Index() // Strip leading whitespace and look for `if `. diff --git a/parser/v2/forexpressionparser.go b/parser/v2/forexpressionparser.go index 6c630dbda..c8f0236fb 100644 --- a/parser/v2/forexpressionparser.go +++ b/parser/v2/forexpressionparser.go @@ -9,7 +9,7 @@ var forExpression parse.Parser[Node] = forExpressionParser{} type forExpressionParser struct{} -func (_ forExpressionParser) Parse(pi *parse.Input) (n Node, ok bool, err error) { +func (forExpressionParser) Parse(pi *parse.Input) (n Node, ok bool, err error) { var r ForExpression start := pi.Index() diff --git a/parser/v2/switchexpressionparser.go b/parser/v2/switchexpressionparser.go index 26ceffd81..f21e4bf8d 100644 --- a/parser/v2/switchexpressionparser.go +++ b/parser/v2/switchexpressionparser.go @@ -9,7 +9,7 @@ var switchExpression parse.Parser[Node] = switchExpressionParser{} type switchExpressionParser struct{} -func (_ switchExpressionParser) Parse(pi *parse.Input) (n Node, ok bool, err error) { +func (switchExpressionParser) Parse(pi *parse.Input) (n Node, ok bool, err error) { var r SwitchExpression start := pi.Index()