Skip to content

Commit

Permalink
Merge pull request #180 from InseeFr/v2-lunatic
Browse files Browse the repository at this point in the history
Release Lunatic V2 2.2.0
  • Loading branch information
ORogel authored Oct 5, 2022
2 parents d544be0 + c6e0d8b commit 04dcb52
Show file tree
Hide file tree
Showing 28 changed files with 48,643 additions and 8,664 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SKIP_PREFLIGHT_CHECK=true
REACT_APP_LUNATIC_LOADER_WORKER_PATH=/workers/lunatic-append-worker-0.2.4-experimental.js
REACT_APP_LUNATIC_SEARCH_WORKER_PATH=/workers/lunatic-searching-worker-0.2.4-experimental.js
REACT_APP_LUNATIC_LABEL_WORKER_PATH=/workers/lunatic-label-worker-0.2.4-experimental.js
REACT_APP_LUNATIC_LABEL_WORKER_PATH=/workers/lunatic-label-worker-0.2.4-experimental.js
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: ['prettier', 'react-app'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {},
};
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/husky.sh"

yarn commitlint --edit $1
36 changes: 36 additions & 0 deletions .husky/husky.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env sh
if [ -z "$husky_skip_init" ]; then
debug () {
if [ "$HUSKY_DEBUG" = "1" ]; then
echo "husky (debug) - $1"
fi
}

readonly hook_name="$(basename -- "$0")"
debug "starting $hook_name..."

if [ "$HUSKY" = "0" ]; then
debug "HUSKY env variable is set to 0, skipping hook"
exit 0
fi

if [ -f ~/.huskyrc ]; then
debug "sourcing ~/.huskyrc"
. ~/.huskyrc
fi

readonly husky_skip_init=1
export husky_skip_init
sh -e "$0" "$@"
exitCode="$?"

if [ $exitCode != 0 ]; then
echo "husky - $hook_name hook exited with code $exitCode (error)"
fi

if [ $exitCode = 127 ]; then
echo "husky - command not found in PATH=$PATH"
fi

exit $exitCode
fi
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/husky.sh"

yarn lint-staged
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
/build/
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"tabWidth": 2,
"useTabs": true,
"printWidth": 80,
"bracketSpacing": true,
"semi": true,
"trailingComma": "es5",
"jsxSingleQuote": true,
"singleQuote": true
}
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
204 changes: 91 additions & 113 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,115 +1,93 @@
{
"name": "stromae",
"version": "2.1.71",
"description": "Web application for the management of questionnaires powered by Lunatic",
"repository": {
"type": "git",
"url": "https://github.com/InseeFr/Stromae.git"
},
"author": "INSEE (http://www.insee.fr)",
"license": "MIT",
"dependencies": {
"@craco/craco": "^6.4.0",
"@inseefr/lunatic": "0.3.9-experimental",
"@material-ui/core": "^4.11.2",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.57",
"@material-ui/styles": "^4.11.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"date-fns": "^2.17.0",
"keycloak-js": "16.1.1",
"oidc-client": "^1.10.1",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-error-boundary": "^3.1.3",
"react-markdown": "^5.0.3",
"react-modal": "^3.12.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-swipeable-views": "^0.13.9",
"react-swipeable-views-utils": "^0.14.0-alpha.0",
"sass": "^1.32.6",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"start-dev": "craco start",
"build": "react-scripts build && copy-and-watch configuration/* build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest",
"prettier",
"prettier/react",
"plugin:react-hooks/recommended",
"plugin:jsx-a11y/recommended",
"plugin:import/warnings"
],
"plugins": [
"prettier",
"jsx-a11y"
],
"rules": {
"react/prop-types": [
"off"
],
"prettier/prettier": [
1,
{
"arrowParens": "avoid"
}
]
},
"globals": {
"fetch": true,
"window": true,
"document": true,
"navigator": true
},
"settings": {
"import/resolver": {
"node": {
"paths": [
"src"
]
}
}
}
},
"prettier": {
"singleQuote": true,
"trailingComma": "es5",
"endOfLine": "auto",
"arrowParens": "avoid"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@welldone-software/why-did-you-render": "^6.2.3",
"copy-and-watch": "^0.1.5",
"eslint": "^7.20.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "7.21.5",
"eslint-plugin-react-hooks": "4.0.0",
"prettier": "^2.2.1"
}
"name": "stromae",
"version": "2.2.0-lunaticV2",
"description": "Web application for the management of questionnaires powered by Lunatic",
"repository": {
"type": "git",
"url": "https://github.com/InseeFr/Stromae.git"
},
"author": "INSEE (http://www.insee.fr)",
"license": "MIT",
"dependencies": {
"@craco/craco": "^6.4.0",
"@inseefr/lunatic": "0.4.23-v2",
"@material-ui/core": "^4.11.2",
"@material-ui/icons": "^4.11.2",
"@material-ui/lab": "^4.0.0-alpha.57",
"@material-ui/styles": "^4.11.2",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"date-fns": "^2.17.0",
"keycloak-js": "16.1.1",
"oidc-client": "^1.10.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.3",
"react-markdown": "^5.0.3",
"react-modal": "^3.12.1",
"react-router-dom": "^5.2.0",
"react-scripts": "4.0.1",
"react-swipeable-views": "^0.13.9",
"react-swipeable-views-utils": "^0.14.0-alpha.0",
"sass": "^1.32.6",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"start-dev": "craco start",
"build": "react-scripts build && copy-and-watch configuration/* build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"prepare": "husky install",
"lint:check": "eslint . --ext .js,.jsx",
"lint": "npm run lint:check -- --fix",
"_format": "prettier '**/*.{js,jsx,json,md}'",
"format": "npm run _format -- --write",
"format:check": "npm run _format -- --list-different"
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix"
],
"*.{js,jsx,json,md}": [
"prettier --write"
]
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@commitlint/cli": "^17.1.2",
"@commitlint/config-conventional": "^17.1.0",
"@welldone-software/why-did-you-render": "^6.2.3",
"copy-and-watch": "^0.1.5",
"eslint": "^8.12.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.29.4",
"eslint-plugin-react-hooks": "^4.4.0",
"husky": "^8.0.1",
"lint-staged": "^13.0.3",
"prettier": "^2.7.1"
}
}
Loading

0 comments on commit 04dcb52

Please sign in to comment.