Joseph Frazier
5ca2117d23
(Babylon) Fall back to non-strict mode ( #1587 )
...
* (Babylon) Fall back to non-strict mode
This makes Prettier a little less opinionated about linting. For
example, the following can now be formatted:
```js
function f(a,a){return a}
```
whereas before it would cause an error:
stdin: SyntaxError: Argument name clash in strict mode (1:13)
> 1 | function f(a,a){return a}
| ^
This also allows octal numbers to be parsed,
and therefore fixes https://github.com/prettier/prettier/issues/228
If the code parses neither as strict nor as non-strict, the error from the
strict parse is thrown (as it was before this change).
---
I noticed this while trying out [eslump] with prettier:
eslump | pbcopy; pbpaste | prettier
[eslump]: https://github.com/lydell/eslump
* Add missing test
* Use Object.assign() instead of mutating object
2017-05-12 07:32:27 -07:00
..
2017-04-12 13:41:51 -07:00
2017-05-01 14:41:18 -07:00
2017-04-30 17:49:31 -07:00
2017-04-30 17:49:31 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-11 19:06:54 -07:00
2017-04-12 13:41:51 -07:00
2017-05-05 21:44:50 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 21:07:55 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 16:02:49 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-04 09:40:11 -07:00
2017-04-19 11:59:23 -07:00
2017-04-22 07:57:52 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-11 08:04:54 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 14:13:34 -07:00
2017-05-01 14:39:46 -07:00
2017-05-04 19:06:30 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-01 14:42:52 -07:00
2017-04-24 16:58:30 -04:00
2017-04-27 11:21:42 -07:00
2017-05-03 15:50:48 -07:00
2017-05-10 14:11:50 -07:00
2017-05-01 19:12:53 -07:00
2017-04-12 17:26:44 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-05 21:44:50 -07:00
2017-05-10 16:13:21 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-13 07:09:40 -07:00
2017-05-10 16:13:21 -07:00
2017-04-13 07:09:40 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 16:13:21 -07:00
2017-04-12 13:41:51 -07:00
2017-05-01 14:32:52 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 21:07:55 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-01 14:41:34 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-03 15:50:48 -07:00
2017-04-27 14:00:04 -07:00
2017-05-12 07:32:27 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-18 08:39:47 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 16:02:49 -07:00
2017-05-05 21:39:11 -07:00
2017-04-12 13:41:51 -07:00
2017-04-13 07:10:08 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-03 14:35:58 -07:00
2017-04-14 16:02:19 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 21:07:55 -07:00
2017-05-01 14:28:11 -07:00
2017-05-01 14:32:52 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 14:18:29 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-10 14:11:50 -07:00
2017-05-05 21:39:20 -07:00
2017-05-07 07:39:21 -07:00
2017-05-08 05:57:19 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-27 14:59:18 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-04-12 13:41:51 -07:00
2017-05-03 15:50:48 -07:00
2017-05-01 14:39:03 -07:00
2017-05-03 15:50:48 -07:00
2017-04-12 13:41:51 -07:00