Skip to content

Commit 8826dd2

Browse files
committed
hey
1 parent 98cae8d commit 8826dd2

File tree

5 files changed

+251
-26
lines changed

5 files changed

+251
-26
lines changed

.github/workflows/ci.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is part of REANA.
2-
# Copyright (C) 2020, 2022, 2024 CERN.
2+
# Copyright (C) 2020, 2022, 2024, 2025 CERN.
33
#
44
# REANA is free software; you can redistribute it and/or modify it
55
# under the terms of the MIT License; see LICENSE file for more details.
@@ -103,7 +103,7 @@ jobs:
103103
run: corepack enable && yarn set version 4.6.0
104104

105105
- name: Install eslint
106-
run: yarn add eslint
106+
run: cd reana-ui && yarn install --dev && cd ..
107107

108108
- name: Run prettier code formatter
109109
run: ./run-tests.sh --check-lint
@@ -122,9 +122,6 @@ jobs:
122122
- name: Enable corepack and set yarn version
123123
run: corepack enable && yarn set version 4.6.0
124124

125-
- name: Install project dependencies
126-
run: yarn
127-
128125
- name: Run JavaScript tests
129126
run: ./run-tests.sh --check-js-tests
130127

reana-ui/.eslintrc.json

-16
This file was deleted.

reana-ui/eslint.config.mjs

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// This file is created via running `yarn dlx @eslint/migrate-config .eslintrc.json` on top of our old `.eslintrc.json` file
2+
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
3+
import prettier from "eslint-plugin-prettier";
4+
import babelParser from "@babel/eslint-parser";
5+
import path from "node:path";
6+
import { fileURLToPath } from "node:url";
7+
import js from "@eslint/js";
8+
import { FlatCompat } from "@eslint/eslintrc";
9+
10+
const __filename = fileURLToPath(import.meta.url);
11+
const __dirname = path.dirname(__filename);
12+
const compat = new FlatCompat({
13+
baseDirectory: __dirname,
14+
recommendedConfig: js.configs.recommended,
15+
allConfig: js.configs.all,
16+
});
17+
18+
export default [
19+
...fixupConfigRules(
20+
compat.extends("plugin:prettier/recommended", "react-app", "prettier"),
21+
),
22+
{
23+
plugins: {
24+
prettier: fixupPluginRules(prettier),
25+
},
26+
27+
languageOptions: {
28+
parser: babelParser,
29+
ecmaVersion: 5,
30+
sourceType: "script",
31+
32+
parserOptions: {
33+
requireConfigFile: false,
34+
35+
babelOptions: {
36+
presets: ["@babel/preset-react"],
37+
},
38+
},
39+
},
40+
41+
rules: {
42+
"prettier/prettier": "error",
43+
"react/jsx-uses-react": "off",
44+
"react/react-in-jsx-scope": "off",
45+
},
46+
},
47+
];

reana-ui/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"@testing-library/jest-dom": "^6.1.4",
6161
"@testing-library/react": "^14.0.0",
6262
"craco-alias": "^3.0.1",
63+
"eslint": "^9.19.0",
6364
"eslint-config-prettier": "^9.0.0",
6465
"eslint-config-react-app": "^7.0.1",
6566
"eslint-plugin-prettier": "^5.0.1",

0 commit comments

Comments
 (0)