Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 912 Bytes

dependency-group.md

File metadata and controls

36 lines (26 loc) · 912 Bytes

Enforce dependencies docblocks formatting (dependency-group)

Ensures that all top-level package imports adhere to the dependencies grouping conventions as outlined in the Coding Guidelines.

Specifically, this ensures that:

  • An import is preceded by "External dependencies", "WordPress dependencies", or "Internal dependencies" as appropriate by the import source.

Rule details

Examples of incorrect code for this rule:

import { camelCase } from 'change-case';
import { Component } from 'react';
import edit from './edit';

Examples of correct code for this rule:

/*
 * External dependencies
 */
import { camelCase } from 'change-case';

/*
 * WordPress dependencies
 */
import { Component } from 'react';

/*
 * Internal dependencies
 */
import edit from './edit';