Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6e4f215
update configs, deps, and types
kylemh Jan 25, 2025
fe7307e
new registration process
kylemh Jan 26, 2025
9b4094d
new registration process
kylemh Jan 26, 2025
5c1a712
upgrade more deps and resolve issues
kylemh Jan 26, 2025
5b452be
remove unused snapshot
kylemh Jan 26, 2025
418fa38
resolve storybook build issue
kylemh Jan 26, 2025
ab803e9
fix build issue
kylemh Jan 26, 2025
f9a72f6
fix cypress tests
kylemh Jan 26, 2025
55e4933
use staging in cypress
kylemh Jan 26, 2025
d25ca2d
fix storybook issue
kylemh Jan 26, 2025
ef9c127
add logging
kylemh Jan 26, 2025
9f0e1c1
fix issues with selects and polish stuff up
kylemh Jan 27, 2025
25d1d4e
fix typo
kylemh Jan 27, 2025
fd24111
fix more form issues
kylemh Jan 28, 2025
f09b091
update snapshot
kylemh Jan 28, 2025
6dcd8d1
fix loading state UI
kylemh Jan 28, 2025
4e1dbec
another snapshot update
kylemh Jan 28, 2025
c74cece
allow for non-checked TS in Cypress
kylemh Jan 29, 2025
9b87646
fix more form issues, finish e2e test, and update snapshots
kylemh Jan 29, 2025
486e62b
Merge remote-tracking branch 'origin/main' into update-registration-form
kylemh Apr 27, 2025
74637ae
fix issue with sublink width
kylemh Apr 27, 2025
724ab32
extract InlineLoadingSpinner
kylemh Apr 27, 2025
097bf52
use cache v4
kylemh Apr 27, 2025
3f58b10
fix unit test
kylemh Apr 27, 2025
0dae1ea
change orb version
kylemh Apr 27, 2025
a1c09b5
disable Cypress using GPU
kylemh Apr 27, 2025
25b9013
fix cypress tsconfig
kylemh Apr 27, 2025
8915715
exlude cypress-specifc tsconfig from build/dev
kylemh Apr 27, 2025
d308aa6
upgrade next ^12 to see if it fixes build error
kylemh Apr 28, 2025
a5930bd
fix join test
kylemh Apr 28, 2025
85dcea9
update snapshots
kylemh Apr 28, 2025
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
cypress: cypress-io/cypress@1.29.0
cypress: cypress-io/cypress@2.2.0

executors:
default:
Expand Down
243 changes: 141 additions & 102 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
*/
module.exports = {
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'airbnb',
'plugin:jsx-a11y/recommended',
'prettier',
'plugin:cypress/recommended',
'plugin:storybook/recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:prettier/recommended',
'prettier',
],
env: {
browser: true,
Expand All @@ -19,7 +20,6 @@ module.exports = {
},
parser: '@babel/eslint-parser',
plugins: [
'prettier',
'unicorn',
'cypress',
'@operation_code/custom-rules',
Expand All @@ -31,107 +31,19 @@ module.exports = {
cy: true,
Cypress: true,
},
overrides: [
{
files: ['./**/*.test.js', './**/*.test.jsx', './**/*.test.ts', './**/*.test.tsx'],
plugins: ['vitest'],
extends: ['plugin:vitest-globals/recommended', 'plugin:vitest/recommended'],
env: {
'vitest-globals/env': true,
},
rules: {
'vitest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],
'vitest/expect-expect': [
'error',
{ assertFunctionNames: ['expect', 'createShallowSnapshotTest', 'createSnapshotTest'] },
],
'vitest/prefer-lowercase-title': ['error', { ignore: ['describe'] }],
'vitest/no-test-prefixes': 'error',
'vitest/no-test-return-statement': 'error',
'vitest/prefer-strict-equal': 'error',
'vitest/valid-describe-callback': 'error',
},
},
{
files: ['./**/*.ts', './**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
extends: ['plugin:@typescript-eslint/strict', 'plugin:@typescript-eslint/stylistic'],
rules: {
'react/no-array-index-key': 'off',
'react/require-default-props': 'off',

// Typescript Rules
// custom rules for typescript-eslint: https://github.com/OperationCode/front-end/pull/1792#pullrequestreview-1874516174
'@typescript-eslint/consistent-type-imports': ['error', { prefer: 'no-type-imports' }],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
types: ['boolean'],
format: ['PascalCase', 'UPPER_CASE'],
prefix: [
'is',
'was',
'should',
'has',
'can',
'did',
'will',
'IS_',
'WAS_',
'SHOULD_',
'HAS_',
'CAN_',
'DID_',
'WILL_',
],
},
],
'@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', { vars: 'all', varsIgnorePattern: '_' }],
'@typescript-eslint/unbound-method': 'off', // gives false negatives in arrow funcs
},
},
{
files: ['cypress/**/*.js'],
rules: {
'func-names': 'off',
'vitest/expect-expect': 'off',
'vitest/valid-expect': 'off',
'no-unused-expressions': ['off'],
},
},
{
files: [
'pages/**.js',
'components/head.js',
'components/nav.js',
'components/Timeline/historyData.js',
],
rules: {
'react/react-in-jsx-scope': 'off',
},
},
{
files: ['components/nav.js', 'components/Footer/Footer.js'],
rules: { 'jsx-a11y/anchor-is-valid': 'off' },
},
{
files: ['components/UpdateProfileForm/**/*.js'],
rules: { 'react/sort-comp': 'off' },
},
],
rules: {
// Import Rules
'import/extensions': [
'error',
'never',
{ css: 'always', jpg: 'always', json: 'always', png: 'always', svg: 'always' },
{
css: 'always',
jpg: 'always',
json: 'always',
png: 'always',
svg: 'always',
stories: 'always',
},
],
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
Expand Down Expand Up @@ -165,9 +77,6 @@ module.exports = {
// Lodash Plugin Rules
'lodash/import-scope': ['error', 'method'],

// Prettier Plugin Rules
'prettier/prettier': 'error',

// React Plugin Rules
'react/function-component-definition': [
'error',
Expand Down Expand Up @@ -247,5 +156,135 @@ module.exports = {
],
'no-use-before-define': 'off',
},
overrides: [
{
files: ['./**/*.test.js', './**/*.test.jsx', './**/*.test.ts', './**/*.test.tsx'],
plugins: ['vitest'],
extends: ['plugin:vitest-globals/recommended', 'plugin:vitest/recommended'],
env: {
'vitest-globals/env': true,
},
rules: {
'vitest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],
'vitest/expect-expect': [
'error',
{ assertFunctionNames: ['expect', 'createShallowSnapshotTest', 'createSnapshotTest'] },
],
'vitest/prefer-lowercase-title': ['error', { ignore: ['describe'] }],
'vitest/no-test-prefixes': 'error',
'vitest/no-test-return-statement': 'error',
'vitest/prefer-strict-equal': 'error',
'vitest/valid-describe-callback': 'error',
},
},
{
files: ['./**/*.ts', './**/*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
extends: ['plugin:@typescript-eslint/strict', 'plugin:@typescript-eslint/stylistic'],
rules: {
// Deactivate rules not meant for TS
'no-restricted-imports': 'off',

// React Plugin Rules
'react/prop-types': 'off', // https://github.com/jsx-eslint/eslint-plugin-react/issues/3651
'react/no-array-index-key': 'off',
'react/require-default-props': 'off',

// Typescript Rules
'@typescript-eslint/consistent-type-imports': ['error'],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'variable',
types: ['boolean'],
format: ['PascalCase', 'UPPER_CASE'],
prefix: [
'is',
'are',
'was',
'should',
'has',
'can',
'did',
'will',
'IS_',
'ARE_',
'WAS_',
'SHOULD_',
'HAS_',
'CAN_',
'DID_',
'WILL_',
],
},
],
'@typescript-eslint/no-empty-interface': ['error', { allowSingleExtends: true }],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-restricted-imports': [
'error',
{
paths: [
{
name: 'react-select',
message: 'Please use `components/Form/Select/ThemedReactSelect` instead.',
},
{
name: 'formik',
importNames: ['Form'],
message: `Please use our Form component to have good defaults defined.\n "import Form from 'components/Form/Form';"`,
},
{
name: 'react',
importNames: ['default'],
message: 'React is globally availble for all page files.',
},
],
},
],
'@typescript-eslint/no-unused-vars': ['error', { vars: 'all', varsIgnorePattern: '_' }],
'@typescript-eslint/unbound-method': 'off', // gives false negatives in arrow funcs
},
},
{
files: ['./**/*.test.ts', './**/*.test.tsx'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
{
files: ['./pages/api/**/*.ts'],
rules: {
'no-console': 'off',
},
},
{
files: ['cypress/**/*.js'],
rules: {
'func-names': 'off',
'vitest/expect-expect': 'off',
'vitest/valid-expect': 'off',
'no-unused-expressions': ['off'],
},
},
{
files: [
'pages/**.js',
'components/head.js',
'components/nav.js',
'components/Timeline/historyData.js',
],
rules: {
'react/react-in-jsx-scope': 'off',
},
},
{
files: ['components/nav.js', 'components/Footer/Footer.js'],
rules: { 'jsx-a11y/anchor-is-valid': 'off' },
},
],
root: true,
};
2 changes: 1 addition & 1 deletion .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Use cached node_modules
uses: actions/cache@v2
uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand Down
2 changes: 1 addition & 1 deletion .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"*.js": ["prettier --write", "eslint --fix"],
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
"*.css": ["prettier --write", "stylelint --fix"]
}
10 changes: 0 additions & 10 deletions .prettierrc

This file was deleted.

5 changes: 1 addition & 4 deletions .stylelintrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@
"rules": {
"prettier/prettier": true,
"alpha-value-notation": null,
"color-hex-case": "lower",
"color-hex-length": "long",
"custom-property-pattern": null,
"hue-degree-notation": null,
"indentation": 2,
"keyframes-name-pattern": null,
"color-function-notation": "legacy",
"no-duplicate-selectors": true,
"property-no-unknown": [true, { "ignoreProperties": ["composes", "composes-with"] }],
"selector-id-pattern": null,
"selector-class-pattern": null,
"selector-pseudo-class-no-unknown": [true, { "ignorePseudoClasses": ["global"] }],
"shorthand-property-no-redundant-values": null,
"string-quotes": "double"
"shorthand-property-no-redundant-values": null
}
}
7 changes: 6 additions & 1 deletion common/config/environment.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* This file should only contain environment variables that are non-secret.
*/
const isProduction = process.env.NODE_ENV === 'production';
const isProduction = process.env.PRODUCTION_DEPLOYMENT === 'true';

// These are all exposed by the client, so there's no way to protect them anyways.
export const clientTokens = isProduction
Expand Down Expand Up @@ -36,3 +36,8 @@ export const resourcesAPIURL = isProduction

export const slackMembersAPIUrl = 'https://slack.com/api/conversations.members';
export const slackGeneralChannelId = 'C03GSNF6X';

export const AIR_TABLE_BASE_ID = 'app9tYjofmFWMxRl8';
export const AIR_TABLE_TABLE_NAME = isProduction
? 'Onboarding Request PRODUCTION'
: 'Onboarding Request STAGING';
Loading
Loading