Skip to content

Commit

Permalink
Upgrade to eslint version 6
Browse files Browse the repository at this point in the history
This major version bump required two changes:

- The global line in the mobile viewer example should be removed because
  the `.eslintrc` file already defines these globals and with the new
  `eslint` version we otherwise get an error saying "'pdfjsLib' is already
  defined as a built-in global variable".
- The ECMA version for the examples must be set to 6 since we're using
  modules, otherwise we get an error saying "sourceType 'module' is not
  supported when ecmaVersion < 2015". It turns out that the previous
  version of `eslint` already used ECMA version 6 silently even though
  we set 5, see eslint/eslint#9687 (comment),
  so in terms of our code nothing really changes.
  • Loading branch information
timvandermeij committed Aug 24, 2019
1 parent d9cd890 commit 215c546
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 189 deletions.
2 changes: 1 addition & 1 deletion examples/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
],

"parserOptions": {
"ecmaVersion": 5,
"ecmaVersion": 6,
},

"env": {
Expand Down
1 change: 0 additions & 1 deletion examples/mobile-viewer/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/* globals pdfjsLib, pdfjsViewer */

'use strict';

Expand Down
Loading

0 comments on commit 215c546

Please sign in to comment.