Skip to content

Commit

Permalink
Merge remote-tracking branch 'cole/react_18' into nodeV1
Browse files Browse the repository at this point in the history
has 3 TS errors
  • Loading branch information
huss committed Aug 25, 2023
2 parents 336c700 + 1a3b878 commit 6e0ca9b
Show file tree
Hide file tree
Showing 167 changed files with 7,598 additions and 23,292 deletions.
45 changes: 31 additions & 14 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,8 @@
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
// uncomment this to enforce eslint-plugin-jsdoc rules (and add comma above)
// along with the plugins below for jsdoc.
//the line of code below is in regards to https://github.com/OpenEnergyDashboard/OED/issues/396
// "plugin:jsdoc/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended-typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -25,18 +22,14 @@
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
//this section of code is for running jsdoc checker (eslint-plugin-jsdoc) https://github.com/OpenEnergyDashboard/OED/issues/396.
// It needs to be uncommented if using jsdoc plugin and add a comma above.
// "jsdoc"
"@typescript-eslint",
"jsdoc"
],
"rules": {
//https://github.com/typescript-eslint/typescript-eslint/issues/1824, indent is therefore turned off and we use typescript-eslint/indent instead
"indent": [
"off"
],
// TODO: Decide whether this setting should be on or off
// "jsdoc/newline-after-description": 0,
"@typescript-eslint/indent": [
"error",
"tab",
Expand Down Expand Up @@ -78,9 +71,8 @@
},
"overrides": [
{
// also possible in the future to limit to src/client/app/components/**/*.tsx files, where we make sure {} is only used for props.
// TODO: Remove this override once these components have been converted to use hooks
"files": [
"src/client/app/components/UIModalComponent.tsx",
"src/client/app/containers/admin/CreateUserContainer.tsx",
"src/client/app/containers/csv/UploadCSVContainer.tsx"
],
Expand All @@ -100,7 +92,7 @@
"@typescript-eslint"
],
"rules": {
// only to be used when declaring props as {}. Example is in UIModalComponent, ie; extends React.Component<{}>
// only to be used when declaring props as {}.
// is used in conjunction with overrides
// https://eslint.org/docs/user-guide/configuring/configuration-files#configuration-based-on-glob-patterns
"@typescript-eslint/ban-types": [
Expand Down Expand Up @@ -155,6 +147,31 @@
"as-needed"
]
}
},
{
// disable jsdoc requirement for reducers and actions
"files": [
"src/client/app/reducers/*.ts",
"src/client/app/actions/*.ts"
],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-returns": "off"
}
},
{
// disable jsdoc for containers separately
// jsdoc makes sense for containers but we are working on removing them from the codebase
// TODO: Remove this override once containers have been converted
"files": [
"src/client/app/containers/*/*",
"src/client/app/containers/*"
],
"rules": {
"jsdoc/require-jsdoc": "off",
"jsdoc/require-returns": "off",
"jsdoc/require-param": "off"
}
}
]
}
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

runs-on: ubuntu-latest
# Make sure the node version here matches containers/web/Dockerfile for the standard OED build.
container: node:16.13.2
container: node:18.17.0

services:
postgres:
Expand Down
2 changes: 1 addition & 1 deletion containers/web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Dockerfile for NodeJS application portion
# Make sure the node version here matches .github/workflows/build.yml for the GitHub workflow.
FROM node:18.16.0
FROM node:18.17.1

# Create the directory for the app
RUN mkdir -p "/usr/src/app"
Expand Down
5 changes: 0 additions & 5 deletions desc.d.ts

This file was deleted.

Loading

0 comments on commit 6e0ca9b

Please sign in to comment.