Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6183d2b
refactor: renaming query
wilmouths Apr 8, 2024
cc340b8
feat: adding glossary page
wilmouths Apr 8, 2024
8cb98fb
fix(i18n): changing locale
wilmouths Apr 9, 2024
7df3978
refactor: removing cursor on scroll, ajuste scroll to
wilmouths Apr 9, 2024
d099e61
[4.1] Remove template name conversion (#76)
benjaminfaure Apr 19, 2024
5f05a60
Merge branch 'hotfix/4.0.2' into dev
benjaminfaure Apr 23, 2024
ce249de
chore: removed unused import after merge
benjaminfaure Apr 23, 2024
293b5dd
fix: removed double declaration
benjaminfaure Apr 23, 2024
bbe27d1
fix: style import in FunderImport
benjaminfaure Apr 23, 2024
64c8950
feat: adding metadore component
wilmouths Apr 23, 2024
2486b57
feat: adding metadore api request
wilmouths Apr 23, 2024
15bab11
feat: adding static pages in directus
wilmouths Apr 23, 2024
0bfb526
style: removing color on selected groups
wilmouths Apr 24, 2024
25b9159
Merge pull request #80 from OPIDoR/feat/static-pages
benjaminfaure Apr 26, 2024
2afe3ad
Merge branch 'dev' into feat/glossary
benjaminfaure Apr 26, 2024
8063cea
Merge pull request #77 from OPIDoR/feat/glossary
benjaminfaure Apr 26, 2024
1e8248f
i18n: adding translation
wilmouths Apr 26, 2024
6a22f40
Merge branch 'dev' into feat/metadore
benjaminfaure Apr 26, 2024
b7026b3
Merge pull request #79 from OPIDoR/feat/metadore
benjaminfaure Apr 26, 2024
397cf43
lint: adding space between function and return
wilmouths Apr 26, 2024
8639482
fix: adding condition to lock comment sending
wilmouths Apr 26, 2024
fb8d32d
Merge branch 'dev' of https://github.com/OPIDoR/dmp_opidor_react into…
wilmouths Apr 26, 2024
bcb3cf2
feat: removing first research output, adding form to create one, and …
wilmouths Apr 26, 2024
f866d92
fix: displaying form when no data
wilmouths Apr 26, 2024
25d8e8f
Merge pull request #81 from OPIDoR/feat/ro-creation
benjaminfaure Apr 29, 2024
5d75707
feat: adding env vars to set directus instance
wilmouths Apr 29, 2024
6a67cfd
chore: adding commit lint config
wilmouths May 2, 2024
d39e8ab
chore: adding eslint v9 config
wilmouths May 2, 2024
34c3edf
chore: removing all .md files
wilmouths May 2, 2024
903af4d
chore: adding files on eslint config
wilmouths May 2, 2024
ff785de
chore: removing test file (not used)
wilmouths May 2, 2024
cc6c6c3
chore: adding news dev deps
wilmouths May 2, 2024
52afb57
chore: linting code
wilmouths May 2, 2024
7afc64f
chore: adding linting
wilmouths May 2, 2024
4c167e6
chore: adding linting test github action
wilmouths May 2, 2024
22a852d
chore: adding husky hooks
wilmouths May 2, 2024
f01d828
fix(typo): fixing workflows directory name
wilmouths May 2, 2024
5c11819
chore: removing .github/workflow directory
wilmouths May 2, 2024
cd4becb
chore: updating linting process
wilmouths May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run linter on pull request
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
run-linter:
runs-on: ubuntu-latest

environment: development

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'yarn'

- name: Install dependencies
run: yarn install

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
files: src/**/*.{js,jsx}
files_ignore: src/__tests__/

- name: Run lint test
shell: bash
run: |
ROOT_DIR=$(git rev-parse --show-toplevel)
ESLINT="${ROOT_DIR}//node_modules/eslint/bin/eslint.js --no-ignore'"
JSFILES=""
for file in ${{ steps.changed-parser.outputs.all_modified_files }}; do
JSFILES="$JSFILES $file"
done
if [ -n "$JSFILES" ]; then
echo "$JSFILES" | xargs $ESLINT || {
echo "Linting failed."
exit 1
}
fi
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
27 changes: 27 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh

# Include husky
. "$(dirname "$0")/_/husky.sh" || {
echo "Cannot find husky.sh. Make sure Husky is installed or adjust the path." >&2
exit 1
}

# Defaults to .git
unset GIT_DIR

ROOT_DIR=$(git rev-parse --show-toplevel)

cd "$ROOT_DIR" || {
echo "Cannot change directory to $ROOT_DIR." >&2
exit 1
}

JSFILES=$(git diff --name-only --cached --relative --diff-filter=ACM | grep -E '\.jsx?$' || :)
ESLINT="${ROOT_DIR}//node_modules/eslint/bin/eslint.js --no-ignore'"

if [ -n "$JSFILES" ]; then
echo "$JSFILES" | xargs $ESLINT || {
echo "Linting failed."
exit 1
}
fi
4 changes: 4 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"*.js": "yarn lint",
"*.jsx": "yarn lint"
}
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']};
22 changes: 22 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import globals from 'globals';
import pluginJs from '@eslint/js';
// import pluginReactConfig from 'eslint-plugin-react/configs/recommended.js';

export default [
{
files: ['**/*.js', '**/*.jsx'],
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
rules: {
// 'react/jsx-filename-extension': ['warn', { 'extensions': ['.js', '.jsx'] }],
// 'react/no-array-index-key': 'off',
// 'react/jsx-props-no-spreading': 'off',
'no-use-before-define': 'warn',
'consistent-return': 'off',
'prefer-const': 'error',
},
},
pluginJs.configs.recommended,
// pluginReactConfig,
];
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"name": "dmp_opidor_react",
"version": "0.1.0",
"private": true,
"scripts": {
"lint": "eslint . --ignore-pattern '**/__tests__/**'",
"commitlint": "commitlint --edit $1",
"prepare": "husky"
},
"dependencies": {
"@directus/sdk": "^15.0.3",
"@tinymce/tinymce-react": "^5.0.0",
Expand Down Expand Up @@ -54,10 +59,18 @@
},
"devDependencies": {
"@cfaester/enzyme-adapter-react-18": "^0.7.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@testing-library/jest-dom": "^6.1.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.0.0",
"commitlint": "^19.3.0",
"enzyme": "^3.11.0",
"eslint": "^9.1.1",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.1.0",
"husky": "^9.0.11",
"react-test-renderer": "^18.2.0"
}
}
10 changes: 9 additions & 1 deletion public/locales/fr/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -193,5 +193,13 @@
"Tools": "Outils",
"There seems to be no question for this category.": "Il semble ne pas y avoir de question pour cette catégorie",
"Oh, it seems that this help page is still under development and does not yet contain any content.": "Oh, il semble que cette page d'aide soit encore en cours de développement et ne contienne pas encore de contenu.",
"This record already exists.": "Cet élément est déjà présent."
"This record already exists.": "Cet élément est déjà présent.",
"Search by <DOI> or <Title>": "Recherche par <DOI> ou <Titre>",
"Glossary": "Glossaire",
"Oh, it seems that this glossary page is still under development and does not yet contain any content.": "Oh, il semble que cette page de glossaire soit encore en cours de développement et ne contienne pas encore de contenu.",
"There don't seem to be any terms for this letter.": "Il ne semble pas y avoir de termes pour cette lettre",
"Search...": "Rechercher...",
"Your plan does not yet include any research output": "Votre plan ne comporte encore aucun produit de recherche",
"Create a research output": "Créer un produit de recherche",
"A ‘type’ is required to create a search product.": "Un \"type\" est nécessaire pour créer un produit de recherche."
}
19 changes: 0 additions & 19 deletions specifications/Champ_Contributeur.md

This file was deleted.

139 changes: 0 additions & 139 deletions specifications/Choix_Recommandations.md

This file was deleted.

Loading