Skip to content

Commit 380e6ff

Browse files
2 parents 5909384 + 96aad83 commit 380e6ff

File tree

282 files changed

+6010
-4081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

282 files changed

+6010
-4081
lines changed

.circleci/config.yml

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ install_dependency: &install_dependency
2828
install_deploysuite: &install_deploysuite
2929
name: Installation of install_deploysuite.
3030
command: |
31-
git clone --branch v1.4.11 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
31+
git clone --branch v1.4.12 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
3232
cp ./../buildscript/master_deploy.sh .
3333
cp ./../buildscript/buildenv.sh .
3434
cp ./../buildscript/awsconfiguration.sh .
@@ -41,10 +41,10 @@ save_cache_settings: &save_cache_settings
4141
paths:
4242
- node_modules
4343

44-
running_yarn_tslint: &running_yarn_tslint
45-
name: Running Yarn tslint
44+
running_yarn_eslint: &running_yarn_eslint
45+
name: Running Yarn eslint
4646
command: |
47-
yarn add tslint -g
47+
yarn add eslint -g
4848
yarn lint
4949
5050
running_yarn_build: &running_yarn_build
@@ -81,7 +81,7 @@ lint_steps: &lint_steps
8181
# Initialization.
8282
- checkout
8383
- setup_remote_docker
84-
- run: *running_yarn_tslint
84+
- run: *running_yarn_eslint
8585

8686
build_steps: &build_steps
8787
# Initialization.
@@ -129,21 +129,21 @@ deploy_steps: &deploy_steps
129129
./master_deploy.sh -d CFRONT -e $DEPLOY_ENV -c $ENABLE_CACHE
130130
131131
jobs:
132-
lint-dev:
133-
<<: *defaults
134-
environment:
135-
DEPLOY_ENV: "DEV"
136-
LOGICAL_ENV: "dev"
137-
APPNAME: "platform-ui-mvp"
138-
steps: *lint_steps
139-
140-
lint-prod:
141-
<<: *defaults
142-
environment:
143-
DEPLOY_ENV: "PROD"
144-
LOGICAL_ENV: "prod"
145-
APPNAME: "platform-ui-mvp"
146-
steps: *lint_steps
132+
# lint-dev:
133+
# <<: *defaults
134+
# environment:
135+
# DEPLOY_ENV: "DEV"
136+
# LOGICAL_ENV: "dev"
137+
# APPNAME: "platform-ui-mvp"
138+
# steps: *lint_steps
139+
140+
# lint-prod:
141+
# <<: *defaults
142+
# environment:
143+
# DEPLOY_ENV: "PROD"
144+
# LOGICAL_ENV: "prod"
145+
# APPNAME: "platform-ui-mvp"
146+
# steps: *lint_steps
147147

148148
build-dev:
149149
<<: *defaults
@@ -175,7 +175,7 @@ jobs:
175175
environment:
176176
DEPLOY_ENV: "DEV"
177177
LOGICAL_ENV: "dev"
178-
ENABLE_CACHE: false
178+
ENABLE_CACHE: true
179179
APPNAME: "platform-ui-mvp"
180180
steps: *deploy_steps
181181

@@ -192,19 +192,19 @@ workflows:
192192
version: 2
193193
build:
194194
jobs:
195-
- lint-dev:
196-
context : org-global
197-
filters:
198-
branches:
199-
ignore:
200-
- master
201-
202-
- lint-prod:
203-
context : org-global
204-
filters:
205-
branches:
206-
only:
207-
- master
195+
# - lint-dev:
196+
# context : org-global
197+
# filters:
198+
# branches:
199+
# ignore:
200+
# - master
201+
202+
# - lint-prod:
203+
# context : org-global
204+
# filters:
205+
# branches:
206+
# only:
207+
# - master
208208

209209
- build-dev:
210210
context : org-global

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ yarn-error.log*
2929

3030
# Editors
3131
.editorconfig
32-
.prettierrc

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,12 @@ Each [Tool](#tools) can have its own setup requirements. Please see each tool's
190190
| `yarn start:<dev>` | Serve dev mode build with dev's personal config |
191191
| `yarn build` | Build dev mode build with the default config and outputs static files in /builds |
192192
| `yarn build:prod` | Build prod mode build with the prod config and outputs static files in /builds |
193-
| `yarn lint` | Run tslint against ts/x files and outputs report |
194-
| `yarn lint:fix` | Run tslint against ts/x files, fixes auto-fixable issues, and outputs report |
195-
| `yarn eslint` | Run eslint against js/x files and outputs report |
196-
| `yarn eslint:fix` | Run eslint against js/x files, fixes auto-fixable issues, and outputs report |
193+
| `yarn lint:ts` | Run eslint against ts/x files and outputs report |
194+
| `yarn lint:ts:fix` | Run eslint against ts/x files, fixes auto-fixable issues, and outputs report |
195+
| `yarn lint:js` | Run eslint against js/x files and outputs report |
196+
| `yarn lint:js:fix` | Run eslint against js/x files, fixes auto-fixable issues, and outputs report |
197+
| `yarn lint` | Run eslint against js/x and ts/x files and outputs report |
198+
| `yarn lint:fix` | Run eslint against js/x and ts/x files, fixes auto-fixable issues, and outputs report |
197199
| `yarn test` | Run unit tests, watching for changes and re-running per your specifications |
198200
| `yarn test:no-watch` | Run unit tests once, without watching for changes or re-running |
199201
| `yarn cy:run` | Run e2e tests once in local command with the site is running |
@@ -370,11 +372,11 @@ The PlatformRoute model has several useful options:
370372
## Linting
371373

372374
### Rules
373-
While [TSLint](https://palantir.github.io/tslint/) is technically deprecated in favor of [Typescript ESLint](https://typescript-eslint.io/), TSLint is still far better at linting Typescript files than ESLint. So, for the time being, TSLint will be the primary linter, but ESLint remains configured for JS/X files.
374375

375-
The following command will install TSLint globally:
376+
Javascript rules: [src/.eslintrc.js](src/.eslintrc.js)
377+
378+
Typescript rules: [src-ts/.eslintrc.js](src-ts/.eslintrc.js)
376379

377-
>% yarn global add tslint typescript
378380

379381
### Command Line
380382

@@ -386,9 +388,7 @@ The following command will install TSLint globally:
386388

387389
>% yarn lint:fix
388390
389-
OR
390-
391-
>% yarn eslint:fix
391+
See the [yarn commmands](#yarn-commands) for further options.
392392

393393
### VS Code
394394

@@ -411,16 +411,16 @@ The most useful feature is to automatically apply all lint rules any time you sa
411411
...
412412
"editor.formatOnSave": true,
413413
"editor.codeActionsOnSave": {
414-
"source.fixAll.tslint": true,
414+
"source.fixAll.eslint": true,
415415
},
416416
}
417417
```
418418
419-
#### TSLint Plugin
419+
#### ESLint Plugin
420420
421421
Created by Microsoft, this plugin will allow you to see lint errors in the Problems panel.
422422
423-
>**WARNING:** Other lint plugins can interfere with TSLint, so it is recommended that you uninstall/disable all other lint plugins (e.g. ESLint, Prettier, etc).
423+
>**WARNING:** Other lint plugins can interfere with ESLint, so it is recommended that you uninstall/disable all other lint plugins (e.g. TSLint, Prettier, etc).
424424
425425
## Styling
426426

cypress.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// tslint:disable-next-line: no-submodule-imports This is the way cypress does it
21
import task from '@cypress/code-coverage/task'
32
import { defineConfig } from 'cypress'
43

package.json

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"name": "@topcoder-platform/platform-ui",
3-
"version": "2.2",
3+
"version": "2.3",
44
"private": true,
55
"scripts": {
66
"dev": "yarn react-app-rewired start",
77
"start": "sh start-ssl.sh",
88
"start:brooke": "sudo sh start-ssl-brooke.sh",
99
"build": "yarn react-app-rewired build",
10-
"lint": "tslint 'src-ts/**/*.{ts,tsx}' && eslint 'src*/**/*.{js,jsx,ts,tsx}'",
11-
"lint:fix": "tslint 'src-ts/**/*.{ts,tsx}' --fix && eslint 'src*/**/*.{js,jsx,ts,tsx}' --fix",
12-
"tslint": "tslint 'src-ts/**/*.{ts,tsx}'",
13-
"tslint:fix": "tslint 'src-ts/**/*.{ts,tsx}' --fix",
14-
"eslint": "eslint 'src/**/*.{js,jsx}'",
15-
"eslint:fix": "eslint 'src/**/*.{js,jsx}' --fix",
10+
"lint:ts": "eslint -c ./src-ts/.eslintrc.js 'src-ts/**/*.{ts,tsx}'",
11+
"lint:ts:fix": "eslint -c ./src-ts/.eslintrc.js 'src-ts/**/*.{ts,tsx}' --fix",
12+
"lint:js": "eslint -c ./src/.eslintrc.js 'src/**/*.{js,jsx}'",
13+
"lint:js:fix": "eslint -c ./src/.eslintrc.js 'src/**/*.{js,jsx}' --fix",
14+
"lint": "npm run lint:js && npm run lint:ts",
15+
"lint:fix": "npm run lint:js:fix && npm run lint:ts:fix",
1616
"test": "react-scripts test --watchAll",
1717
"test:no-watch": "react-scripts test --watchAll=false --passWithNoTests",
1818
"cy:run": "cypress run --reporter junit",
@@ -23,6 +23,8 @@
2323
"dependencies": {
2424
"@datadog/browser-logs": "^4.21.2",
2525
"@heroicons/react": "^1.0.6",
26+
"@stripe/react-stripe-js": "1.13.0",
27+
"@stripe/stripe-js": "1.41.0",
2628
"apexcharts": "^3.36.0",
2729
"axios": "^1.1.2",
2830
"browser-cookies": "^1.2.0",
@@ -78,8 +80,6 @@
7880
"@babel/preset-typescript": "^7.18.6",
7981
"@babel/runtime": "^7.19.4",
8082
"@cypress/code-coverage": "^3.10.0",
81-
"@stripe/react-stripe-js": "1.13.0",
82-
"@stripe/stripe-js": "1.41.0",
8383
"@testing-library/jest-dom": "^5.16.5",
8484
"@testing-library/react": "^13.4.0",
8585
"@testing-library/user-event": "^14.4.3",
@@ -102,6 +102,8 @@
102102
"@types/segment-analytics": "^0.0.34",
103103
"@types/systemjs": "^6.1.1",
104104
"@types/uuid": "^8.3.4",
105+
"@typescript-eslint/eslint-plugin": "^5.30.6",
106+
"@typescript-eslint/parser": "^5.30.6",
105107
"@wdio/junit-reporter": "^7.25.1",
106108
"autoprefixer": "^10.4.12",
107109
"babel-eslint": "^11.0.0-beta.2",
@@ -114,11 +116,17 @@
114116
"cross-env": "^7.0.3",
115117
"cypress": "^10.10.0",
116118
"eslint": "^8.25.0",
117-
"eslint-config-prettier": "^8.5.0",
119+
"eslint-config-airbnb": "^19.0.4",
118120
"eslint-config-react-app": "^7.0.1",
119121
"eslint-config-react-important-stuff": "^3.0.0",
122+
"eslint-import-resolver-typescript": "^3.2.5",
120123
"eslint-plugin-cypress": "^2.12.1",
121-
"eslint-plugin-prettier": "^4.2.1",
124+
"eslint-plugin-import": "^2.25.3",
125+
"eslint-plugin-jsx-a11y": "^6.5.1",
126+
"eslint-plugin-no-null": "^1.0.2",
127+
"eslint-plugin-ordered-imports": "^0.6.0",
128+
"eslint-plugin-react": "^7.28.0",
129+
"eslint-plugin-react-hooks": "^4.3.0",
122130
"file-loader": "^6.2.0",
123131
"husky": "^8.0.1",
124132
"identity-obj-proxy": "^3.0.0",
@@ -127,17 +135,17 @@
127135
"jest-cli": "^29.2.0",
128136
"lint-staged": "^13.0.3",
129137
"nyc": "^15.1.0",
130-
"postcss-loader": "^7.0.1",
131-
"postcss-scss": "^4.0.5",
132-
"prettier": "^2.7.1",
138+
"postcss-loader": "^4.0.4",
139+
"postcss-scss": "^3.0.2",
133140
"pretty-quick": "^3.1.3",
134141
"resolve-url-loader": "^5.0.0",
135142
"sass-loader": "^13.1.0",
136143
"serve": "^14.0.1",
137144
"start-server-and-test": "^1.14.0",
138145
"style-loader": "^3.3.1",
139146
"systemjs-webpack-interop": "^2.3.7",
140-
"tslint": "^6.1.3",
147+
"typed-scss-modules": "^7.0.1",
148+
"webpack": "^4.41.2",
141149
"webpack-cli": "^4.10.0",
142150
"webpack-config-single-spa-react": "^4.0.3",
143151
"webpack-dev-server": "^4.11.1",

0 commit comments

Comments
 (0)