Commit Graph

1028 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 453eb6c287 Split parser into different files (#1793)
This is the first step in order to be able to bundle all those parsers in their own file to get rid of all the dependencies that prettier has.
2017-05-28 21:06:09 -07:00
Christopher Chedeau 310fba57cc Add a test with all the less docs and fix issues (#1792)
The docs go over a bunch of edge cases, might as well have it as a test :)

http://lesscss.org/features/

I just had to remove

```css
.weird-element {
  content: ^//* some horrible but needed css hack;
}
```

but i'm not sure if it's real less.
2017-05-28 16:05:26 -07:00
Christopher Chedeau 5a828bedd1 Update eslint-typescript again (#1791)
Now fixes more issues ;)
2017-05-28 16:05:07 -07:00
Christopher Chedeau 63742bac56 fix lint 2017-05-28 15:09:52 -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 3d6acd8648 Fix log issue 2017-05-28 13:54:54 -07:00
Christopher Chedeau 882b712c5f Update typescript-eslint (#1787)
It improves a few things.
2017-05-28 13:18:29 -07:00
Marcel Mokoš f0683b8e1a Update README.md version of prettier in pre-commit (#1788)
- a version of prettier to latest in README in pre-commit config yaml example
2017-05-28 12:24:50 -07:00
Lucas Azzola e270032d37 chore(typescript): upgrade typescript-eslint-parser to 992f1fa (fixes #1769) (#1785) 2017-05-28 08:05:33 -07:00
Lucas Azzola 2f840f940f test(typescript): disable failing tests (#1782) 2017-05-27 18:22:32 -07:00
Lucas Azzola 2a58e6bc06 test(typescript): enable typescript-verify on most tests (#1781) 2017-05-27 17:57:07 -07:00
Christopher Chedeau 383aaca0e4 Fix decorators location (#1779)
Babylon has a bug (I guess) with locations for classes where decorators are involved. Instead of the class starting at the first decorator, it starts at the beginning of the `class` keyword. By moving the location to the first comment, it solves --some-- of the issues with decorator comments.
2017-05-27 14:51:00 -07:00
Christopher Chedeau c0d6ce53b7 lint 2017-05-27 14:11:30 -07:00
Christopher Chedeau 0c977a785b fix tests 2017-05-27 14:11:02 -07:00
Christopher Chedeau 37eda1f17a Only inline urls with a single argument (#1778) 2017-05-27 14:09:40 -07:00
Christopher Chedeau 6f72e278e9 Do not break before `+` (#1777)
We really want to parse those as binary expressions but it's not going to be trivial. A quick fix that should help is to not break before those.
2017-05-27 13:41:19 -07:00
Christopher Chedeau 122bb65f16 fix lint 2017-05-27 13:32:53 -07:00
Christopher Chedeau 375540efac Remove many spaces from media query (#1776)
The issue is really that the media query parser fails to parse the inner queries and just gives a raw string for the expression, but it should be safe to remove extra spaces. I can't make it rmeove spaces inside () that way unfortunately :(
2017-05-27 13:32:27 -07:00
Christopher Chedeau 48d35503c4 Remove space around media `and` (#1775) 2017-05-27 13:24:08 -07:00
Christopher Chedeau adb26e20ad Add space around ~ combinator (#1774) 2017-05-27 13:20:32 -07:00
Christopher Chedeau 54497a0865 Skip extra `;` (#1773) 2017-05-27 13:20:19 -07:00
Christopher Chedeau bb0c184855 Fix broken tests
If you put a space, `{loose: true}` is going to parse them as word + paren instead of func. It doesn't impact correctness and i'm not really sure how to clean the ast, so let's just make the test pass. I haven't seen this anywhere in real code.
2017-05-27 13:16:11 -07:00
Christopher Chedeau 3c110b0230 Indent groups (#1772)
This way it looks less weird when they break
2017-05-27 13:01:38 -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
Lucas Azzola 2c62b5bebe feat(number): trim extra trailing zeroes (#1768) 2017-05-27 10:46:45 -07:00
Lucas Azzola 91bcde9859 fix(typescript): fix unstable optional method (#1770) 2017-05-27 07:24:54 -07:00
Lucas Azzola 59a760c5d8 TypeScript: fix namespace comment printing (#1765)
* fix(typescript): fix namespace comment printing

* fix(typescript): remove extra newline after comment

* chore(lint): lint changes
2017-05-26 21:30:42 -07:00
Lucas Azzola 934216d852 fix(typescript): allow parens with TSFunctionType and ignore empty specifiers (#1764) 2017-05-26 20:47:48 -07:00
Lucas Azzola b265713763 fix(typescript): handle ExperimentalSpreadOperator, optional method, and abstract interface (#1763) 2017-05-26 20:19:17 -07:00
Christopher Chedeau f66d1b05d6 Add support for insensitive attribute match (#1760)
I had no idea this existed!
2017-05-26 19:30:29 -07:00
Christopher Chedeau 1255c5c51b Ignore trailing comma from the ast (#1761)
This doesn't change the semantics
2017-05-26 19:30:21 -07:00
Christopher Chedeau 044a58bb6f Add support for value-colon (#1753) 2017-05-26 15:58:09 -07:00
Christopher Chedeau 7ad38c525e Skip params in --debug-check (#1754) 2017-05-26 15:58:00 -07:00
Christopher Chedeau 2a33309e3d Print selector-string (#1759) 2017-05-26 15:54:39 -07:00
Christopher Chedeau 4b727daa54 prettify... 2017-05-26 15:40:28 -07:00
Christopher Chedeau d71e95af6d Merge conflict :( 2017-05-26 15:30:59 -07:00
Christopher Chedeau 2007961581 Preserve stack 2017-05-26 15:29:59 -07:00
Christopher Chedeau 060ea6c0da Also add the stack for postcss errors (#1758) 2017-05-26 15:17:46 -07:00
Christopher Chedeau 4d9c67af15 Better error message for selector parsing error (#1756) 2017-05-26 14:59:46 -07:00
Christopher Chedeau 855a701309 Preserve comments for selectors (#1755) 2017-05-26 14:55:41 -07:00
Christopher Chedeau b27849def4 fix format 2017-05-26 13:54:20 -07:00
Christopher Chedeau b11b89d2af Inline url() even if unquoted (#1752) 2017-05-26 13:45:15 -07:00
Christopher Chedeau 2f6d12aaa8 Inline url('string') (#1751)
We don't want them to break even if they go beyond 80 columns
2017-05-26 13:42:32 -07:00
Simon Lydell 48d9267dd5 Fix lint error 2017-05-26 22:13:29 +02:00
Simon Lydell fe48638376 Don't pass too many arguments to functions (#1750)
Found using Flow.
2017-05-26 13:01:03 -07:00
Christopher Chedeau f9e324c4d0 Add the ability for SequenceExpression to break (#1749)
Fixes #1742
2017-05-26 12:29:00 -07:00
Christopher Chedeau 5f73ba29ed Add parens for expressions inside TSNonNullExpression (#1748)
Fixes #1695
2017-05-26 12:03:27 -07:00
Christopher Chedeau 7486756dd6 Fix master 2017-05-26 12:02:59 -07:00
Christopher Chedeau 5c462cc8e1 Remove ast-types (#1747)
Yay!
2017-05-26 11:54:43 -07:00