Enable the ESLint no-var rule in the src/display/ folder

Previously this rule has been enabled in the `web/` folder, and in select files in the `src/` sub-folders.
Note that a number of the files in the `src/display/` folder were already enforcing the `no-var` rule, and thanks to Prettier the necessary re-writing will be (mostly) handled automatically.

Please find additional details about the ESLint rule at https://eslint.org/docs/rules/no-var
This commit is contained in:
Jonas Jenwald 2020-10-02 13:49:53 +02:00
parent 88f72d6b1c
commit 2a8983d76b
9 changed files with 10 additions and 8 deletions

10
src/display/.eslintrc Normal file
View File

@ -0,0 +1,10 @@
{
"extends": [
"../../.eslintrc"
],
"rules": {
// ECMAScript 6
"no-var": "error",
},
}

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
import {
addLinkAttributes,

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
/**
* @module pdfjsLib

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
import {
assert,

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
import {
AbortException,

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
import {
assert,

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
/* globals __non_webpack_require__ */
/* eslint no-var: error */
import { BaseCanvasFactory, BaseCMapReaderFactory } from "./display_utils.js";
import { isNodeJS } from "../shared/is_node.js";

View File

@ -13,7 +13,6 @@
* limitations under the License.
*/
/* globals __non_webpack_require__ */
/* eslint no-var: error */
import {
createObjectURL,

View File

@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* eslint no-var: error */
import { assert, createPromiseCapability } from "../shared/util.js";