javascript - JSHint reports undefined global despite `globals` setting -


jshint reporting undefined variables despite globals setting. here minimal example:

file.js:

// jshint esversion: 6, node: true // globals intl  'use strict'; let percent = new intl.numberformat("en-us", { style: "percent" }).format; 

running jshint file.js

index2.js: line 5, col 19, 'intl' not defined.  1 error 

any idea wrong configuration? note there no .jshintrc, configuration jshint comments @ beginning of file.js.

to honest, never saw use of simple single-line comment // configure jshint/globals.

try with multi-line comment style, /* globals my_lib: false */ per defined in: http://jshint.com/docs/


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -