Skip to content

Commit

Permalink
hey
Browse files Browse the repository at this point in the history
  • Loading branch information
Alputer committed Feb 7, 2025
1 parent 98cae8d commit d797df6
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 26 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# This file is part of REANA.
# Copyright (C) 2020, 2022, 2024 CERN.
# Copyright (C) 2020, 2022, 2024, 2025 CERN.
#
# REANA is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
run: corepack enable && yarn set version 4.6.0

- name: Install eslint
run: yarn add eslint
run: cd reana-ui && yarn install --dev && cd ..

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

- name: Install project dependencies
run: yarn

- name: Run JavaScript tests
run: ./run-tests.sh --check-js-tests

Expand Down
16 changes: 0 additions & 16 deletions reana-ui/.eslintrc.json

This file was deleted.

47 changes: 47 additions & 0 deletions reana-ui/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// This file is created via running `yarn dlx @eslint/migrate-config .eslintrc.json` on top of our old `.eslintrc.json` file
import { fixupConfigRules, fixupPluginRules } from "@eslint/compat";
import prettier from "eslint-plugin-prettier";
import babelParser from "@babel/eslint-parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...fixupConfigRules(
compat.extends("plugin:prettier/recommended", "react-app", "prettier"),
),
{
plugins: {
prettier: fixupPluginRules(prettier),
},

languageOptions: {
parser: babelParser,
ecmaVersion: 5,
sourceType: "script",

parserOptions: {
requireConfigFile: false,

babelOptions: {
presets: ["@babel/preset-react"],
},
},
},

rules: {
"prettier/prettier": "error",
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
},
},
];
1 change: 1 addition & 0 deletions reana-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^14.0.0",
"craco-alias": "^3.0.1",
"eslint": "^9.19.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^5.0.1",
Expand Down
Loading

0 comments on commit d797df6

Please sign in to comment.