diff --git a/src/postprocess.js b/src/postprocess.js index e1a9d60..0a4c885 100644 --- a/src/postprocess.js +++ b/src/postprocess.js @@ -99,6 +99,8 @@ const is_valid_message = (block, message, translation) => { case 'no-restricted-syntax': return message.nodeType !== 'LabeledStatement' || get_identifier(get_referenced_string(block, message)) !== '$'; case 'no-self-assign': return !state.var_names.has(get_identifier(get_referenced_string(block, message))); case 'no-undef': return get_referenced_string(block, message) !== '$$Generic'; + case '@typescript-eslint/no-unused-vars': + case 'no-unused-vars': return !['$$Props', '$$Slots', '$$Events'].includes(get_referenced_string(block, message)); case 'no-unused-labels': return get_referenced_string(block, message) !== '$'; case '@typescript-eslint/quotes': case 'quotes': return !translation.options.in_quoted_attribute; diff --git a/test/samples/typescript-generics/.eslintrc.js b/test/samples/typescript-special-types/.eslintrc.js similarity index 100% rename from test/samples/typescript-generics/.eslintrc.js rename to test/samples/typescript-special-types/.eslintrc.js diff --git a/test/samples/typescript-generics/Input.svelte b/test/samples/typescript-special-types/Input.svelte similarity index 57% rename from test/samples/typescript-generics/Input.svelte rename to test/samples/typescript-special-types/Input.svelte index e120bfb..f439e60 100644 --- a/test/samples/typescript-generics/Input.svelte +++ b/test/samples/typescript-special-types/Input.svelte @@ -1,6 +1,22 @@ diff --git a/test/samples/typescript-generics/expected.json b/test/samples/typescript-special-types/expected.json similarity index 100% rename from test/samples/typescript-generics/expected.json rename to test/samples/typescript-special-types/expected.json