Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 0 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,6 @@ jobs:
- name: Style lint
run: yarn run style-lint

- name: Webpack build
run: yarn run build
env:
MITOL_API_BASE_URL: https://api.mitlearn-test.odl.mit.edu

- name: Lints
run: yarn run lint-check

Expand All @@ -144,12 +139,6 @@ jobs:
CODECOV: true
NODE_ENV: test

- name: Upload frontend build
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4
with:
name: frontend-build
path: frontends/mit-learn/build

- name: Upload coverage to CodeCov
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
Expand Down
3 changes: 2 additions & 1 deletion frontends/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ module.exports = {
"plugin:styled-components-a11y/recommended",
"plugin:import/typescript",
"plugin:mdx/recommended",
"plugin:@next/next/recommended",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the docs: https://nextjs.org/docs/pages/building-your-application/configuring/eslint#migrating-existing-config

If you already have ESLint configured in your application and any of the following conditions are true:...Then we recommend either [1] removing these settings if you prefer how these properties have been configured within eslint-config-next or [2] extending directly from the Next.js ESLint plugin instead:

(Emphasis mine)

IMO (2) is a better way for us... I don't think using next lint would work for a monorepo with a root eslint config.

"prettier",
],
plugins: ["testing-library", "import", "styled-components-a11y"],
ignorePatterns: [
"**/build/**",
"ol-ckeditor-2/dist",
"mit-learn",
"github-pages",
"storybook-static",
],
Expand Down
4 changes: 1 addition & 3 deletions frontends/api/src/clients.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ import {

import axiosInstance from "./axios"

const MITOL_API_BASE_URL = (<any>process).browser
? process.env.NEXT_PUBLIC_MITOL_API_BASE_URL
: process.env.MITOL_API_BASE_URL
const MITOL_API_BASE_URL = process.env.NEXT_PUBLIC_MITOL_API_BASE_URL

const BASE_PATH = MITOL_API_BASE_URL?.replace(/\/+$/, "") ?? ""

Expand Down
2 changes: 1 addition & 1 deletion frontends/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const projectsConfig: Config.InitialOptions = {
collectCoverage: true,
coverageDirectory: "coverage",
projects: ["<rootDir>/*/jest.config.ts"],
modulePathIgnorePatterns: ['<rootDir>/mit-learn/'],
modulePathIgnorePatterns: ["<rootDir>/mit-learn/"],
watchPlugins: [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname",
Expand Down
2 changes: 1 addition & 1 deletion frontends/main/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path, { resolve } from "path"
import { resolve } from "path"
import type { Config } from "@jest/types"
import baseConfig from "../jest.jsdom.config"

Expand Down
5 changes: 1 addition & 4 deletions frontends/main/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack },
) => {
webpack: (config, { webpack }) => {
config.plugins.push(
new webpack.IgnorePlugin({
resourceRegExp: /\.test\.tsx$/,
Expand Down
Loading