Skip to content

Commit

Permalink
convert more require statements to import
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Kong committed Dec 2, 2023
1 parent afe0e79 commit 8f06604
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 25 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as jsDiff from 'diff';
import React, { Component } from 'react';
import { connect } from 'react-redux';
const jsDiff = require('diff');

export class DiffedResponse extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ConceptSelectorWithCheckbox from '../shared/conceptSelectorWithCheckbox.j
import getBoilerplateFeedback from './boilerplateFeedback.jsx';
import ResponseList from './responseList.jsx';

const jsDiff = require('diff');
import * as jsDiff from 'diff';

interface ResponseObj {
author: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as jsDiff from 'diff';
import React from 'react';
import { connect } from 'react-redux';
import _ from 'underscore';
import { Feedback } from '../../../Shared/index';
const jsDiff = require('diff');

import { hashToCollection, } from '../../../Shared/index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import fuzzy from 'fuzzyset.js';
import _ from 'underscore';
import constants from '../constants';
import {
checkChangeObjectMatch
checkChangeObjectMatch
} from './algorithms/changeObjects';
import { getOptimalResponses, getSubOptimalResponses } from './sharedResponseFunctions';

import quillNormalize from './quillNormalizer';
import { sortByLevenshteinAndOptimal } from './responseTools.js';

const jsDiff = require('diff');

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import _ from 'underscore';
import constants from '../constants';
import quillNormalize from './quillNormalizer';
import { getOptimalResponses } from './sharedResponseFunctions';
const jsDiff = require('diff');

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
4 changes: 2 additions & 2 deletions services/QuillLMS/client/app/bundles/Connect/libs/question.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import * as jsDiff from 'diff';
import fuzzy from 'fuzzyset.js';
import _ from 'underscore';
import constants from '../constants';
Expand All @@ -13,8 +14,7 @@ import {
import quillNormalize from './quillNormalizer';
import { checkForMissingWords } from './requiredWords';
import { getOptimalResponses, getTopOptimalResponse } from './sharedResponseFunctions';

const jsDiff = require('diff');
//import * as jsDiff from 'diff';

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as jsDiff from 'diff';
import React, { Component } from 'react';
import { connect } from 'react-redux';
const jsDiff = require('diff');

export class DiffedResponse extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import ConceptSelectorWithCheckbox from '../shared/conceptSelectorWithCheckbox.j
import getBoilerplateFeedback from './boilerplateFeedback.jsx';
import ResponseList from './responseList.jsx';

const jsDiff = require('diff');
import * as jsDiff from 'diff';

export default class extends React.Component {
constructor(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import fuzzy from 'fuzzyset.js';
import _ from 'underscore';
import constants from '../constants';
import {
checkChangeObjectMatch
checkChangeObjectMatch
} from './algorithms/changeObjects';
import { getOptimalResponses, getSubOptimalResponses } from './sharedResponseFunctions';

import quillNormalize from './quillNormalizer';
import { sortByLevenshteinAndOptimal } from './responseTools.js';

const jsDiff = require('diff');

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import _ from 'underscore';
import constants from '../constants';
import quillNormalize from './quillNormalizer';
import { getOptimalResponses } from './sharedResponseFunctions';
const jsDiff = require('diff');

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import fuzzy from 'fuzzyset.js';
import _ from 'underscore';
import constants from '../constants';
import {
checkChangeObjectMatch
checkChangeObjectMatch
} from './algorithms/changeObjects';
import {
getFeedbackForMissingWord
getFeedbackForMissingWord
} from './algorithms/joiningWords';
import {
spacingBeforePunctuation
spacingBeforePunctuation
} from './algorithms/spacingBeforePunctuation';
import quillNormalize from './quillNormalizer';
import { checkForMissingWords } from './requiredWords';
import { getOptimalResponses, getTopOptimalResponse } from './sharedResponseFunctions';

const jsDiff = require('diff');
import * as jsDiff from 'diff';

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as jsDiff from 'diff';
import React, { Component } from 'react';
import { connect } from 'react-redux';
const jsDiff = require('diff');

export class DiffedResponse extends Component {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ import fuzzy from 'fuzzyset.js';
import _ from 'underscore';
import constants from '../constants';
import {
checkChangeObjectMatch
checkChangeObjectMatch
} from './algorithms/changeObjects';
import { getOptimalResponses, getSubOptimalResponses } from './sharedResponseFunctions';

import quillNormalize from './quillNormalizer';
import { sortByLevenshteinAndOptimal } from './responseTools.js';

const jsDiff = require('diff');

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import _ from 'underscore';
import constants from '../constants';
import quillNormalize from './quillNormalizer';
import { getOptimalResponses } from './sharedResponseFunctions';
const jsDiff = require('diff');

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down
8 changes: 4 additions & 4 deletions services/QuillLMS/client/app/bundles/Lessons/libs/question.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ import fuzzy from 'fuzzyset.js';
import _ from 'underscore';
import constants from '../constants';
import {
checkChangeObjectMatch
checkChangeObjectMatch
} from './algorithms/changeObjects';
import {
getFeedbackForMissingWord
getFeedbackForMissingWord
} from './algorithms/joiningWords';
import {
spacingBeforePunctuation
spacingBeforePunctuation
} from './algorithms/spacingBeforePunctuation';
import quillNormalize from './quillNormalizer';
import { checkForMissingWords } from './requiredWords';
import { getOptimalResponses, getTopOptimalResponse } from './sharedResponseFunctions';

const jsDiff = require('diff');
import * as jsDiff from 'diff';

const ERROR_TYPES = {
NO_ERROR: 'NO_ERROR',
Expand Down

0 comments on commit 8f06604

Please sign in to comment.