prettier/src
Joseph Frazier 5f063ab168 Fix locEnd() for postcss parser (#2295)
* Fix locEnd() for postcss parser

`node.source` doesn't have an `end`, but `node.nodes[-1].source` does.

Fixes https://github.com/prettier/prettier/issues/2267

* Add regression test for https://github.com/prettier/prettier/issues/2267

See https://github.com/prettier/prettier/pull/2295#issuecomment-311484343

* Make locEnd() postcss fix more focused

This passes the tests again.

* Use getLast() instead of .slice()

See https://github.com/prettier/prettier/pull/2295#discussion_r124398553

* Move CSS range test into tests/range_css

This is so that the AST_COMPARE=1 tests don't try to parse CSS with Flow.
2017-06-27 15:12:22 -07:00
..
clean-ast.js CSS: lowercase hex colors, closes #2139 (#2203) 2017-06-20 23:07:31 +10:00
comments.js Support for printing GraphQL comments (#2187) 2017-06-18 07:37:52 -10:00
deprecated.js Run prettier on 0.13.0 (#497) 2017-01-28 07:50:22 -08:00
doc-builders.js Add `cursorOffset` option for cursor translation (#1637) 2017-06-01 15:52:29 -07:00
doc-debug.js Remove unnecessary 'else' after 'return' (#1987) 2017-06-05 15:12:59 -07:00
doc-printer.js Remove unnecessary 'else' after 'return' (#1987) 2017-06-05 15:12:59 -07:00
doc-utils.js Fix up empty JSX element detection (#2220) 2017-06-21 13:48:02 -07:00
fast-path.js Update tsep (#2153) 2017-06-15 08:55:23 -10:00
multiparser.js Add \n at the end of .graphql files (#2285) 2017-06-27 09:49:15 -07:00
options.js Add .graphql detection (#2256) 2017-06-24 11:14:36 -07:00
parser-babylon.js Turn allowImportExportEverywhere on (#2207) 2017-06-20 14:42:58 -07:00
parser-create-error.js Upgrade babel code frame (#1902) 2017-06-02 14:11:05 -07:00
parser-flow.js Add "use strict" to fix SyntaxError on Node@4 (#1988) 2017-06-05 18:27:55 -07:00
parser-graphql.js Support for printing GraphQL comments (#2187) 2017-06-18 07:37:52 -10:00
parser-include-shebang.js Add shebang comment nodes to Flow/TypeScript ASTs (#1905) 2017-06-02 13:38:15 -07:00
parser-json.js Format JSON literals like object literals (#2181) 2017-06-17 20:49:22 -04:00
parser-parse5.js Vue: pretty-print binding syntax (#2108) 2017-06-14 22:33:15 +10:00
parser-postcss.js First try scss when there's an @import with comma (#2225) 2017-06-21 15:45:55 -07:00
parser-typescript.js Override tsep loggerFn with noop (#2144) 2017-06-14 14:53:05 -07:00
parser.js Add JSON support (#2173) 2017-06-17 10:36:42 -10:00
printer-graphql.js Add \n at the end of .graphql files (#2285) 2017-06-27 09:49:15 -07:00
printer-htmlparser2.js Vue: pretty-print binding syntax (#2108) 2017-06-14 22:33:15 +10:00
printer-postcss.js Use fill for CSS values (#2224) 2017-06-21 15:13:51 -07:00
printer.js Inline import('x') to avoid having trailing , (#2288) 2017-06-27 11:40:20 -07:00
util.js Fix locEnd() for postcss parser (#2295) 2017-06-27 15:12:22 -07:00