com um clique
com um clique
[HINT] Baixe o diretório completo da skill incluindo SKILL.md e todos os arquivos relacionados
| name | linting-formatting |
| description | Linting and formatting (ESLint, Biome, auto-fix) |
Tool docs: ESLint · Biome Configs:
../../../nx.json(targets:eslint,biome) ·../../../biome.json
# Full lint + format check (both ESLint and Biome)
nx run <project>:check
# All projects
nx run-many -t check
# Only lint a single project
nx run <project>:check:eslint --excludeTaskDependencies
# Format only (Biome)
nx run <project>:check:biome --excludeTaskDependencies
# Fix lint and format issues
nx run <project>:check --configuration=fix
# Fix all projects
nx run-many -t check -c fix
# Fix only lint for a single project
nx run <project>:check:eslint -c fix --excludeTaskDependencies
# Fix only format for a single project
nx run <project>:check:biome -c fix --excludeTaskDependencies
Every package has an eslint.config.js that extends the shared workspace config:
// eslint.config.js (in each package)
import configGenerator from '@leyman/eslint-config';
import packageJson from './package.json' with { type: 'json' };
export default configGenerator({ configUrl: import.meta.url, packageJson });
The @leyman/eslint-config package dynamically generates rules based on the package's package.json. It enables many plugins including:
@typescript-eslint — TypeScript-specific ruleseslint-plugin-unicorn — best practiceseslint-plugin-sonarjs — code qualityeslint-plugin-import — import ordering and correctnesseslint-plugin-n — Node.js-specific rulesThis config can be extended (via Eslint's Flat Config) but that is unusual. If a rule really needs to be tweaked, it is usually best to fix it for all packages at once in the main config.
Biome handles formatting only (linting is disabled in biome.json - ESLint handles all linting).
Key formatting rules (biome.json):
Biome is not cached in Nx (runs every time). It is fast enough that caching isn't needed.
| Tool | Scope |
|---|---|
| ESLint | TypeScript logic, imports, code quality |
| Biome | Formatting (whitespace, quotes, commas, line length) for .ts, .js, .json |
Linting and formatting are required for passing CI.
ESLint rule violation — Read the rule documentation linked in the error, or run with --configuration=fix if the rule is auto-fixable.
Eslint rules generally are adopted liberally (often using all rules avaiable) and then disabling/tweaking the ones that don't make sense. Rules may be updated in the main config if the goals do not align with this repo's best practices.
Biome formatting — Always auto-fixable, so long as the code is valid: nx run <project>:biome --configuration=fix.