Skip to content

Commit 68d443d

Browse files
🔖 Release 2.39.0 (#1403)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Benjamin Arias <12382534+bjlaa@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 parent 4f9d5fc commit 68d443d

File tree

399 files changed

+6646
-4624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

399 files changed

+6646
-4624
lines changed

‎.eslintrc.json‎

Lines changed: 0 additions & 86 deletions
This file was deleted.

‎.vscode/settings.json‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,20 @@
1616
"titleBar.activeBackground": "#296c36",
1717
"titleBar.activeForeground": "#FAF9FD"
1818
},
19-
"editor.formatOnSave": true
19+
"editor.formatOnSave": true,
20+
"editor.codeActionsOnSave": {
21+
"source.fixAll.eslint": "explicit",
22+
"source.organizeImports": "explicit"
23+
},
24+
"typescript.preferences.includePackageJsonAutoImports": "auto",
25+
"typescript.suggest.autoImports": true,
26+
"typescript.updateImportsOnFileMove.enabled": "always",
27+
"eslint.validate": [
28+
"javascript",
29+
"javascriptreact",
30+
"typescript",
31+
"typescriptreact"
32+
],
33+
"eslint.format.enable": true,
34+
"eslint.lintTask.enable": true
2035
}

‎config/redirects.js‎

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,13 +299,28 @@ const redirects = [
299299
permanent: true,
300300
},
301301
{
302-
source: '/empreinte-carbone-transport',
303-
destination: '/themes/empreinte-carbone-transport',
302+
source: '/empreinte-carbone-logement',
303+
destination: '/themes/empreinte-carbone-logement',
304304
permanent: true,
305305
},
306306
{
307-
source: '/empreinte-carbone-logement',
308-
destination: '/themes/empreinte-carbone-logement',
307+
source: '/en/themes/empreinte-carbone-alimentation',
308+
destination: '/en',
309+
permanent: true,
310+
},
311+
{
312+
source: '/en/themes/empreinte-carbone-logement',
313+
destination: '/en',
314+
permanent: true,
315+
},
316+
{
317+
source: '/en/themes/empreinte-carbone-transport',
318+
destination: '/en',
319+
permanent: true,
320+
},
321+
{
322+
source: '/en/themes/:restOfPath',
323+
destination: '/themes/:restOfPath',
309324
permanent: true,
310325
},
311326
// Guides fr
@@ -395,4 +410,4 @@ const redirects = [
395410
},
396411
]
397412

398-
module.exports = redirects
413+
export default redirects

‎cypress/e2e/integration/accessibility/static-pages.cy.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const staticPagesToTest = [
2323
'/mentions-legales',
2424
// '/stats', // TODO: fix A11Y test breaking RANDOMLY when running on CI
2525
'/modele',
26-
'/documentation',
26+
// '/documentation', // TODO: fix A11Y test breaking RANDOMLY when running on CI
2727
'/documentation/bilan',
2828
// '/actions', // TODO: fix A11Y test breaking only when running on CI
2929
// '/actions/divers/partage-NGC', // TODO: fix A11Y test breaking only when running on CI

‎cypress/plugins/index.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module.exports = (on, config) => {
1+
export default (on, config) => {
22
config.env = process.env
33
}

‎cypress/scripts/generateSpecsFromPersonas.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const { writeFileSync } = require('fs')
2-
3-
const personas = require('@incubateur-ademe/nosgestesclimat/public/personas-fr.json')
1+
import personas from '@incubateur-ademe/nosgestesclimat/public/personas-fr.json' with { type: 'json' }
2+
import { writeFileSync } from 'fs'
43

54
/**
65
* @param {string} name

‎eslint.config.js‎

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
import babelParser from '@babel/eslint-parser'
2+
import js from '@eslint/js'
3+
import typescript from '@typescript-eslint/eslint-plugin'
4+
import typescriptParser from '@typescript-eslint/parser'
5+
import prettier from 'eslint-config-prettier'
6+
import jsxA11y from 'eslint-plugin-jsx-a11y'
7+
import react from 'eslint-plugin-react'
8+
import reactHooks from 'eslint-plugin-react-hooks'
9+
import globals from 'globals'
10+
11+
export default [
12+
// Base configuration
13+
js.configs.recommended,
14+
prettier,
15+
16+
// TypeScript files configuration
17+
{
18+
files: ['**/*.ts', '**/*.tsx'],
19+
languageOptions: {
20+
parser: typescriptParser,
21+
parserOptions: {
22+
project: './tsconfig.json',
23+
ecmaVersion: 'latest',
24+
sourceType: 'module',
25+
ecmaFeatures: {
26+
jsx: true,
27+
},
28+
},
29+
globals: {
30+
...globals.browser,
31+
...globals.node,
32+
...globals.es2021,
33+
React: 'readonly',
34+
JSX: 'readonly',
35+
NodeJS: 'readonly',
36+
},
37+
},
38+
plugins: {
39+
'@typescript-eslint': typescript,
40+
react: react,
41+
'react-hooks': reactHooks,
42+
'jsx-a11y': jsxA11y,
43+
},
44+
settings: {
45+
react: {
46+
version: 'detect',
47+
},
48+
},
49+
rules: {
50+
...typescript.configs.recommended.rules,
51+
...react.configs.recommended.rules,
52+
...reactHooks.configs.recommended.rules,
53+
...jsxA11y.configs.strict.rules,
54+
55+
// Custom rules from .eslintrc.json
56+
'@typescript-eslint/consistent-type-imports': 'error',
57+
'@typescript-eslint/no-explicit-any': 'off',
58+
'@typescript-eslint/no-unsafe-member-access': 'off',
59+
'@typescript-eslint/no-unsafe-assignment': 'off',
60+
'@typescript-eslint/no-unused-vars': 'off',
61+
'@typescript-eslint/require-await': 'error',
62+
63+
'react/no-unescaped-entities': 'off',
64+
'react/react-in-jsx-scope': 'off',
65+
'react/prop-types': 'off',
66+
'react/jsx-no-undef': 'error',
67+
'react/display-name': 'error',
68+
'react/jsx-no-target-blank': 'error',
69+
70+
'react-hooks/exhaustive-deps': 'error',
71+
72+
'jsx-a11y/label-has-associated-control': 'error',
73+
'jsx-a11y/no-redundant-roles': 'off',
74+
75+
'no-undef': 'error',
76+
'no-redeclare': 'error',
77+
'no-unreachable': 'error',
78+
'no-irregular-whitespace': 'off',
79+
},
80+
},
81+
82+
// JavaScript files configuration
83+
{
84+
files: ['**/*.js', '**/*.jsx'],
85+
languageOptions: {
86+
parser: babelParser,
87+
parserOptions: {
88+
requireConfigFile: false,
89+
babelOptions: {
90+
presets: ['@babel/preset-env', '@babel/preset-react'],
91+
},
92+
},
93+
globals: {
94+
...globals.browser,
95+
...globals.node,
96+
...globals.es2021,
97+
React: 'readonly',
98+
JSX: 'readonly',
99+
NodeJS: 'readonly',
100+
},
101+
},
102+
plugins: {
103+
react: react,
104+
'react-hooks': reactHooks,
105+
'jsx-a11y': jsxA11y,
106+
},
107+
settings: {
108+
react: {
109+
version: 'detect',
110+
},
111+
},
112+
rules: {
113+
...react.configs.recommended.rules,
114+
...reactHooks.configs.recommended.rules,
115+
...jsxA11y.configs.strict.rules,
116+
117+
'react/no-unescaped-entities': 'off',
118+
'react/react-in-jsx-scope': 'off',
119+
'react/prop-types': 'off',
120+
'react/jsx-no-undef': 'error',
121+
'react/display-name': 'error',
122+
'react/jsx-no-target-blank': 'error',
123+
124+
'react-hooks/exhaustive-deps': 'error',
125+
126+
'jsx-a11y/label-has-associated-control': 'error',
127+
'jsx-a11y/no-redundant-roles': 'off',
128+
129+
'no-undef': 'error',
130+
'no-redeclare': 'error',
131+
'no-unreachable': 'error',
132+
'no-irregular-whitespace': 'off',
133+
},
134+
},
135+
136+
// Test files and mocks
137+
{
138+
files: [
139+
'**/__tests__/**/*',
140+
'**/*.test.ts',
141+
'**/*.test.tsx',
142+
'**/__mocks__/**/*',
143+
'jest.setup.tsx',
144+
'vitest.setup.ts',
145+
'vitest.config.ts',
146+
],
147+
languageOptions: {
148+
globals: {
149+
...globals.browser,
150+
...globals.node,
151+
...globals.es2021,
152+
...globals.jest,
153+
React: 'readonly',
154+
JSX: 'readonly',
155+
describe: 'readonly',
156+
it: 'readonly',
157+
expect: 'readonly',
158+
beforeEach: 'readonly',
159+
afterEach: 'readonly',
160+
beforeAll: 'readonly',
161+
afterAll: 'readonly',
162+
vi: 'readonly',
163+
__dirname: 'readonly',
164+
},
165+
},
166+
},
167+
168+
// Ignore patterns
169+
{
170+
ignores: [
171+
'node_modules/**',
172+
'cypress/**/*',
173+
'.next/**',
174+
'dist/**',
175+
'build/**',
176+
'coverage/**',
177+
'*.config.js',
178+
'*.config.ts',
179+
'*.setup.ts',
180+
'*.setup.tsx',
181+
'check-memory.mjs',
182+
'scripts/**/*.mjs',
183+
'scripts/**/*.cjs',
184+
'scripts/**/*.js',
185+
'public/mockServiceWorker.js',
186+
'next-env.d.ts',
187+
'**/*.stories.tsx',
188+
'.storybook/**',
189+
],
190+
},
191+
]

‎i18next-parser.config.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
contextSeparator: '_',
33
// Key separator used in your translation keys
44

0 commit comments

Comments
 (0)