Commit Graph

18 Commits (master)

Author SHA1 Message Date
Sosuke Suzuki 3a998df02e
TSX: Fix incorrectly removing parentheses around jsx elements being accessed in tsx file (#6640)
* Modify to wrap jsx element used with member-expression in tsx

* Add tests

* Update CHANGELOG.unreleased.md

* Modify to support no-inline jsx element

* Add pr number

* Fix from lint-docs

* Modify to rename isTsx => isTSXFile

* Modify to no considering file ext

* Support JSXFragment and add tests

* Update CHANGELOG.unreleased.md
2019-10-16 00:11:48 +09:00
Lucas Duailibe 91a7aa081e
Fix more bugs with double slash in TSX (#6289) 2019-07-11 11:27:53 -03:00
Sosuke Suzuki 8812792e93 [TypeScript] Add trailing comma for only arrow functions in tsx. (#6190)
* Modify to add traling comma only for allow-function

* Add tests

* Update CHANGELOG.unreleased.md

* Add pr number and link

* Modify to improve RegExp to detect tsx file
2019-06-07 09:01:58 -03:00
Sosuke Suzuki e3b2f4adb4 Keep a trailing comma in type parameter in .tsx files (#6115) 2019-05-13 14:53:45 -03:00
James Henry ef6386015d fix: update typescript and typescript-estree to latest (#5728) 2019-01-12 11:10:52 +08:00
Ika 4af3dd4b07
test: improve snapshots (#5521)
- before
  ```
  ${input}${"~".repeat(printWidth)}
  ${output}
  ```
- after
  ```
  ===options===
  ${options}
  ${" ".repeat(printWidth)}| printWidth
  ====input====
  ${input}
  ===output====
  ${output}
  =============
  ```
2018-11-25 16:21:14 +08:00
Simen Bekkhus 51b7c02e12 Upgrade jest to 22 (#4782)
* chore: upgrade Jest

* chore: update snapshots

* chore: lock down babel dependency using invalid syntax

* 2 args to test.skip

* use jest 22 for now

* Revert "2 args to test.skip"

This reverts commit 691fdc3f99e320f2303958f2b503f7b4c93fa455.

* remove snapshot name from matcher

* fix standalone tests skips
2018-07-03 03:06:29 -03:00
Ika 6a17474e37 feat(typescript): support generic JSX element (#4268)
* feat(typescript): support generic JSX element

* fix(playground): `buffer is not defined` in `--parser typescript`

* chore(deps): update typescript-eslint-parser
2018-04-24 08:45:31 -05:00
Lucas Duailibe f119d4a90f
Change run_spec to have explicit parser list (#3356) 2017-11-30 03:31:52 -03:00
John Backus 1691b85322 Fix <this.Component /> (#2472)
This is a workaround while waiting on
https://github.com/eslint/typescript-eslint-parser/issues/337.

Fixes #2471
2017-07-13 17:21:46 +10:00
Karl O'Keeffe 5e76ea7bdd Allow single expressions in JSX to be inline 2017-07-10 20:02:30 +01:00
Karl O'Keeffe be600337eb Improve JSX output when there is a single expression (#2274) 2017-06-26 19:05:34 -07:00
Karl O'Keeffe 0cc0ebc3bc Allow JSX lines to be recombined (#1831)
* Allow JSX lines to be recombined

* Add test case for `<br />` breaking expression

* Fix issue where JSX whitespace could be dropped

* Newlines were incorrectly being preserved when JSX contained text
2017-06-22 09:19:44 -07:00
Christopher Chedeau 883e637fa9 Support the Keyword type (#2056)
This is an issue in https://github.com/eslint/typescript-eslint-parser/issues/315

Fixes #2049
2017-06-08 09:25:28 -07:00
Christopher Chedeau 0e35d3758a Fix <this.x /> (#1886)
Would be nice to get it properly handled in https://github.com/eslint/typescript-eslint-parser/issues/307

Fixes #1877
2017-06-02 14:27:27 -07:00
Christopher Chedeau ffc1b3702e Remove parenthesis for JSX inside of arrow functions (#1733)
I didn't intend for putting parenthesis there in the first place but it slept through. Since it was going to trigger a ton of changes I held up changing it, but I feel like we need to do it sooner than later otherwise we're not going to be able to do it. A lot of people writing functional components are going to be very happy about this change :)
2017-05-25 16:26:49 -07:00
Simon Lydell bc5186e544 Run Prettier on all source files (#1648)
This commit updates `npm run format:all` to not only format .js files in
src/ and bin/, but also tests_config/ and scripts/, as well as all
jsfmt.spec.js files.

It also includes the result of running `npm run format:all`, except
changes to src/ and bin/.
2017-05-21 08:13:11 -07:00
Lucas Azzola 44934da349 feat(typescript): add fallback for JSX detection (#1551) 2017-05-08 05:57:19 -07:00