diff --git a/src/postprocess.js b/src/postprocess.js index 875806f..6d7bfeb 100644 --- a/src/postprocess.js +++ b/src/postprocess.js @@ -92,6 +92,7 @@ const get_identifier = str => (str && str.match(/^[^\s!"#%&\\'()*+,\-./:;<=>?@[\ const is_valid_message = (block, message, translation) => { switch (message.ruleId) { case 'eol-last': return false; + case '@typescript-eslint/indent': case 'indent': return !translation.options.template; case 'linebreak-style': return message.line !== translation.end; case 'no-labels': return get_identifier(get_referenced_string(block, message)) !== '$'; diff --git a/test/samples/typescript-indentation/.eslintrc.js b/test/samples/typescript-indentation/.eslintrc.js new file mode 100644 index 0000000..e20b129 --- /dev/null +++ b/test/samples/typescript-indentation/.eslintrc.js @@ -0,0 +1,12 @@ +module.exports = { + parser: '@typescript-eslint/parser', + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + plugins: ['@typescript-eslint'], + settings: { + 'svelte3/typescript': require('typescript'), + }, + rules: { + indent: 0, + '@typescript-eslint/indent': ['error', 'tab'], + }, +}; diff --git a/test/samples/typescript-indentation/Input.svelte b/test/samples/typescript-indentation/Input.svelte new file mode 100644 index 0000000..13ac40e --- /dev/null +++ b/test/samples/typescript-indentation/Input.svelte @@ -0,0 +1,6 @@ + + +