Skip to content

Latest commit

 

History

History
25 lines (15 loc) · 954 Bytes

no-missing-import.md

File metadata and controls

25 lines (15 loc) · 954 Bytes

Disallow invalid import and export declarations (no-missing-import)

This is similar to no-missing-require, but this rule handles import and export declarations.

NOTE: ECMAScript 2015 (ES6) does not define the lookup logic. So this rule spec might be changed in future.

Rule Details

See no-missing-require.

The following patterns are considered problems:

import typoFile from "./typo-file";   /*error "./typo-file" is not found.*/
import typoModule from "typo-module"; /*error "typo-module" is not found.*/

// If the module is not written in "dependencies" and "peerDependencies"....
import someone from "someone";        /*error "someone" is not published.*/

When Not To Use It

This rule should not be used in ES3/5 environments.

If you don't want to be notified about usage of import and export declarations, then it's safe to disable this rule.