From typescript-experts
Enforces merge-friendly TypeScript/JavaScript import formatting: one-per-line, alphabetical sorting within groups (built-ins first, then external, internal, types last) to minimize Git merge conflicts.
npx claudepluginhub jpoutrin/product-forge --plugin typescript-expertsThis skill uses the workspace's default tool permissions.
Import formatting and ordering rules to minimize merge conflicts when multiple developers or parallel agents modify the same file.
Organizes imports across languages by grouping standard library/third-party/internal/relative, sorting alphabetically within groups, separating with blank lines, removing unused, and fixing circular dependencies.
Organizes TypeScript code with ES modules, barrel exports, path aliases, declaration files, named exports, type-only imports, and strategies to avoid circular dependencies.
Enforces PEP 8 standards, modern type hints, Google-style docstrings, naming conventions, function length guidelines, and merge-friendly patterns. Auto-activates when writing or reviewing Python code.
Share bugs, ideas, or general feedback.
Import formatting and ordering rules to minimize merge conflicts when multiple developers or parallel agents modify the same file.
When importing multiple items from a module, put EACH import on its own line:
// CORRECT - merge-friendly (each on separate line)
import {
alpha,
beta,
gamma,
} from 'some-module';
// WRONG - causes merge conflicts
import { alpha, beta, gamma } from 'some-module';
This is enforced by Prettier with printWidth: 80. With one-per-line, Git can merge imports from parallel changes without conflicts.
import fs from 'fs', import path from 'path')import React from 'react', import express from 'express')import { util } from '@/utils')import { Parent } from '../Parent')import { Sibling } from './Sibling')import { thing } from './index')import type { MyType } from './types')// Node.js built-ins
import fs from 'fs';
import path from 'path';
// External packages
import express from 'express';
import React from 'react';
// Internal aliases
import { config } from '@/config';
import { logger } from '@/utils';
// Parent imports
import { BaseService } from '../BaseService';
// Sibling imports (one per line when multiple)
import {
helperA,
helperB,
helperC,
} from './helpers';
import { utils } from './utils';
// Type imports (one per line when multiple)
import type { Config } from '@/types';
import type {
Request,
Response,
} from 'express';
Sort named exports alphabetically, one per line when multiple:
// CORRECT
export {
alpha,
beta,
gamma,
};
// WRONG
export { gamma, alpha, beta };
Sorted, one-per-line imports reduce merge conflicts because:
These rules are enforced by:
printWidth: 80: Forces line wrapping for multiple importsRun eslint --fix && prettier --write before committing.
// .eslintrc.js or eslint.config.js
module.exports = {
plugins: ['simple-import-sort'],
rules: {
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
},
};
{
"printWidth": 80,
"singleQuote": true,
"trailingComma": "all"
}
When re-exporting from index files, follow the same one-per-line rule:
// CORRECT
export {
ComponentA,
ComponentB,
ComponentC,
} from './components';
export type {
TypeA,
TypeB,
} from './types';
// WRONG
export { ComponentA, ComponentB, ComponentC } from './components';
Dynamic imports follow the same alphabetical ordering when multiple exist:
// Alphabetical order by module path
const moduleA = await import('./moduleA');
const moduleB = await import('./moduleB');
const utils = await import('./utils');