apertium / apertium-html-tools

Web application providing a fully localised interface for text/website/document translation, analysis and generation powered by Apertium.
http://wiki.apertium.org/wiki/Apertium-html-tools
GNU General Public License v3.0
41 stars 89 forks source link

Change ESLint comma-dangle to always-multiline, except for function args #401

Closed TinoDidriksen closed 3 years ago

TinoDidriksen commented 3 years ago

The diff from https://github.com/apertium/apertium-html-tools/pull/400 has superfluous line changes, which made me realize this project enforces no trailing commas. So change that to enforce trailing commas, except for function args, as this reduces diff overhead and copy-paste errors. It is a travesty that JSON doesn't allow trailing commas, but we should absolutely require it for all JS lists.

TinoDidriksen commented 3 years ago

We should also set https://eslint.org/docs/rules/no-var in the future, though that requires a lot more testing to ensure all scopes are actually correct.

TinoDidriksen commented 3 years ago

That makes sense. IE11 is the only one anyone needs to care about these days, but IE11 is unfortunately still relevant. Luckily, IE11 supports trailing commas and let.