Next Friday import rules for absolute paths, type imports, and date utilities. Use when adding import statements or working with modules.
Install
npx skillscat add next-friday/nextfriday-skills/nextfriday-imports Install via the SkillsCat registry.
Here's a thinking process: 1. **Analyze the Request:** - **Goal:** Write a 2-3 sentence plain-text summary in English - **Subject:** An AI agent skill called "nextfriday-imports" - **Content to cover:** What it does, what problem it solves, when to use it - **Constraints:** - Objective, factual tone only - No marketing language, no superlatives, no calls to action - Natural prose, no bullet points, no headings, no markdown formatting - Do not wrap in quotes - At most 60 words - **Output:** ONLY the summary text 2.
Next Friday Imports
Rules for import statements and module resolution.
Absolute Imports
Disallow relative imports with ../. Use absolute imports instead.
// Bad:
import { Button } from "../../../components/Button";
import { formatDate } from "../../utils/format";
// Good:
import { Button } from "@/components/Button";
import { formatDate } from "@/utils/format";
import { validate } from "./validate"; // sibling import OKType Imports
Use import type for type-only imports.
// Bad:
import { ReactNode, FC } from "react";
import { User, Item } from "@/types";
// Good:
import type { ReactNode, FC } from "react";
import type { User, Item } from "@/types";Date Utilities
Use centralized date utilities (e.g., dayjs) instead of native Date.
// Bad:
const now = new Date();
const timestamp = Date.now();
// Good:
import dayjs from "dayjs";
const now = dayjs();
const timestamp = dayjs().valueOf();Quick Reference
| Rule | Pattern |
|---|---|
No ../ imports |
Use absolute paths or @/ alias |
| Type imports | import type { X } for types |
| Date handling | Use dayjs, not native Date |