From 80d7ff49126b40e82370c5378e1636949db76d5d Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Thu, 6 Dec 2018 13:54:38 +0100 Subject: [PATCH] Turn on ESLint in examples directory, apply examples-specific exceptions --- .eslintignore | 1 - examples/.eslintrc | 24 ++++++++++++++++++++++++ examples/node/.eslintrc | 9 +++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 examples/.eslintrc create mode 100644 examples/node/.eslintrc diff --git a/.eslintignore b/.eslintignore index ae12e8426..fe81ce21a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,7 +2,6 @@ build/ l10n/ docs/ node_modules/ -examples/ external/bcmaps/ external/webL10n/ external/cmapscompress/ diff --git a/examples/.eslintrc b/examples/.eslintrc new file mode 100644 index 000000000..240b325f9 --- /dev/null +++ b/examples/.eslintrc @@ -0,0 +1,24 @@ +{ + "extends": [ + "../.eslintrc" + ], + + "parserOptions": { + "ecmaVersion": 5, + }, + + "env": { + "es6": false, + }, + + "globals": { + "pdfjsImageDecoders": false, + "pdfjsLib": false, + "pdfjsViewer": false, + "Uint8Array": false, + }, + + "rules": { + "object-shorthand": ["error", "never"] + } +} diff --git a/examples/node/.eslintrc b/examples/node/.eslintrc new file mode 100644 index 000000000..46f120c21 --- /dev/null +++ b/examples/node/.eslintrc @@ -0,0 +1,9 @@ +{ + "extends": [ + "../.eslintrc" + ], + + "env": { + "node": true, + }, +}