Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
CHANGELOG for 1.x
===================
## v1.7.2 - (2026-09-23)
### Changed
- `docs/front_code_validation.md` : label each `eslint.config.mjs`/`prettier.config.mjs` code block with its file name, add the missing
`validation` script to the Symfony section's `package.json` example.

## v1.7.1 - (2026-09-23)
### TODO When updating
- Run `composer recipes:install smartbooster/standard-bundle --reset --force` to pick up the updated `make/security.mk`,
Expand Down
12 changes: 10 additions & 2 deletions docs/front_code_validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ Extra packages to add:
Impact on the ESLint config, `.vue` added to the linted extensions and the preset spread after the JS rules:

```mjs
// eslint.config.mjs
import pluginVue from "eslint-plugin-vue"

{ name: "app/files-to-lint", files: ["**/*.{js,mjs,vue}"] },
Expand Down Expand Up @@ -222,15 +223,16 @@ Extra package to add:

`yarn add --dev globals`

The scope of the `lint` and `format` commands must be narrowed to the only directory holding front code, `assets`, which gives:
The scope of the `lint` and `format` commands must be narrowed to the only directory holding front code, `assets`, which gives in `package.json`:

```json
"scripts": {
"lint": "eslint assets --fix --cache",
"lint:check": "eslint assets",
"lint:baseline": "rm -f eslint-suppressions.json && eslint assets --suppress-all",
"format": "prettier --write assets",
"format:check": "prettier --check assets"
"format:check": "prettier --check assets",
"validation": "yarn lint:check; s=$?; yarn format:check && exit $s"
}
```

Expand All @@ -242,6 +244,7 @@ Impact on the ESLint config: the front code runs in the browser, and Twig inject
`no-undef` reports them.

```mjs
// eslint.config.mjs
import globals from "globals"

{
Expand All @@ -260,6 +263,7 @@ The root config files (`vite.config.mjs`, `phpstorm.config.js`) stay out of that
Widening the scope to them means adding their globals too, as they don't run in the browser:

```mjs
// eslint.config.mjs
{
// Config files run under Node: `vite.config.mjs` reads `__dirname`.
name: "app/globals-node",
Expand All @@ -275,6 +279,7 @@ entries), they receive their props from the Symfony controller. Two rules have n
subject to both:

```mjs
// eslint.config.mjs
{
name: "app/inertia-pages-and-layouts",
files: ["**/scripts/pages/**/*.vue", "**/scripts/layout/**/*.vue"],
Expand All @@ -301,6 +306,7 @@ The official class sorter enforces one canonical order for the utility classes,
Impact on the Prettier config:

```mjs
// prettier.config.mjs
plugins: ["prettier-plugin-tailwindcss"],
tailwindStylesheet: "./assets/styles/app.css",
```
Expand All @@ -313,6 +319,7 @@ Impact on the Prettier config:
- One CSS entry per interface (admin, app, extranet, ...) → declare the main one as above and the others through `overrides`:

```mjs
// prettier.config.mjs
overrides: [
{ files: "assets/app/**", options: { tailwindStylesheet: "./assets/app/styles/main.css" } },
],
Expand All @@ -331,6 +338,7 @@ Extra package to add:
`typescript-eslint` on the `.vue` files.

```mjs
// eslint.config.mjs
// import ...
import { defineConfigWithVueTs, vueTsConfigs } from "@vue/eslint-config-typescript"

Expand Down
Loading