Fix ESLint flat config so pnpm lint runs

The flat config spread eslint-config-next's subpath imports as if they were
flat-config arrays, but that package ships legacy eslintrc configs, so lint
crashed before checking any file. Wrap them with FlatCompat (add
@eslint/eslintrc) and fix the two pre-existing react/no-unescaped-entities
errors so lint passes.
This commit is contained in:
Francisco Ignácio Fontoura Solla 2026-07-15 13:56:53 -03:00
parent 4f0f997c32
commit 4f22824d4f
4 changed files with 51 additions and 15 deletions

View file

@ -1,11 +1,18 @@
import { defineConfig, globalIgnores } from 'eslint/config'
import nextVitals from 'eslint-config-next/core-web-vitals'
import nextTs from 'eslint-config-next/typescript'
import { dirname } from 'path'
import { fileURLToPath } from 'url'
import { FlatCompat } from '@eslint/eslintrc'
import { globalIgnores } from 'eslint/config'
import prettier from 'eslint-config-prettier/flat'
const eslintConfig = defineConfig([
...nextVitals,
...nextTs,
const __filename = fileURLToPath(import.meta.url)
const __dirname = dirname(__filename)
// eslint-config-next ships legacy (eslintrc) configs, so wrap them with
// FlatCompat to use them from this flat config with ESLint 9.
const compat = new FlatCompat({ baseDirectory: __dirname })
const eslintConfig = [
...compat.extends('next/core-web-vitals', 'next/typescript'),
prettier,
// Override default ignores of eslint-config-next.
globalIgnores([
@ -15,6 +22,6 @@ const eslintConfig = defineConfig([
'build/**',
'next-env.d.ts',
]),
])
]
export default eslintConfig

View file

@ -75,6 +75,7 @@
"zod": "^4.3.6"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.6",
"@playwright/test": "1.58.2",
"@tailwindcss/postcss": "^4.1.18",
"@testing-library/react": "16.3.0",

View file

@ -105,6 +105,9 @@ importers:
specifier: ^4.3.6
version: 4.3.6
devDependencies:
'@eslint/eslintrc':
specifier: ^3.3.6
version: 3.3.6
'@playwright/test':
specifier: 1.58.2
version: 1.58.2
@ -939,8 +942,8 @@ packages:
resolution: {integrity: sha512-yL/sLrpmtDaFEiUj1osRP4TI2MDz1AddJL+jZ7KSqvBuliN4xqYY54IfdN8qD8Toa6g1iloph1fxQNkjOxrrpQ==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/eslintrc@3.3.3':
resolution: {integrity: sha512-Kr+LPIUVKz2qkx1HAMH8q1q6azbqBAsXJUxBl/ODDuVPX45Z9DfwB8tPjTi6nNZ8BuM3nbJxC5zCAg5elnBUTQ==}
'@eslint/eslintrc@3.3.6':
resolution: {integrity: sha512-l2Ul9PrHsPCKcEY/ac7VgFj9D80C7S68sOKc618SyHDPK36s1XcFebXY0iTzUVn4Yq+YbwvSnDmCz9yxjX+QrA==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@eslint/js@9.39.2':
@ -3045,6 +3048,9 @@ packages:
ajv@6.12.6:
resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==}
ajv@6.15.0:
resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==}
ajv@8.17.1:
resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==}
@ -4545,6 +4551,10 @@ packages:
resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==}
hasBin: true
js-yaml@4.3.0:
resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==}
hasBin: true
jsdom@28.0.0:
resolution: {integrity: sha512-KDYJgZ6T2TKdU8yBfYueq5EPG/EylMsBvCaenWMJb2OXmjgczzwveRCoJ+Hgj1lXPDyasvrgneSn4GBuR1hYyA==}
engines: {node: ^20.19.0 || ^22.12.0 || >=24.0.0}
@ -4895,6 +4905,9 @@ packages:
minimatch@3.1.2:
resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==}
minimatch@3.1.5:
resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==}
minimatch@9.0.5:
resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==}
engines: {node: '>=16 || 14 >=14.17'}
@ -7010,16 +7023,16 @@ snapshots:
dependencies:
'@types/json-schema': 7.0.15
'@eslint/eslintrc@3.3.3':
'@eslint/eslintrc@3.3.6':
dependencies:
ajv: 6.12.6
ajv: 6.15.0
debug: 4.4.3
espree: 10.4.0
globals: 14.0.0
ignore: 5.3.2
import-fresh: 3.3.1
js-yaml: 4.1.1
minimatch: 3.1.2
js-yaml: 4.3.0
minimatch: 3.1.5
strip-json-comments: 3.1.1
transitivePeerDependencies:
- supports-color
@ -9190,6 +9203,13 @@ snapshots:
json-schema-traverse: 0.4.1
uri-js: 4.4.1
ajv@6.15.0:
dependencies:
fast-deep-equal: 3.1.3
fast-json-stable-stringify: 2.1.0
json-schema-traverse: 0.4.1
uri-js: 4.4.1
ajv@8.17.1:
dependencies:
fast-deep-equal: 3.1.3
@ -10090,7 +10110,7 @@ snapshots:
'@eslint/config-array': 0.21.1
'@eslint/config-helpers': 0.4.2
'@eslint/core': 0.17.0
'@eslint/eslintrc': 3.3.3
'@eslint/eslintrc': 3.3.6
'@eslint/js': 9.39.2
'@eslint/plugin-kit': 0.4.1
'@humanfs/node': 0.16.7
@ -10799,6 +10819,10 @@ snapshots:
dependencies:
argparse: 2.0.1
js-yaml@4.3.0:
dependencies:
argparse: 2.0.1
jsdom@28.0.0(@noble/hashes@1.8.0):
dependencies:
'@acemir/cssom': 0.9.31
@ -11254,6 +11278,10 @@ snapshots:
dependencies:
brace-expansion: 1.1.12
minimatch@3.1.5:
dependencies:
brace-expansion: 1.1.12
minimatch@9.0.5:
dependencies:
brace-expansion: 2.0.2

View file

@ -19,7 +19,7 @@ export const ThankStep = () => (
<br />
CLIQUE NO BOTÃO ABAIXO E EM SEGUIDA CLIQUE
<br />
EM 'ENTRAR' PARA CONFIRMAR.
EM &apos;ENTRAR&apos; PARA CONFIRMAR.
</h2>
<Button className="bg-[#99c343] font-bold text-base py-3 rounded-full mx-2 lg:max-w-100 lg:mx-0 lg:row-start-4">
<Link href="https://whatsapp.com/channel/0029Vb5cJcT30LKLFkdN5P25" target="_blank">