This skill should be used when setting up code quality tooling with ESLint v9 flat config, Prettier formatting, Husky git hooks, lint-staged pre-commit checks, and GitHub Actions CI lint workflow. Apply when initializing linting, adding code formatting, configuring pre-commit hooks, setting up quality gates, or establishing lint CI checks for Next.js or React projects.
Configures ESLint v9, Prettier, Husky, and lint-staged for Next.js/React projects. Use when setting up code quality tooling, pre-commit hooks, or CI lint workflows.
/plugin marketplace add hopeoverture/worldbuilding-app-skills/plugin install eslint-prettier-husky-config@worldbuilding-app-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/eslint.config.mjsassets/github-workflows-lint.ymlreferences/package-json-config.mdreferences/team-documentation.mdConfigure comprehensive code quality tooling for Next.js/React projects using ESLint v9 (flat config), Prettier, Husky git hooks, lint-staged, and CI lint checks.
Install required packages for ESLint v9, Prettier, and git hooks:
npm install -D eslint@^9 @eslint/js eslint-config-prettier eslint-plugin-react eslint-plugin-react-hooks eslint-plugin-jsx-a11y prettier husky lint-staged
For TypeScript projects, add:
npm install -D @typescript-eslint/parser @typescript-eslint/eslint-plugin typescript-eslint
Create eslint.config.mjs in project root using the provided template from assets/eslint.config.mjs. This flat config format:
Customize the configuration based on project needs:
languageOptions.parserOptions for different ECMAScript versionsrules to match team preferencesCreate .prettierrc in project root using the template from assets/.prettierrc. This configuration:
Adjust formatting rules to match team style guide.
Create .prettierignore using assets/.prettierignore to exclude:
Initialize Husky for git hooks:
npx husky init
This creates .husky/ directory with a pre-commit hook.
Replace the pre-commit hook content with:
npx lint-staged
Add lint-staged configuration to package.json using the example from references/package-json-config.md:
{
"lint-staged": {
"*.{js,jsx,ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md,yml,yaml}": [
"prettier --write"
]
}
}
This runs ESLint and Prettier on staged files before each commit.
Add the following scripts to package.json (see references/package-json-config.md for complete example):
{
"scripts": {
"lint": "eslint . --max-warnings 0",
"lint:fix": "eslint . --fix",
"format": "prettier --write .",
"format:check": "prettier --check .",
"prepare": "husky"
}
}
These scripts enable:
npm run lint - Check for linting errors (fails on warnings)npm run lint:fix - Auto-fix linting issuesnpm run format - Format all files with Prettiernpm run format:check - Check formatting without modifying filesprepare - Automatically set up Husky when installing dependenciesCreate .github/workflows/lint.yml using the template from assets/github-workflows-lint.yml. This workflow:
Customize the workflow:
Test the complete setup:
npm run lint to verify ESLint configurationnpm run format:check to verify Prettier configurationFix any configuration issues:
npm run formatDocument the setup for team members (see references/team-documentation.md for template):
Adjust rule severity in eslint.config.mjs:
"off" - Disable rule"warn" - Warning (doesn't fail CI)"error" - Error (fails CI)Common customizations:
'react/prop-types': 'off''max-len': ['error', { code: 120 }]Modify formatting in .prettierrc:
printWidth - Line length limittabWidth - Spaces per indentation levelsemi - Semicolon preferencesingleQuote - Quote styletrailingComma - Trailing comma rulesCustomize pre-commit checks in package.json:
Example with type checking:
{
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
"prettier --write",
"tsc-files --noEmit"
]
}
}
ESLint errors on existing code: Run npm run lint:fix then npm run format to auto-fix most issues.
Husky hooks not running: Ensure npm install was run after Husky initialization. Check .husky/pre-commit is executable.
CI failing but local passes: Verify Node.js version matches between local and CI. Check that all dependencies are in package.json.
Conflicts between ESLint and Prettier: Ensure eslint-config-prettier is last in extends array to disable conflicting ESLint formatting rules.
No executable scripts needed for this skill.
package-json-config.md - Complete package.json example with all scripts and lint-staged configurationteam-documentation.md - Template for documenting the setup for team memberseslint.config.mjs - ESLint v9 flat config template with React, TypeScript, and Next.js support.prettierrc - Prettier configuration with recommended settings.prettierignore - Files and directories to exclude from formattinggithub-workflows-lint.yml - GitHub Actions workflow for automated lint checksCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.