Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Latest commit

 

History

History
20 lines (14 loc) · 611 Bytes

import-docblock.md

File metadata and controls

20 lines (14 loc) · 611 Bytes

Enforce external, internal dependencies docblocks

When importing modules, you should distinguish external dependencies from internal dependencies using DocBlock multi-line comments. Because Calypso modifies the NODE_PATH to allow importing modules directly from the root client/ directory, it can be otherwise unclear whether an imported module is an internal or an external dependency.

Rule Details

The following patterns are considered warnings:

import React from 'react';

The following patterns are not warnings:

/**
 * External dependencies
 */
import React from 'react';