pdf.js/external/builder
Jonas Jenwald 1d2f787d6a Enable the ESLint no-shadow rule
This rule is *not* currently enabled in mozilla-central, but it appears commented out[1] in the ESLint definition file; see https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/tools/lint/eslint/eslint-plugin-mozilla/lib/configs/recommended.js#238-239

Unfortunately this rule is, for fairly obvious reasons, impossible to `--fix` automatically (even partially) and each case thus required careful manual analysis.
Hence this ESLint rule is, by some margin, probably the most difficult one that we've enabled thus far. However, using this rule does seem like a good idea in general since allowing variable shadowing could lead to subtle (and difficult to find) bugs or at the very least confusing code.

Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-shadow

---
[1] Most likely, a very large number of lint errors have prevented this rule from being enabled thus far.
2020-03-25 11:56:05 +01:00
..
fixtures Add the external/builder/fixtures/ directory to .eslintignore, to avoid having to disable various lint rules locally 2017-01-10 14:45:40 +01:00
fixtures_esprima Fix duplicated function name in the Esprima fixtures 2018-08-25 16:23:20 +02:00
builder.js Fix the linting errors, from the Prettier auto-formatting, that ESLint --fix couldn't handle 2019-12-26 12:35:12 +01:00
preprocessor2.js Enable the ESLint no-shadow rule 2020-03-25 11:56:05 +01:00
test-fixtures_esprima.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
test-fixtures.js Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00