mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Enable the ESLint no-var
rule globally
A significant portion of the code-base has now been converted to use `let`/`const`, rather than `var`, hence it should be possible to simply enable the ESLint `no-var` rule globally. This way we can ensure that new code won't accidentally use `var`, and it also removes the need to manually enable the rule in various folders. Obviously it makes sense to continue the efforts to replace `var`, but that should probably happen on a file and/or folder basis. Please note that this patch excludes the following code: - The `extensions/` folder, since that seemed easiest for now (and I don't know exactly what the support situation is for the Chromium-extension). - The entire `external/` folder is ignored, since most of it's currently excluded from linting. For the code that isn't imported from elsewhere (and should be ignored), we should probably (at some point) bring the code up to the same linting/formatting standard as the rest of the code-base. - Various files in the `test/` folder are ignored, as necessary, since the way that a lot of this code is loaded will require some care (or perhaps larger re-factoring) when removing `var` usage.
This commit is contained in:
parent
17c0bf0473
commit
5b5061afa8
22 changed files with 22 additions and 36 deletions
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"extends": [
|
||||
"../.eslintrc"
|
||||
],
|
||||
|
||||
"rules": {
|
||||
// ECMAScript 6
|
||||
"no-var": "error",
|
||||
},
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
},
|
||||
|
||||
"extends": [
|
||||
"../.eslintrc"
|
||||
"../../.eslintrc"
|
||||
],
|
||||
|
||||
"env": {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
},
|
||||
|
||||
"extends": [
|
||||
"../.eslintrc"
|
||||
"../../.eslintrc"
|
||||
],
|
||||
|
||||
"env": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue