mirror of
https://github.com/betagouv/mon-entreprise
synced 2025-02-09 00:35:00 +00:00
* Ajout de storybook Ajout d'un Switch oui/non * Fix lint * Add react-router and fix type * Fix lint * Resolution du conflit de version de prettier avec storybook * Fix storybook * Reduce Storybook bundle size Refacto css in QuickLinks Remove useless comment Add default theme to CSS prop * Déploiement de Storybook * Fix déploiement * Fix déploiement storybook url * Fix Switch style * Remplace les oui/non radio bouton par un Switch * Filter aria props + react props in Storybook controls Sort props in Storybook Add global style in Storybook decorator * Update Storybook packages * Ajout d'un debounce dans OuiNonInput * Fix du Switch * Refacto des alias * Fix lint error avec Storybook * Fix eslint error * Refacto deploy for Storybook * ✨Ajout de type pour les yaml d'economie collaborative ✨Ajout de type sur les fonction du locale storage + Autre fix de type * Deploy storybook in dist dir in prod * Fix focus on Switch * Fix cy test * ✨ Remplace l'alias ~ par @ * ✨ Refacto du Switch * Remplace la checkbox par un Switch dans ChiffreAffairesActivitéMixte * Ajout des stories RadioGroup et ToggleGroup * Remplace le Switch oui/non par un ToggleGroup * Ajout d'un label dans le Switch Ajout du mode light sur le Switch * Fix autofocus * Fix cypress test * 🐛 Ajout du polyfill replaceAll * Test de deploiement * Ajout d'une redirection pour Storybook * Fix Storybook url * Fix du deploiement de Storybook
114 lines
2.9 KiB
JavaScript
114 lines
2.9 KiB
JavaScript
module.exports = {
|
|
root: true,
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
ecmaVersion: 'latest',
|
|
ecmaFeatures: {
|
|
jsx: true,
|
|
},
|
|
},
|
|
env: {
|
|
browser: true,
|
|
commonjs: true,
|
|
es6: true,
|
|
},
|
|
globals: {
|
|
process: false,
|
|
},
|
|
extends: ['eslint:recommended', 'prettier'],
|
|
rules: {
|
|
'no-console': 'warn',
|
|
'no-restricted-globals': ['error', 'length'],
|
|
'no-restricted-syntax': [
|
|
'error',
|
|
{
|
|
message:
|
|
'Utilisez le composant <Emoji /> plutôt que la function emoji directement importée de react-easy-emoji',
|
|
selector: "CallExpression[callee.name='emoji']",
|
|
},
|
|
],
|
|
},
|
|
settings: {
|
|
react: {
|
|
version: 'detect',
|
|
},
|
|
},
|
|
overrides: [
|
|
{
|
|
files: ['**/*.{js,jsx}'],
|
|
env: { node: true },
|
|
},
|
|
{
|
|
files: ['**/*.{ts,tsx}'],
|
|
parser: '@typescript-eslint/parser',
|
|
parserOptions: {
|
|
ecmaFeatures: { jsx: true },
|
|
// eslint-disable-next-line no-undef
|
|
tsconfigRootDir: __dirname,
|
|
project: [
|
|
'./site/tsconfig.json',
|
|
'./modele-social/tsconfig.json',
|
|
'./exoneration-covid/tsconfig.json',
|
|
],
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:@typescript-eslint/recommended',
|
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
'plugin:react/recommended',
|
|
'plugin:react/jsx-runtime',
|
|
'plugin:react-hooks/recommended',
|
|
'prettier',
|
|
],
|
|
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
|
|
rules: {
|
|
'ban-ts-comment': 'off',
|
|
'react/no-unescaped-entities': 'off',
|
|
'react/jsx-no-target-blank': 'off',
|
|
'@typescript-eslint/ban-ts-comment': 'off',
|
|
|
|
'react-hooks/rules-of-hooks': 'error',
|
|
'react-hooks/exhaustive-deps': 'warn',
|
|
|
|
'@typescript-eslint/no-unsafe-call': 'warn',
|
|
'@typescript-eslint/no-unsafe-argument': 'warn',
|
|
'@typescript-eslint/no-unsafe-member-access': 'warn',
|
|
'@typescript-eslint/restrict-template-expressions': 'warn',
|
|
'@typescript-eslint/no-unsafe-return': 'warn',
|
|
'@typescript-eslint/no-unsafe-assignment': 'warn',
|
|
'@typescript-eslint/no-empty-function': 'warn',
|
|
'@typescript-eslint/restrict-plus-operands': 'warn',
|
|
'@typescript-eslint/no-floating-promises': 'warn',
|
|
'@typescript-eslint/member-delimiter-style': [
|
|
'error',
|
|
{ multiline: { delimiter: 'none' } },
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.test.{js,ts}', 'site/cypress/**/*.js'],
|
|
env: {
|
|
mocha: true,
|
|
},
|
|
extends: [
|
|
'eslint:recommended',
|
|
'plugin:cypress/recommended',
|
|
'plugin:mocha/recommended',
|
|
'prettier',
|
|
],
|
|
plugins: ['cypress', 'mocha'],
|
|
rules: {
|
|
'cypress/no-unnecessary-waiting': 'warn',
|
|
|
|
'mocha/no-exclusive-tests': 'error',
|
|
'mocha/no-skipped-tests': 'warn',
|
|
'mocha/no-mocha-arrows': 'warn',
|
|
'mocha/no-setup-in-describe': 'warn',
|
|
'mocha/max-top-level-suites': 'warn',
|
|
'mocha/no-global-tests': 'warn',
|
|
'mocha/no-exports': 'warn',
|
|
},
|
|
},
|
|
],
|
|
}
|