Commit Graph

114 Commits (05b921efdd3e1e63091c0e63e47fe7c013530e7e)

Author SHA1 Message Date
Christopher Chedeau 05b921efdd Build the dist/ with rollup (#1794) 2017-05-28 21:49:41 -07:00
Christopher Chedeau 5a828bedd1 Update eslint-typescript again (#1791)
Now fixes more issues ;)
2017-05-28 16:05:07 -07:00
Christopher Chedeau 97775dc94c Add support for SCSS (#1790)
We use a heuristic to figure out if it's a SCSS or Less file. And if it doesn't work, we try again with the other one. We do the same for JSX and TypeScript.

Fixes #1784
2017-05-28 15:01:47 -07:00
Christopher Chedeau 882b712c5f Update typescript-eslint (#1787)
It improves a few things.
2017-05-28 13:18:29 -07:00
Lucas Azzola e270032d37 chore(typescript): upgrade typescript-eslint-parser to 992f1fa (fixes #1769) (#1785) 2017-05-28 08:05:33 -07:00
Christopher Chedeau f3823276eb Enable loose mode for postcss-values-parser (#1766)
Fixes https://github.com/shellscape/postcss-values-parser/issues/29
2017-05-27 11:15:05 -07:00
Christopher Chedeau 5c462cc8e1 Remove ast-types (#1747)
Yay!
2017-05-26 11:54:43 -07:00
Christopher Chedeau 5e0fa00725 Upgrade typescript-eslint to 31ad3c (#1738)
Fixes #1737
2017-05-25 19:04:15 -07:00
Christopher Chedeau 2e92e4e17d Update to flow 0.47 (#1736)
Fixes #1469
Fixes #1457
Fixes #425
2017-05-25 17:00:36 -07:00
Christopher Chedeau 78ba808322 Initial CSS support (#1636)
I wanted to see how hard it would be to add support for CSS inside of prettier. Turns out, it's not that hard. I spent a few hours printing post-css values and getting all the stylefmt unit tests to not throw.
2017-05-24 10:52:12 -07:00
Michał Pierzchała 7a0df958dc Ignore node_modules when running prettier from CLI (#1683)
* Ignore node_modules by default

* Add integration test suite for --with-node-modules CLI arg

* Refactor tests to snapshots

* Disable eslint for purposely faulty files

* Fix node 4

* Fix prettier

* Gitignore only top-level node_modules
2017-05-23 14:19:04 -07:00
Brian Ng d608b7ba28 Bump Babylon and enable additional tests (#1668) 2017-05-22 15:31:53 -07:00
Joseph Frazier fa8408b53f Upgrade typescript parser, fix and run AST tests on Travis (#1657)
* Run `yarn` to update yarn.lock

* Upgrade typescript-eslint-parser, use JSXText instead of Literal for strings inside JSXElement

https://github.com/eslint/typescript-eslint-parser/pull/272 was merged,
so this fixes https://github.com/prettier/prettier/issues/1558

See here for more info about the new TSQualifiedName node type:
3491b4b73a

* Run AST comparison tests on Travis
2017-05-21 14:16:24 -07:00
Simon Lydell 378682350f Improve ESLint setup and fix errors (#1656)
* Improve ESLint setup

- Uses `eslint:recommended` + a handful more rules.
- Uses .eslintignore so that editors can understand which files to lint.
- Uses .eslintrc<strong>.js</strong> so more editors get syntax highlighting.

* Fix ESLint errors

About half of them were fixed by `eslint . --fix`.
2017-05-21 12:11:09 -07:00
Joseph Frazier d7aaaee0dd Add `lint` script, run it on Travis, prettify source code (#1634)
* Add `lint` script with eslint-plugin-prettier, use it in `format:all`

See https://github.com/prettier/prettier/pull/1634#issuecomment-302945967

* Run `lint` script on Travis

* Run Prettier on its own source code

This was done with

    npm run format:all
2017-05-21 11:00:16 -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
Danny Martini e1fdf78863 upgrade typescript-elint-parser and enable most ts tests again (#1649) 2017-05-21 07:53:00 -07:00
Danny Martini fc60d548aa Fix/ts interface heritage (#1601)
* fix TSCallSignature

* fix TSTypeReference

* remove test with invalid syntax

* --wip--

* partially fix TSTypeReference

* get comments right for TypeScript interfaces
2017-05-20 03:15:50 -07:00
Danny Martini 19183e6452 fix TSInterfaceDeclaration, TSInterfaceBody, TSInterfaceHeritage (#1599) 2017-05-12 17:13:38 -07:00
Danny Martini c86a57a91e fix TSFunctionType (#1600) 2017-05-12 15:33:03 -07:00
Danny Martini 2c76bfe1e1 update typescript parser (#1578)
* update eslint-parser-typescript

* fix comment parsing

* disable all failing tests

* fix TSInterfaceDeclaration

* fix #1537

* only disable typescript tests for tests/function
2017-05-10 14:11:50 -07:00
Simen Bekkhus ed24bff251 Upgrade jest (#1534)
* Upgrade jest

* yarn upgrade
2017-05-06 07:40:40 -07:00
Christopher Chedeau 515a565a66 1.3.1 (hotfix) 2017-05-03 14:44:08 -07:00
Christopher Chedeau a81d5c1cd1 1.3.0 2017-05-02 13:15:15 -07:00
Lucas Azzola 7d1e24ea7d Add supertype tests and add TSAbstractClassProperty (#1467)
* feat(typescript): add supertype tests and add TSAbstractClassProperty

* chore(typescript): bump parser version

* fix(flow): allow both variance and accessibility mods
2017-04-30 17:41:19 -07:00
Christopher Chedeau 3161bd0787 Upgrade flow parser to 0.45 (#1447)
This fixes all the unicode issues and spacing between elements in array.

Fixes #1336
Fixes #1427
Fixes #770
2017-04-27 14:59:18 -07:00
Christopher Chedeau 88e004184b 1.2.2 2017-04-19 13:19:26 -07:00
Christopher Chedeau 076804c09c 1.2.1 2017-04-19 12:00:25 -07:00
Christopher Chedeau bc53920734 1.2.0 2017-04-19 11:01:44 -07:00
Christopher Chedeau ad637d0744 1.1.0
This fixes a regression from 0.22 around member expressions breaking and fixes no-semi placement around leading comments, plus some other minor fixes.
2017-04-13 18:40:04 -07:00
Christopher Chedeau 22f5ba0989 change semi default 2017-04-13 10:18:50 -07:00
Christopher Chedeau 23756cdc59 1.0 2017-04-13 09:28:42 -07:00
Jan Kassens b82220b20f Prittier printing of snapshots (#1190)
This uses a custom snapshot serializer to reduce escaping in snapshot files and
make them easier to read.

Snapshot serializers are documented here:
https://facebook.github.io/jest/docs/configuration.html#snapshotserializers-array-string
2017-04-12 13:41:51 -07:00
Simon Lydell dc93bdc983 Sync the Flow tests (#1163)
* Extract custom tests from tests/flow/

Approach:

1. Remove all .js files in tests/flow except .snap.js files.
2. Copy over all .js files from tests/ in the flow repo.
3. Go through the diff looking for deletions.
   - It was easy to see which deletions were due to changes in the tests
     due to updates in the flow repo.
   - For the rest of the deletions, I used `git blame` to verify that
     they had been added by us since the flow tests were copied over.

This makes tests/flow/ simply a copy of the tests from the flow repo,
making it easier to sync with the upstream flow tests in the future.

* Add a script for syncing the flow tests

* Sync the flow tests
2017-04-08 07:52:38 -07:00
Christopher Chedeau 1578e180f4 Add support for flow type spread in .43 and babylon beta8 (#1064)
Fixes https://twitter.com/ryyppy/status/844116626467438592
2017-04-04 14:52:16 -07:00
Brian Ng d9a4efcc35 Bump babylon to 7.0.0-beta.8 (#1118)
* Bump babylon version

* Enable flow predicate tests in babylon
2017-04-04 14:21:56 -07:00
Christopher Chedeau 569791a57a Update babylon to 7.0.0-beta.4 (#1047)
Fixes #700
2017-03-20 12:46:31 -04:00
Christopher Chedeau b012f7531e Fix comments inside of ObjectPattern (#1045)
ast-types was missing a type, I sent a PR on ast-type ( https://github.com/benjamn/ast-types/pull/211 ) which was merged and released (thanks @benjamn for being super quick!). So I'm upgrading ast-types and add the test in this PR.

Fixes #1007
2017-03-20 12:42:07 -04:00
Rasmus Eneman e41ed4955d [WIP] Add some typescript tests (#1033)
* Add some typescript tests

* fix: Remove extraneous colon in type parameter constraint

* style: Add missing newline at EOF in TS tests

* feat: Pretty print typescript object type annotations

* feat: Pretty print TSFunctionType

* fix: Type annotations was missing on class properties

* Add a new batch of tests

* Bump typescript-eslint-parser

* Add a new batch of tests and fix a syntax error in previous

* Bump typescript-eslint-parser
2017-03-19 08:06:52 -07:00
Simen Bekkhus 0fc8584827 Update repo links (#993) 2017-03-13 14:39:54 -07:00
Christopher Chedeau 344401c038 0.22.0 2017-03-09 09:15:40 -08:00
James Henry 72456bf06f [WIP] TypeScript Parser (#915)
* WIP immediate feedback

* typescript parser is drop-in replacement for flow parser

* Add new TypeScript Parser snapshots where drop-in replacement possible

* Snapshot updates after rebasing

* Remove unnecessary stripping of properties on TypeScript parser AST

* Remove annotated issues

* Move TS dependencies to dev for now
2017-03-08 13:18:13 -08:00
Christopher Chedeau b570154dd5 0.21.0 2017-03-03 14:03:36 -08:00
Christopher Chedeau e09bdd4447 0.20.0 2017-02-28 10:49:30 -08:00
Christopher Chedeau edf2bde590 Fix trailing commas in docs (#825)
I also added support for parser dropdown and stop minifying the bundle so that the flow parser actually works.

Fixes #816
2017-02-27 17:02:41 -05:00
Christopher Chedeau 1b9234a8c4 Update flow to 0.40 (#808)
This fixes the bug with comments swapped between `/*` and `//`

Fixes #755
2017-02-24 15:46:20 -08:00
Christopher Chedeau e0cac2049d 0.19.0 2017-02-23 09:52:55 -08:00
Brian Ng 543e62cd31 Revert babylon bump (#792) 2017-02-23 09:00:57 -08:00
Brian Ng 211deb527e Bump babylon & add test for async func decl (#790)
* Add test for async function declaration

* Bump babylon version
2017-02-23 09:32:20 -05:00
Rogelio Guzman e039ca888a Upgrade to Jest 19.0.1 (#779) 2017-02-22 10:28:17 -08:00