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

More typescript conversion #398

Merged
merged 3 commits into from
May 5, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Expand Up @@ -4,7 +4,7 @@ jobs:
environment:
CC_TEST_REPORTER_ID: 21ed23663dd9d79502dbdcc044e9df8e417dc17e816d80eced94cd17ca402586
docker:
- image: circleci/node:13.14-stretch
- image: circleci/node:stretch
working_directory: ~/repo
steps:
- checkout
Expand Down
25 changes: 2 additions & 23 deletions package-scripts.js
Expand Up @@ -16,8 +16,8 @@ module.exports = {
watch: crossEnv('BABEL_TARGET=node jest --watch'),
},
lint: {
default: 'eslint . --ext .js,.tsx',
fix: 'eslint . --ext .js,.tsx --fix',
default: 'eslint . --ext .js,.tsx,.ts',
fix: 'eslint . --ext .js,.tsx,.ts --fix',
},
react: {
default: crossEnv('BABEL_TARGET=node jest --no-cache --config jest.React.json --notify'),
Expand All @@ -30,26 +30,6 @@ module.exports = {
lint: 'nps test.lint',
}),
},
e2e: {
default: `${concurrent({
// webpack: `webpack-dev-server --inline --port=${E2E_PORT}`,
protractor: 'nps e2e.whenReady',
})} --kill-others --success first`,
protractor: {
install: 'webdriver-manager update',
default: series(
'nps e2e.protractor.install',
'protractor test/protractor.conf.js',
),
debug: series(
'nps e2e.protractor.install',
'protractor test/protractor.conf.js --elementExplorer',
),
},
whenReady: series(
'nps e2e.protractor',
),
},
build: 'nps webpack.build',
webpack: {
default: 'nps webpack.server',
Expand Down Expand Up @@ -86,6 +66,5 @@ module.exports = {
hmr: 'webpack-dev-server -d --inline --hot --env.server',
},
},
serve: 'pushstate-server dist',
},
};
25 changes: 12 additions & 13 deletions package.json
Expand Up @@ -9,7 +9,7 @@
},
"author": "https://github.com/orgs/WebJamApps/teams/handlersandkickers",
"engines": {
"node": ">=13.14.0"
"node": ">=14.0.0"
},
"files": [
"webpack.config.js",
Expand Down Expand Up @@ -38,7 +38,6 @@
"installglobals": "yarn config set registry https://registry.yarnpkg.com -g",
"cleaninstall": "rm -rf yarn.lock && rm -rf node_modules && yarn cache clean && yarn installglobals && yarn install",
"snyk-protect": "snyk protect",
"eslint:fix": "./node_modules/eslint/bin/eslint.js --fix .",
"postinstall": "yarn start build",
"test:stylelint": "stylelint \"static/**/*.scss\"",
"prepare": "yarn run snyk-protect"
Expand Down Expand Up @@ -75,8 +74,7 @@
"@types/terser-webpack-plugin": "^2.2.0",
"@types/webpack-bundle-analyzer": "^2.13.3",
"@types/webpack-env": "^1.15.1",
"@typescript-eslint/eslint-plugin": "^2.26.0",
"awesome-typescript-loader": "^5.2.1",
"awesome-typescript-loader": "latest",
"babel-loader": "latest",
"bootstrap": "latest",
"copy-webpack-plugin": "latest",
Expand All @@ -92,7 +90,7 @@
"html-loader": "latest",
"html-webpack-plugin": "latest",
"jquery": "latest",
"jsog": "^1.0.7",
"jsog": "latest",
"jwt-simple": "latest",
"mini-css-extract-plugin": "latest",
"moment": "latest",
Expand All @@ -111,7 +109,7 @@
"react-resize-detector": "latest",
"react-router-dom": "latest",
"react-slick": "latest",
"react-timekeeper": "^2.1.0",
"react-timekeeper": "latest",
"redux": "latest",
"redux-logger": "latest",
"redux-persist": "latest",
Expand All @@ -121,13 +119,13 @@
"slick-carousel": "latest",
"snyk": "^1.317.0",
"socketcluster-client": "latest",
"source-map-loader": "^0.2.4",
"source-map-loader": "latest",
"style-loader": "latest",
"stylelint-config-recommended-scss": "latest",
"superagent": "latest",
"terser-webpack-plugin": "latest",
"ts-loader": "^6.2.2",
"typescript": "^3.8.3",
"ts-loader": "latest",
"typescript": "latest",
"url-loader": "latest",
"url-search-params-polyfill": "latest",
"webpack": "latest",
Expand All @@ -143,15 +141,16 @@
"@types/jest-environment-puppeteer": "^4.3.1",
"@types/puppeteer": "^2.0.1",
"@types/redux-mock-store": "^1.0.2",
"@typescript-eslint/parser": "^2.26.0",
"@typescript-eslint/parser": "latest",
"@typescript-eslint/eslint-plugin": "latest",
"babel-eslint": "^10.1.0",
"babel-plugin-transform-class-properties": "^6.24.1",
"enzyme": "latest",
"enzyme-adapter-react-16": "latest",
"enzyme-react-16-adapter-setup": "latest",
"eslint": "^6.8.0",
"eslint": "latest",
"eslint-config-airbnb": "latest",
"eslint-config-airbnb-typescript": "^7.2.0",
"eslint-config-airbnb-typescript": "latest",
"eslint-plugin-es": "latest",
"eslint-plugin-import": "latest",
"eslint-plugin-jest": "latest",
Expand All @@ -169,7 +168,7 @@
"stylelint": "latest",
"stylelint-config-standard": "latest",
"stylelint-scss": "latest",
"ts-jest": "^25.4.0",
"ts-jest": "latest",
"webpack-dev-server": "latest"
},
"snyk": true
Expand Down
1 change: 1 addition & 0 deletions src/containers/MusicDashboard/index.tsx
Expand Up @@ -243,4 +243,5 @@ export class MusicDashboard extends Component<MusicDashboardProps, MusicDashboar
);
}
}
// @ts-ignore
export default withRouter(connect(mapStoreToProps)(MusicDashboard));
2 changes: 1 addition & 1 deletion src/lib/commonUtils.js → src/lib/commonUtils.ts
@@ -1,4 +1,4 @@
const setTitleAndScroll = (pageTitle, width) => {
const setTitleAndScroll = (pageTitle: string, width: number) => {
if (pageTitle !== '') pageTitle += ' | ';// eslint-disable-line no-param-reassign
document.title = `${pageTitle}Web Jam LLC`;
let getClass = 'page-content';
Expand Down
File renamed without changes.
Expand Up @@ -5,7 +5,7 @@ describe('forms', () => {
const scrollIntoViewMock = jest.fn();
window.HTMLElement.prototype.scrollIntoView = scrollIntoViewMock;
document.body.innerHTML = '<div class="page-content"></div>';
commonUtils.setTitleAndScroll('home');
commonUtils.setTitleAndScroll('home', undefined);
expect(scrollIntoViewMock).toHaveBeenCalled();
});
});