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
- SwiftLint with
.swiftlint.ymlat project root. Enablestrictmode. Add as SPM plugin or Xcode build phase. - 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
- ESLint with
eslint.config.js. Useeslint-config-prettierto avoid conflicts with the formatter. - Prettier with
.prettierrcfor auto-formatting. - Stylelint with
.stylelintrc.jsonfor CSS linting. - Add as
package.jsonscripts and pre-commit hooks.
C#
.editorconfigat repo root for all code style rules.- Enable Roslyn analyzers in
.csproj:
<PropertyGroup>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest-recommended</AnalysisLevel>
</PropertyGroup>
- Use
dotnet formatCLI for auto-fixing. - Supplement with Roslynator or Meziantou.Analyzer for additional rules.