editorconfig-tools
editorconfig-tools copied to clipboard
Often skips single vs double quote check
I want to enforce single quotes for strings across all my JavaScript (*.js) files, but for some reason this linter is ignoring lib/regenboog.js
.
Code:
https://github.com/mcandre/regenboog/tree/ac12033014bc08e08988ecedb461263b8005f4a4
Configuration:
[*.js]
quote_type = single
Trace:
$ grunt editorconfig
Running "exec:editorconfig" (exec) task
./Gruntfile.js failed max_line_length on line 16: line is 1337 chars, it should be 800
./passwords.txt failed trim_trailing_whitespace on line 2627: found setting 'false', should be 'true'
./README.md failed indent_char: found setting ' ', should be ' '
Actually, it should always skip single vs double quote checks... we don't have a rule defined for that yet.
I would be happy to add one, but I'm pretty sure this requires language-specific parsing, right?
That would be a great addition!
Ideally, this feature would be supported for JavaScript, Ruby, Python, and Bash, since those languages tend to have the most single vs double quote fights.
You can't do that w/o parsing the file into a language-specific syntax tree. CodePainter does this for JavaScript.
@slang800 this issue should be closed as a wontfix
. There's no way to do it w/o knowledge of the language being formatted.