Skip to content

Commit

Permalink
update dependencies, move to react functional components and es modul…
Browse files Browse the repository at this point in the history
…es for server
  • Loading branch information
ntraut committed Jun 21, 2023
1 parent f8b5322 commit 0c6f820
Show file tree
Hide file tree
Showing 60 changed files with 5,577 additions and 5,600 deletions.
52 changes: 0 additions & 52 deletions .eslintrc.js

This file was deleted.

69 changes: 69 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"extends": [
"airbnb",
"naat",
"prettier"
],
"parserOptions": {
"ecmaVersion": 2022,
"sourceType": "module"
},
"rules": {
// Enable additional rules
"no-throw-literal": "warn",
"semi": "error",
// Disable rule incompatible with eslint-plugin-import rule import/order
"sort-imports": "off",
// Disables rules we choose not to apply
// "import/prefer-default-export": "off",
// "react/forbid-prop-types": "off",
// "react/sort-comp": "off",
"react/jsx-filename-extension": [
"error",
{
"extensions": [
".jsx"
]
}
],
// "no-underscore-dangle": "off",
// Rewrite airbnb rule to allow ForOfStatement
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
// disable import/extensions rule as node requires to specify the extension on es module imports
"import/extensions": "off"
},
"overrides": [
{
"files": [
"bin/**"
],
"rules": {
"no-console": "off"
}
}
],
"globals": {
"it": "readonly",
"describe": "readonly"
},
"settings": {
"import/resolver": {
"node": {
"extensions": [
".js",
".jsx"
]
}
}
},
"env": {
"browser": false,
"node": true,
"jest": true
}
}
20 changes: 0 additions & 20 deletions babel.config.js

This file was deleted.

20 changes: 20 additions & 0 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "entry",
"corejs": "3.0.0"
}
],
"@babel/preset-react"
],
"plugins": [
"@babel/plugin-proposal-class-properties"
],
"env": {
"development": {
"compact": true
}
}
}
13 changes: 13 additions & 0 deletions jest-mongodb-config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
mongodbMemoryServerOptions: {
instance: {
port: 46347,
ip: 'localhost'
},
binary: {
version: '3.6.10',
skipMD5: true,
},
autoStart: false,
},
};
85 changes: 43 additions & 42 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "connect",
"version": "1.0.0",
"type": "module",
"description": "An open platform to save anonymous data coming from any application using this API",
"scripts": {
"start": "node src/index.js",
"te": "node app.js",
"dev": "cross-env NODE_ENV=development node src/index.js",
"build": "webpack --node-env production",
"build.dev": "webpack --node-env development",
"eslint.check": "eslint --ext js,jsx .",
"eslint.fix": "eslint --ext js,jsx --fix .",
"prettier.check": "prettier --list-different .",
"prettier.fix": "prettier --write .",
"test": "jest --config spec/jest.config.js -i --forceExit --detectOpenHandles",
"test": "cross-env MONGO_MEMORY_SERVER_FILE=jest-mongodb-config.cjs yarn node --experimental-vm-modules $(yarn bin jest) --config spec/jest.config.js -i --forceExit --detectOpenHandles",
"performance": "node bin/performance.js"
},
"eslintConfig": {
Expand All @@ -38,71 +38,72 @@
"dependencies": {
"@material-ui/core": "^4.2.1",
"@material-ui/icons": "^4.2.1",
"axios": "^0.21.1",
"axios": "^1.3.4",
"body-parser": "^1.20.2",
"copy-webpack-plugin": "^11.0.0",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^8.0.0",
"dotenv": "^16.0.3",
"express": "^4.17.1",
"glob": "^7.1.4",
"glob-promise": "^6.0.3",
"jsonschema": "^1.2.6",
"lodash.flow": "^3.5.0",
"moment": "^2.24.0",
"mongoose": "^5.7.5",
"mongoose": "^7.0.3",
"nodemailer": "^6.9.1",
"oauth2-server": "git+https://github.com/oauthjs/node-oauth2-server#4.x",
"parse": "^3.5.1",
"parse": "^4.0.1",
"parse-dashboard": "^5.0.0",
"parse-server": "^5.4.0",
"parse-server": "^6.0.0",
"parse-server-api-mail-adapter": "^2.2.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-moment": "^0.9.2",
"react-router": "^5.0.1",
"react-router-dom": "^5.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-moment": "^1.1.3",
"react-router": "5.1",
"react-router-dom": "5.1",
"request": "^2.88.2",
"request-promise": "^4.2.6",
"swagger-ui-express": "^4.0.7",
"swagger-ui-express": "^4.6.2",
"uuid": "^9.0.0",
"validate.js": "^0.13.1",
"winston": "^3.2.1"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/core": "^7.21.4",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.5.0",
"@babel/preset-env": "^7.21.4",
"@babel/preset-react": "^7.0.0",
"@shelf/jest-mongodb": "^4.1.3",
"babel-loader": "^8.0.6",
"connect-history-api-fallback": "^1.6.0",
"core-js": "^3.1.4",
"css-loader": "^5.0.1",
"eslint": "^7.10.0",
"eslint-config-airbnb": "^18.2.0",
"@shelf/jest-mongodb": "^4.1.7",
"babel-loader": "^9.1.2",
"connect-history-api-fallback": "^2.0.0",
"core-js": "^3.30.0",
"css-loader": "^6.7.3",
"eslint": "^8.37.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-naat": "git+https://github.com/neuroanatomy/eslint-config-naat",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.3",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4",
"html-webpack-plugin": "^5",
"husky": "^4.0.0",
"jest": "^29.2.2",
"json2csv": "^4.5.2",
"lint-staged": ">=10",
"mini-css-extract-plugin": "^1.3.3",
"mongodb": "^3",
"nock": "^13.0.5",
"prettier": "^2",
"qs": "^6.10.1",
"sass": "^1.34.0",
"sass-loader": "^10.1.0",
"style-loader": "^0.23.1",
"husky": "^8.0.3",
"jest": "^29.5.0",
"json2csv": "^6.0.0-alpha.2",
"lint-staged": ">=13.2.0",
"mini-css-extract-plugin": "^2.7.5",
"mongodb": "^5.1.0",
"nock": "^13.3.0",
"prettier": "^2.8.7",
"qs": "^6.11.1",
"sass": "^1.60.0",
"sass-loader": "^13.2.2",
"style-loader": "^3.3.2",
"url-loader": "^4.1.1",
"webpack": "^5.12.3",
"webpack-cli": "^4.3.1",
"webpack-dev-middleware": "^6.0.1"
"webpack": "^5.77.0",
"webpack-cli": "4",
"webpack-dev-middleware": "^6.0.2"
}
}
2 changes: 1 addition & 1 deletion spec/__mock__/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
PUBLIC_URL: 'http://localhost:3000',
API_URL: 'http://localhost:3000',
APP_PORT: '3000',
Expand Down
Loading

0 comments on commit 0c6f820

Please sign in to comment.