Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DUOS-2805][risk=no] Add ts configurations #2413

Merged
merged 4 commits into from
Dec 13, 2023
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
8 changes: 7 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"settings": {
"react": {
"version": "detect"
},
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"import/resolver": {
"typescript": {}
}
},
"parserOptions": {
Expand All @@ -30,7 +36,7 @@
1,
{
"extensions": [
".js", ".jsx"
".js", ".jsx", ".ts", ".tsx"
]
}
],
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ COPY src /usr/src/app/src
COPY public /usr/src/app/public
COPY package.json /usr/src/app/package.json
COPY package-lock.json /usr/src/app/package-lock.json
COPY tsconfig.json /usr/src/app/tsconfig.json
COPY config/base_config.json /usr/src/app/public/config.json
RUN npm config set update-notifier false
RUN npm install --silent
Expand Down
3 changes: 1 addition & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ module.exports = defineConfig({
baseUrl: 'http://localhost:3000/',
},
component: {
src: ['./src/components/common', './cypress/component/'],
specPattern: '**/*.spec.js',
specPattern: ['**/*.spec.js', '**/*.spec.ts', '**/*.spec.tsx'],
devServer: {
framework: 'create-react-app',
bundler: 'webpack',
Expand Down
12 changes: 12 additions & 0 deletions cypress/component/PrivacyPolicy/privacy_policy.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* eslint-disable no-undef */

import {mount} from 'cypress/react';
import React from 'react';
import PrivacyPolicy from '../../../src/pages/PrivacyPolicy';

describe('Privacy Policy', () => {
it('Renders the privacy policy page', () => {
mount(<PrivacyPolicy/>);
cy.get('h1').should('contain', 'DUOS Privacy Policy');
});
});
19 changes: 19 additions & 0 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"es5",
"dom"
],
"types": [
"cypress",
"node"
],
"jsx": "react",
"esModuleInterop": true
},
"include": [
"**/*.ts",
"**/*.tsx"
]
}
Loading
Loading