Comments (5)
Actually, I realized this task isn't done. Escaping <CR><LF> doesn't work!
$ hexdump -C hello.js
00000000 63 6f 6e 73 6f 6c 65 2e 6c 6f 67 28 22 68 65 6c |console.log("hel|
00000010 6c 6f 5c 0d 0a 77 6f 72 6c 64 22 29 3b |lo\..world");|
0000001d
$ node hello.js
helloworld
$ ./build/quick-lint-js hello.js
hello.js:1:13: error: unclosed string literal
../src/parse.cpp:413: internal check failed in parse_expression_remainder: this->peek().type == token_type::right_paren
zsh: illegal hardware instruction ./build/quick-lint-js hello.js
from quick-lint-js.
I knew there was more to this task than met the eye. I just forgot what the gotcha was. =]
from quick-lint-js.
@strager Just wanted to make sure I'm reproducing the problem correctly here. In vscode with end of line sequence set to CRLF.
This should report no error, right?
from quick-lint-js.
Just to clarify, templates don't require the escaped newline like strings, so the rules are a bit different.
# valid
let a = `hello
world`;
from quick-lint-js.
This was implemented by @AngelJA.
from quick-lint-js.
Related Issues (20)
- Fix mixing '..' in symlinks with Windows junctions
- 10$: Warn on let ({x} = y); HOT 6
- Struggling to run eslint benchmarks on macOS HOT 4
- 10$: improve error on greek question mark HOT 2
- 10$: warn on 'typeof x === undefined' HOT 17
- error on 'x++.toString()' HOT 4
- avoiding ALE HOT 4
- 12$: diagnostic: typeof operator should warn when comparing to invalid string literals HOT 6
- Error use of undeclared type on types defined in `.d.ts` files HOT 1
- Issue when trying to build from source HOT 2
- feature request: add DOM types to builtin symbol list HOT 1
- 12$: warn on '} if' on same line with no 'else' HOT 4
- 9$: warn on 'keyof T[]' in type
- Use of undeclared variable `await` HOT 2
- Would be nice to handle case like: SyntaxError `...` must be followed by an identifier in declaration contexts
- launchQueue global from Launch Handler API is not predeclared
- Unexpected token error for valid code
- Type imports are incorrectly reported as unused
- 12$: Improve diagnostic for myArray[a:b]
- Config per file with comments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quick-lint-js.