Skip to content

Commit 4004123

Browse files
authored
Merge pull request #561 from dnum-mi/develop
Develop
2 parents b3a16b5 + 732807e commit 4004123

File tree

329 files changed

+31082
-32429
lines changed

Some content is hidden

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

329 files changed

+31082
-32429
lines changed

.eslintrc.js

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,39 @@
1+
require('@rushstack/eslint-patch/modern-module-resolution')
2+
13
module.exports = {
24
root: true,
35
globals: {
46
defineEmits: 'readonly',
57
defineProps: 'readonly',
68
},
79
env: {
10+
'vue/setup-compiler-macros': true,
811
node: true,
912
},
10-
extends: ['plugin:vue/vue3-recommended', '@vue/standard', 'plugin:storybook/recommended'],
13+
extends: [
14+
'plugin:vue/vue3-recommended',
15+
'@vue/eslint-config-typescript/recommended',
16+
'@vue/standard',
17+
'plugin:storybook/recommended',
18+
],
19+
parser: 'vue-eslint-parser',
1120
parserOptions: {
12-
parser: '@babel/eslint-parser',
21+
ecmaVersion: 2020,
22+
parser: '@typescript-eslint/parser',
1323
},
24+
plugins: [
25+
'vue',
26+
'html',
27+
],
1428
rules: {
1529
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
1630
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
1731
'comma-dangle': [2, 'always-multiline'],
1832
'no-irregular-whitespace': 1,
33+
'@typescript-eslint/ban-ts-comment': [
34+
'error',
35+
{ 'ts-ignore': 'allow-with-description' },
36+
],
1937
},
2038
overrides: [
2139
{
@@ -34,7 +52,12 @@ module.exports = {
3452
},
3553
},
3654
{
37-
files: ['**/src/**/*.e2e.{j,t}s?(x)'],
55+
files: [
56+
'cypress/support/*.{js,ts,jsx,tsx}',
57+
'cypress/integration/*.{spec,e2e}.{js,ts,jsx,tsx}',
58+
'src/**/*.ct.{js,ts,jsx,tsx}',
59+
'**/src/**/*.e2e.{j,t}s?(x)',
60+
],
3861
env: {
3962
'cypress/globals': true,
4063
},

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,5 @@ $RECYCLE.BIN/
319319
*.lnk
320320

321321
# End of https://www.toptal.com/developers/gitignore/api/node,visualstudiocode,intellij,windows,macos,linux
322+
stats.html
323+
types/

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{vue,ts}": "npm run lint:staged"
3+
}

ci/check-exports.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ const projectFn = component => 'export { default as ' + path.basename(component,
1818
const correctComponentList = sfcs.map(projectFn).sort()
1919
const correctString = correctComponentList.join('\n') + '\n'
2020

21-
const srcIndexFullpath = getNormalizedDir('../src/components') + path.sep + 'index.js'
21+
const srcIndexFullpath = getNormalizedDir('../src/components') + path.sep + 'index.ts'
2222
const typesIndexFullpath = getNormalizedDir('../types/components') + path.sep + 'index.d.ts'
2323

24-
const index = await readFile(getNormalizedDir('../src/components') + '/index.js')
24+
const index = await readFile(getNormalizedDir('../src/components') + '/index.ts')
2525
const currentFileContent = index.toString()
2626

2727
if (currentFileContent !== correctString) {

cypress.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ export default defineConfig({
44
video: false,
55

66
component: {
7-
setupNodeEvents (on, config) {},
7+
// setupNodeEvents (on, config) {},
88
viewportHeight: 500,
99
viewportWidth: 1000,
10-
specPattern: 'src/**/*.e2e.js*',
10+
specPattern: 'src/**/*.e2e.{js,ts}*',
1111

1212
devServer: {
1313
framework: 'vue',
@@ -16,7 +16,7 @@ export default defineConfig({
1616
},
1717

1818
e2e: {
19-
setupNodeEvents (on, config) {
19+
setupNodeEvents (/* on, config */) {
2020
// implement node event listeners here
2121
},
2222
},
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<script setup>
1+
<script setup lang="ts">
22
import { ref, watch } from 'vue'
33
import { useRoute } from 'vue-router'
44
5-
import DsfrHeader from '../components/DsfrHeader/DsfrHeader.vue'
6-
import DsfrNavigation from '../components/DsfrNavigation/DsfrNavigation.vue'
7-
import DsfrSkipLinks from '../components/DsfrSkipLinks/DsfrSkipLinks.vue'
8-
import DsfrBreadcrumb from '../components/DsfrBreadcrumb/DsfrBreadcrumb.vue'
5+
import DsfrHeader from '../src/components/DsfrHeader/DsfrHeader.vue'
6+
import DsfrNavigation from '../src/components/DsfrNavigation/DsfrNavigation.vue'
7+
import DsfrSkipLinks from '../src/components/DsfrSkipLinks/DsfrSkipLinks.vue'
8+
import DsfrBreadcrumb from '../src/components/DsfrBreadcrumb/DsfrBreadcrumb.vue'
99
1010
const route = useRoute()
1111
const currentPage = ref('Home')
@@ -81,6 +81,10 @@ const navItems = [
8181
to: { name: 'Alertes' },
8282
text: 'Alertes & Bandeau',
8383
},
84+
{
85+
to: { name: 'MiseEnAvant' },
86+
text: 'Mise en Avant',
87+
},
8488
]
8589
</script>
8690

@@ -94,6 +98,7 @@ const navItems = [
9498
show-search
9599
placeholder="Rechercher placeholder"
96100
/>
101+
97102
<div class="fr-container">
98103
<DsfrNavigation
99104
:nav-items="navItems"
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import '@gouvfr/dsfr/dist/component/component.main.min.css'
1212
import '@gouvfr/dsfr/dist/utility/utility.main.min.css'
1313
import '@gouvfr/dsfr/dist/utility/icons/icons.main.min.css'
1414

15-
import VueDsfr from '@/index.js'
15+
import VueDsfr from '@/index'
1616
import router from './router.js'
1717

1818
import App from './App.vue'
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import SchemeSettings from './views/SchemeSettings.vue'
77
import LanguageSelector from './views/LanguageSelector.vue'
88
import AppForm from './views/AppForm.vue'
99
import SimpleModal from './views/SimpleModal.vue'
10+
import CalloutTest from './views/CalloutTest.vue'
1011

1112
export const routes = [
1213
{ path: '/', name: 'Home', component: AppHome },
@@ -16,6 +17,7 @@ export const routes = [
1617
{ path: '/languages', name: 'Languages', component: LanguageSelector },
1718
{ path: '/settings', name: 'Settings', component: SchemeSettings },
1819
{ path: '/alerts', name: 'Alertes', component: AppAlerts },
20+
{ path: '/callout', name: 'MiseEnAvant', component: CalloutTest },
1921
]
2022

2123
export default createRouter({

0 commit comments

Comments
 (0)