Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen committed Dec 28, 2024
1 parent 23c3251 commit fa943c5
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 20 deletions.
19 changes: 9 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
},
{
"overrides": [
{
"files": ["**/__tests__/**/*"],
"env": {
"jest": true
}
}
]
}
"overrides": [
{
"files": ["**/__tests__/**/*"],
"env": {
"jest": true
}
}
]

}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12
node-version: 20

# ESLint must be in `package.json`
- name: Install Node.js linting dependencies
Expand Down
2 changes: 1 addition & 1 deletion patientsearch/src/js/components/Error.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const useStyles = makeStyles((theme) => ({
}));

export default function ErrorMessage(props) {
if (!props.message) return null;
const classes = useStyles();
if (!props.message) return null;
return (
<div
className={classes.root}
Expand Down
2 changes: 2 additions & 0 deletions patientsearch/src/js/components/FormattedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const useStyles = makeStyles((theme) => ({
},
}));
const TextMaskCustom = forwardRef((props, setRef) => {
/* eslint-disable no-unused-vars */
/* eslint-disable react/prop-types */
const { ownerState, ...other } = props;
return (
<MaskedInput
Expand Down
1 change: 0 additions & 1 deletion patientsearch/src/js/components/UrineScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ export default function UrineScreen(props) {
type: type,
text: text,
date: date,
index: index,
patientId: getPatientId(),
};
});
Expand Down
1 change: 1 addition & 0 deletions patientsearch/src/js/helpers/test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from "react";
import { render } from "@testing-library/react";
import ProjectThemeProvider from "../context/ProjectThemeProvider";

/* eslint-disable react/prop-types */
const AllTheProviders = ({ children }) => {
return (
<ProjectThemeProvider>{children}</ProjectThemeProvider>
Expand Down
8 changes: 1 addition & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const TerserWebpackPlugin = require("terser-webpack-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
//const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const FileManagerPlugin = require("filemanager-webpack-plugin");
const NodePolyfillPlugin = require("node-polyfill-webpack-plugin");
/* document title is being populated at runtime, this is just a placeholder */
Expand All @@ -29,6 +28,7 @@ module.exports = (env) => {
util: require.resolve("util/"),
stream: require.resolve("stream-browserify"),
},
extensions: [".js", ".jsx", ".css"]
},
devtool: isDevelopment? "eval" : "nosources-cheap-source-map",
mode: isDevelopment?"development":"production",
Expand Down Expand Up @@ -59,9 +59,6 @@ module.exports = (env) => {
filename: "app.bundle.[name]-[hash:6].js",
publicPath: "/static/js/",
},
resolve: {
extensions: [".js", ".jsx", ".css"],
},
module: {
rules: [
//parse css files
Expand Down Expand Up @@ -108,9 +105,6 @@ module.exports = (env) => {
},
plugins: [
new NodePolyfillPlugin(),
// new CleanWebpackPlugin({
// cleanOnceBeforeBuildPatterns: [path.join(__dirname, "/patientsearch/dist")]
// }),
new HtmlWebpackPlugin({
title: appTitle,
template: templateFilePath,
Expand Down

0 comments on commit fa943c5

Please sign in to comment.