Skip to content

Commit

Permalink
Merge branch 'ac/see-all-notifications' of github.com:sandboxnu/searc…
Browse files Browse the repository at this point in the history
…hneu into ac/see-all-notifications
  • Loading branch information
sebwittr committed Oct 18, 2023
2 parents cc2853d + aaeb009 commit 4ed186c
Show file tree
Hide file tree
Showing 30 changed files with 4,325 additions and 5,474 deletions.
12 changes: 12 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@
"legacy": true
},
"@emotion" // needed for react-spinners
],
[
"@babel/plugin-proposal-private-property-in-object",
{
"loose": true
}
],
[
"@babel/plugin-proposal-private-methods",
{
"loose": true
}
]
]
}
17 changes: 16 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,22 @@
"rules": {
"react/react-in-jsx-scope": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
"@typescript-eslint/explicit-module-boundary-types": "off",
"no-restricted-syntax": [
"error",
{
"selector": "Literal[value=/^#[a-zA-Z0-9]/i]",
"message": "This project uses color variables for our styling to keep everything consistent with a single, unifying pallette; if the feature you're working on is using colors, please import Colors and use those variables instead! (_variables.scss for color variables in scss, _exports.module.scss for color variables in .tsx)"
},
{
"selector": "Literal[value=/^rgb[(]/i]",
"message": "This project uses color variables for our styling to keep everything consistent with a single, unifying pallette; if the feature you're working on is using colors, please import Colors and use those variables instead! (_variables.scss for color variables in scss, _exports.module.scss for color variables in .tsx)"
},
{
"selector": "Literal[value=/^rgba[(]/i]",
"message": "This project uses color variables for our styling to keep everything consistent with a single, unifying pallette; if the feature you're working on is using colors, please import Colors and use those variables instead! (_variables.scss for color variables in scss, _exports.module.scss for color variables in .tsx)"
}
]
},
"overrides": [
{
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install node v14.19
- name: install node v18
uses: actions/setup-node@v1
with:
node-version: 14.19
node-version: 18
- uses: bahmutov/npm-install@v1
- run: yarn lint
- run: yarn sass-lint
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install node v14.19
- name: install node v18
uses: actions/setup-node@v1
with:
node-version: '14.19'
node-version: '18'
- run: yarn install
- run: yarn test
4 changes: 2 additions & 2 deletions .github/workflows/tsc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install node v14.19
- name: install node v18
uses: actions/setup-node@v1
with:
node-version: 14.19
node-version: 18
- run: yarn install
- run: yarn tsc
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.19
18.x
18 changes: 18 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"extends": "stylelint-config-recommended-scss",
"rules": {
"color-named": [
"never",
{
"severity": "error"
}
],
"color-no-hex": [
true,
{
"severity": "error"
}
]
},
"defaultSeverity": "warning"
}
7 changes: 6 additions & 1 deletion components/ResultsPage/ResultsLoader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ function ResultsLoader({
<div className="five column row">
<div className="page-home">
{results
.filter((result) => result !== null && result !== undefined)
.filter(
(result) =>
result !== null &&
result !== undefined &&
result.class.subject !== 'NULL'
)
.map((result) => {
return (
<ResultItemMemoized
Expand Down
2 changes: 2 additions & 0 deletions components/icons/Husky.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ReactElement } from 'react';
import { campusToColor } from '../../utils/campusToColor';
import { Campus } from '../types';

/* eslint-disable no-restricted-syntax */

interface HuskyProps {
className: string;
/** Decides the color based on campus */
Expand Down
2 changes: 2 additions & 0 deletions components/icons/IconGradcap.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ReactElement } from 'react';

/* eslint-disable no-restricted-syntax */

const IconGradcap = ({
width = '27',
height = '18',
Expand Down
2 changes: 2 additions & 0 deletions components/icons/IconMessage.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ReactElement } from 'react';

/* eslint-disable no-restricted-syntax */

const IconMessage = ({
width = '17',
height = '24',
Expand Down
2 changes: 2 additions & 0 deletions components/icons/IconNotepad.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ReactElement } from 'react';

/* eslint-disable no-restricted-syntax */

const IconNotepad = ({
width = '17',
height = '24',
Expand Down
2 changes: 2 additions & 0 deletions components/icons/IconScale.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ReactElement } from 'react';

/* eslint-disable no-restricted-syntax */

const IconScale = ({
width = '24',
height = '24',
Expand Down
2 changes: 2 additions & 0 deletions components/icons/IconTie.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ReactElement } from 'react';

/* eslint-disable no-restricted-syntax */

const IconTie = ({
width = '24',
height = '21',
Expand Down
2 changes: 2 additions & 0 deletions components/icons/IconUser.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import React, { ReactElement } from 'react';

/* eslint-disable no-restricted-syntax */

const IconUser = ({
width = '28',
height = '28',
Expand Down
2 changes: 2 additions & 0 deletions components/icons/Logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { ReactElement } from 'react';
import { campusToColor } from '../../utils/campusToColor';
import { Campus } from '../types';

/* eslint-disable no-restricted-syntax */

interface LogoProp {
className: string;
campus: Campus;
Expand Down
6 changes: 3 additions & 3 deletions components/tests/integration/Result.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jest.mock('../../../utils/TermInfoProvider', () => () => ({
error: null,
termInfos: {
NEU: [{ text: TERM_TEXT, value: TERM_ID }],
CPS: [],
LAW: [],
CPS: [{ text: TERM_TEXT, value: TERM_ID }],
LAW: [{ text: TERM_TEXT, value: TERM_ID }],
},
}));

Expand Down Expand Up @@ -150,7 +150,7 @@ describe.only('Results page integration tests', () => {
// click the apply button
classIdRangeFilter.find('.RangeFilter__apply-input').simulate('click');
expect(setQParams).toBeCalledWith({
classIdRange: { max: 5000, min: 1000 },
classIdRange: { max: 5000, min: 2000 },
});
});
});
Loading

0 comments on commit 4ed186c

Please sign in to comment.