Linting from day one

All projects MUST include linting configured from initial generation:

Platform Linter Formatter
Swift SwiftLint swift-format
Kotlin ktlint ktlint
TypeScript ESLint Prettier
C# / .NET Roslyn Analyzers + .editorconfig dotnet format

Linter config MUST be committed. Linting MUST run as part of the build or pre-commit process. Formatting MUST be auto-fixable.


Linting and Formatting

All projects MUST include linting configured from initial generation. Linter config MUST be committed. Linting MUST run as part of the build or pre-commit process. Formatting MUST be auto-fixable.

Swift

  1. SwiftLint with .swiftlint.yml at project root. Enable strict mode. Add as SPM plugin or Xcode build phase.
  2. swift-format for auto-formatting.

Kotlin

Use ktlint for both linting and formatting. Configure via .editorconfig at project root. Add as a Gradle plugin (org.jlleitschuh.gradle.ktlint).

TypeScript

  1. ESLint with eslint.config.js. Use eslint-config-prettier to avoid conflicts with the formatter.
  2. Prettier with .prettierrc for auto-formatting.
  3. Stylelint with .stylelintrc.json for CSS linting.
  4. Add as package.json scripts and pre-commit hooks.

C#

  1. .editorconfig at repo root for all code style rules.
  2. Enable Roslyn analyzers in .csproj:
<PropertyGroup>
  <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
  <AnalysisLevel>latest-recommended</AnalysisLevel>
</PropertyGroup>
  1. Use dotnet format CLI for auto-fixing.
  2. Supplement with Roslynator or Meziantou.Analyzer for additional rules.
version
1.0.0
platforms
csharp, kotlin, swift, typescript, web
tags
code-quality, linting
author
Mike Fullerton
modified
2026-03-27

Change History

Version Date Author Summary
1.0.0 2026-03-27 Mike Fullerton Initial creation