Skip to content

Commit

Permalink
Add support for TSX
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Apr 20, 2021
1 parent 5746e06 commit bbe02a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion linter.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
'eslint-plugin-svelte3': 'text.html',
'eslint-plugin-vue': 'text.html.vue',
'@typescript-eslint/parser': 'source.ts',
'@typescript-eslint/parser': 'source.tsx',

This comment has been minimized.

Copy link
@kaste

kaste Apr 20, 2021

Contributor

That ought to be a mapping, so keys must be unique.

This comment has been minimized.

Copy link
@sindresorhus

sindresorhus Apr 20, 2021

Author Member

Right. 🤦

}
OPTIMISTIC_SELECTOR = ', '.join({STANDARD_SELECTOR} | set(PLUGINS.values()))

Expand Down Expand Up @@ -109,7 +110,7 @@ def xo_fix(self, view, content):
logger.info('xo_fix → xo_env.PWD: %s', self.xo_env['PWD'])
logger.info('xo_fix → xo_project_root: %s', self.xo_project_root)

# TODO: Change to use `subprocess.run()` when Sublime updates Python to 3.5 or later.
# TODO: Change to use `subprocess.run()` when Sublime updates Python to 3.5 or later.
proc = subprocess.Popen(
[self.xo_path, '--stdin', '--fix'],
stdin=subprocess.PIPE,
Expand Down

0 comments on commit bbe02a9

Please sign in to comment.