This website requires JavaScript.
Explore
Help
Sign In
vitalif
/
prettier
Watch
1
Star
0
Fork
You've already forked prettier
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
e068c318b4
prettier
/
tests
/
non-strict
/
octal-number.js
2 lines
5 B
JavaScript
Raw
Normal View
History
Unescape
Escape
(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 17:32:27 +03:00
0777