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

Fix unused vars eslint warnings #9226

Merged
merged 1 commit into from Apr 30, 2024
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 .eslintrc.json
Expand Up @@ -48,7 +48,7 @@
"ignoreComments": true
}],
"no-unexpected-multiline": "off",
"no-unused-vars": "warn",
"no-unused-vars": "error",
"no-useless-escape": "off",
"no-dupe-keys": "off",
"react/no-direct-mutation-state": "off",
Expand Down
15 changes: 0 additions & 15 deletions jsx/Form.js
Expand Up @@ -1528,21 +1528,6 @@ export class DateElement extends Component {
this.handleChange = this.handleChange.bind(this);
}

/**
* Called by React when the component has been rendered on the page.
*/
componentDidMount() {
// Check if props minYear and maxYear are valid values if supplied
let minYear = this.props.minYear;
let maxYear = this.props.maxYear;
if (this.props.minYear === '' || this.props.minYear === null) {
minYear = '1000';
}
if (this.props.maxYear === '' || this.props.maxYear === null) {
maxYear = '9999';
}
}

/**
* Handle change
*
Expand Down
1 change: 0 additions & 1 deletion modules/document_repository/jsx/editForm.js
Expand Up @@ -8,7 +8,6 @@ import {
TextareaElement,
SelectElement,
ButtonElement,
FileElement,
} from 'jsx/Form';
/**
* Document Edit Form
Expand Down
Expand Up @@ -147,11 +147,6 @@ export const createFetchChunksEpic = (fromState: (any) => State) => (
Math.ceil(bounds.interval[1] - bounds.domain[0])
) / recordingDuration;

const interval : [number, number] = [
Math.floor(i0),
Math.min(Math.ceil(i1), numChunks),
];

return {
interval:
[
Expand Down
2 changes: 0 additions & 2 deletions modules/instrument_builder/jsx/react.questions.js
Expand Up @@ -16,9 +16,7 @@ import {
DateElement,
TextboxElement,
TextareaElement,
TextElement,
NumericElement,
ButtonElement,
StaticElement,
} from 'jsx/Form';

Expand Down
1 change: 0 additions & 1 deletion modules/media/jsx/editForm.js
Expand Up @@ -14,7 +14,6 @@ import PropTypes from 'prop-types';
import swal from 'sweetalert2';
import {
FormElement,
TextboxElement,
TextareaElement,
SelectElement,
DateElement,
Expand Down