From dfb3dc655c2bb54dffc7b685392a2b8dc1e71e7f Mon Sep 17 00:00:00 2001 From: Benjamin Arbogast Date: Thu, 21 May 2020 18:20:32 +0200 Subject: [PATCH] [no-unused-rules]: Fix docs for unused exports First change: Change `import * from 'file-c'` to `import * as fileC from 'file-c'`. The former isn't valid javascript, right? Second change: Remove example 'file-d', I couldn't see a difference from 'file-c' Third change: Rename 'file-e' to 'file-d'. --- docs/rules/no-unused-modules.md | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/rules/no-unused-modules.md b/docs/rules/no-unused-modules.md index 4302bc8458..8c234202f8 100644 --- a/docs/rules/no-unused-modules.md +++ b/docs/rules/no-unused-modules.md @@ -58,28 +58,22 @@ given file-f: ```js import { e } from 'file-a' import { f } from 'file-b' -import * from 'file-c' -export * from 'file-d' -export { default, i0 } from 'file-e' // both will be reported +import * as fileC from 'file-c' +export { default, i0 } from 'file-d' // both will be reported export const j = 99 // will be reported ``` -and file-e: +and file-d: ```js export const i0 = 9 // will not be reported export const i1 = 9 // will be reported export default () => {} // will not be reported ``` -and file-d: +and file-c: ```js export const h = 8 // will not be reported export default () => {} // will be reported, as export * only considers named exports and ignores default exports ``` -and file-c: -```js -export const g = 7 // will not be reported -export default () => {} // will not be reported -``` and file-b: ```js import two, { b, c, doAnything } from 'file-a'