Skip to content

Commit 5ab13a8

Browse files
ryanwilsonperkinbradzacher
authored andcommitted
docs(eslint-plugin): no-var-requires: Add example for ES6 modules (typescript-eslint#900)
Fixes typescript-eslint#899 Adds an example to the documentation for replacing `require` with ES6 modules. Since this isn't going to work on everyone's system, I'm happy to also add a comment on this line stating the restrictions if the maintainers of this think it would be appropriate.
1 parent cddfdca commit 5ab13a8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/eslint-plugin/docs/rules/no-var-requires.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Examples of **correct** code for this rule:
1717
```ts
1818
import foo = require('foo');
1919
require('foo');
20+
import foo from 'foo';
2021
```
2122

2223
## When Not To Use It

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy