[no-var-requires] Recommendations do not show ES6 Modules example #899
Labels
documentation
Documentation ("docs") that needs adding/updating
has pr
there is a PR raised to close this
package: eslint-plugin
Issues related to @typescript-eslint/eslint-plugin
Repro
Expected Result
Documentation includes an example about ES6 Modules. ie.
Actual Result
Documentation only shows examples for typescript
import foo =
andrequire(...)
Additional Info
The documentation for
no-var-requires
explains thatrequire
code can be replaced by ES6 modulesimport
syntax, but does not give an example of it.We've recently added support for importing from SVG files using ES6 module import syntax (using a webpack loader), but some developers still write using the
require
syntax. When they do, they get the lint error which then instructs them to write in a different syntax than we support. While the docs do list ES6 modules as an option, they don't provide an example, which has confused some of our developers.What I would love to see would be:
Versions
@typescript-eslint/eslint-plugin
1.10.2
@typescript-eslint/parser
1.10.2
TypeScript
3.2.2
ESLint
5.16.0
node
10.15.3
npm
6.4.1
The text was updated successfully, but these errors were encountered: