I've been attempting to integrate Claude Code into our team's development workflow, specifically for TypeScript and React development within our Kubernetes-managed microservices architecture. We maintain strict code formatting and linting standards through `.prettierrc` and `.eslintrc` configuration files at the repository root, which are enforced via pre-commit hooks and CI/CD pipelines (ArgoCD-based GitOps).
However, I'm encountering persistent issues where Claude Code's generated code snippets fail to adhere to these configurations. The generated output consistently defaults to what appears to be standard Prettier defaults rather than our project-specific settings. This creates additional friction in our review process, as developers must manually reformat or run lint-fix commands before committing Claude-generated code.
Our configuration structure is typical:
```json
// .prettierrc
{
"semi": true,
"trailingComma": "es5",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"endOfLine": "lf"
}
```
```json
// .eslintrc
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"prettier"
],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "react"],
"rules": {
"react/prop-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-explicit-any": "warn"
}
}
```
The specific issues I've observed include:
- Generated code uses double quotes despite `singleQuote: true`
- Print width exceeds our 100-character limit
- Missing semicolons when we require them
- Inconsistent indentation that doesn't match our 2-space tabWidth
- React component patterns that violate our specific ESLint rule exceptions
I've attempted to provide explicit instructions in my prompts ("format according to our project's prettier configuration"), but this yields inconsistent results and adds cognitive overhead to every interaction. In an infrastructure-as-code context where we're generating Terraform modules or Kubernetes manifests, this inconsistency introduces actual risk—misformatted HCL can sometimes fail validation, and YAML is notoriously whitespace-sensitive.
From an integration complexity perspective, I'm evaluating whether:
1. Claude Code has a mechanism to automatically detect and apply project-specific formatting configs
2. There's an API or configuration layer where I can pre-load these rules
3. This is a known limitation requiring a post-generation processing step
In our GitOps pipeline, automation and consistency are paramount. Having to add a secondary formatting step specifically for AI-generated code undermines the efficiency gains we're seeking. Has anyone successfully solved this integration problem, particularly in large-scale codebases with enforced formatting standards?