Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .eslintignore

This file was deleted.

33 changes: 0 additions & 33 deletions .eslintrc.yml

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ COPY config.websocket.$ENVIRONMENT.yaml ./config.websocket.yaml
COPY config.seed.example.yaml ./config.seed.yaml
COPY migrate-mongo-config-example.ts ./migrate-mongo-config.ts
COPY ./migrations ./migrations
COPY ./.eslintignore ./
COPY ./.eslintrc.yml ./
COPY ./eslint.config.mjs ./
COPY server/jest.config.json ./jest.config.json
COPY ./next.config.js ./
COPY ./tsconfig.json ./
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/tests/auth/signup.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/// <reference types="cypress" />

import locators from "../../../support/locators";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/tests/header.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/// <reference types="cypress" />

import user from "../../fixtures/user";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/tests/image.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/// <reference types="cypress" />

import locators from "../../support/locators";
Expand Down
1 change: 0 additions & 1 deletion cypress/e2e/tests/personality.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/// <reference types="cypress" />

import locators from "../../support/locators";
Expand Down
7 changes: 4 additions & 3 deletions cypress/e2e/tests/review.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/// <reference types="cypress" />

import claim from "../../fixtures/claim";
Expand Down Expand Up @@ -28,7 +27,7 @@ const assignUser = () => {
cy.get(locators.claimReview.BTN_START_CLAIM_REVIEW).should("exist").click();
cy.get(locators.claimReview.INPUT_USER)
.should("exist")
.type(`${review.username}{downarrow}{enter}`, { delay: 200 })
.type(`${review.username}{downarrow}{enter}`, { delay: 200 });
cy.get('[title="reCAPTCHA"]').should("exist");
cy.get(locators.claimReview.BTN_ASSIGN_USER).should("be.disabled");
cy.checkRecaptcha();
Expand All @@ -41,7 +40,9 @@ const blockAssignedUserReview = () => {
cy.get(locators.claimReview.BTN_SELECTED_REVIEW).should("exist").click();
cy.get(locators.claimReview.INPUT_REVIEWER)
.should("exist")
.type(`${review.username}{downarrow}{downarrow}{enter}`, { delay: 200 })
.type(`${review.username}{downarrow}{downarrow}{enter}`, {
delay: 200,
});
cy.checkRecaptcha();
cy.get(locators.claimReview.BTN_SUBMIT).should("be.enabled").click();
cy.get(locators.claimReview.TEXT_REVIEWER_ERROR).should("exist");
Expand Down
7 changes: 3 additions & 4 deletions cypress/e2e/tests/source.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
/// <reference types="cypress" />

import locators from "../../support/locators";
Expand Down Expand Up @@ -34,7 +33,7 @@ describe("Create source and source review", () => {
.click();
cy.get(locators.claimReview.INPUT_USER)
.should("exist")
.type(`${review.username}{downarrow}{enter}`, { delay: 200 })
.type(`${review.username}{downarrow}{enter}`, { delay: 200 });
cy.get('[title="reCAPTCHA"]').should("exist");
cy.get(locators.claimReview.BTN_ASSIGN_USER).should("be.disabled");
cy.checkRecaptcha();
Expand Down Expand Up @@ -72,8 +71,8 @@ describe("Create source and source review", () => {
.click();
cy.get(locators.claimReview.INPUT_REVIEWER)
.should("exist")
.type(`${review.username}{downarrow}{enter}`, { delay: 200 })
cy.checkRecaptcha();
.type(`${review.username}{downarrow}{enter}`, { delay: 200 });
cy.checkRecaptcha();
cy.get(locators.claimReview.BTN_SUBMIT).should("be.enabled").click();
cy.get(locators.claimReview.TEXT_REVIEWER_ERROR).should("exist");
});
Expand Down
2 changes: 0 additions & 2 deletions dashboard/all-actions-in-fact-checking.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-undef */

//Querying all action taken in the fact-checking workflow
db.getCollection("stateevents").aggregate([
{ $match: { taskId: ObjectId("62eaaaf819007c3f2bfe2a80") } },
Expand Down
2 changes: 0 additions & 2 deletions dashboard/average-fact-check-time.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-undef */

//Querying average fact-checking time
db.getCollection("stateevents").aggregate([
{ $match: { taskId: ObjectId("62e99af928bdbf2c8f1de4cc") } },
Expand Down
2 changes: 0 additions & 2 deletions dashboard/between-states.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-undef */

//Querying how long it takes to move between specifics states
db.getCollection("stateevents").aggregate([
{
Expand Down
2 changes: 0 additions & 2 deletions dashboard/claim-started.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-undef */

//Querying how long it took from start to finish considering
//the day the claim was registered
db.getCollection("stateevents").aggregate([
Expand Down
2 changes: 0 additions & 2 deletions dashboard/fact-checking-started.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-undef */

//Querying how long it took from start to finish considering
//the day the fact-checking started
db.getCollection("stateevents").aggregate([
Expand Down
76 changes: 76 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import { defineConfig, globalIgnores } from "eslint/config";
import { fixupConfigRules } from "@eslint/compat";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([globalIgnores([
"dist/*",
"coverage/*",
"**/*.d.ts",
"src/types/",
"**/bak/**/*",
"**/bin/**/*",
"**/config/**/*",
"**/dist/**/*",
"**/doc/**/*",
"**/node_modules/**/*",
"**/public/**/*",
"**/report/**/*",
"**/webpack.config*.js",
"**/docs/**/*",
"migrations/**/*",
"**/migrate-mongo-config.ts",
]), {
extends: fixupConfigRules(compat.extends("plugin:@next/next/recommended")),

languageOptions: {
globals: {
...globals.jest,
},

parser: tsParser,
ecmaVersion: 2020,
sourceType: "module",
},

settings: {
react: {
version: "detect",
},
},

rules: {
"array-bracket-spacing": 0,
"arrow-parens": 0,
camelcase: 0,
"comma-dangle": 0,
"comma-spacing": 0,
"computed-property-spacing": 0,
indent: 0,
"key-spacing": 0,
"max-statements-per-line": 0,
"no-multi-spaces": 0,
"no-underscore-dangle": 0,
"no-unused-expressions": 0,
"no-restricted-syntax": 0,
"no-unused-vars": 0,
"one-var": 0,
"operator-linebreak": 0,
"space-before-function-paren": 0,
"space-in-parens": 0,
"valid-jsdoc": 0,
"jsx-a11y/anchor-is-valid": 0,
},
}]);
20 changes: 11 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@
"axios": "^1.12.0",
"babel-jest": "^29.7.0",
"babel-plugin-styled-components": "^1.13.2",
"body-parser": "^1.20.2",
"body-parser": "1.20.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"compromise": "^13.11.4",
Expand All @@ -127,7 +127,7 @@
"dayjs": "^1.11.13",
"domino": "^2.1.6",
"dompurify": "^3.0.5",
"express": "^4.19.2",
"express": "4.19.2",
"express-session": "^1.17.2",
"handlebars": "^4.7.7",
"helmet": "^6.0.0",
Expand All @@ -150,7 +150,7 @@
"next": "^12.1.0",
"next-i18next": "^10.2.0",
"next-seo": "^5.4.0",
"nodemailer": "^6.9.9",
"nodemailer": "7.0.11",
"react": "^18.3.1",
"react-cookie-consent": "^6.4.1",
"react-countdown": "^2.3.2",
Expand All @@ -171,7 +171,7 @@
"sitemap": "5",
"slugify": "^1.6.1",
"socket.io": "^4.7.2",
"storybook": "^7.4.5",
"storybook": "7.6.21",
"styled-components": "^5.3.0",
"ts-node": "^10.2.0",
"winston": "^3.13.0",
Expand All @@ -187,6 +187,9 @@
"@babel/core": "^7.15.0",
"@babel/preset-env": "^7.22.20",
"@babel/preset-react": "^7.14.5",
"@eslint/compat": "^2.0.2",
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@nestjs/schematics": "9.0.3",
"@nestjs/testing": "^9.3.12",
"@next/eslint-plugin-next": "^12.0.10",
Expand All @@ -205,24 +208,23 @@
"@types/node": "^16.4.13",
"@types/react": "^18.3.1",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/parser": "^4.29.0",
"@typescript-eslint/parser": "^8.54.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.5",
"concurrently": "^8.2.1",
"cypress": "13.17.0",
"dotenv": "^16.4.5",
"env-cmd": "^10.1.0",
"eslint": "7.0.0",
"eslint": "^9.39.2",
"eslint-config-next": "^12.0.10",
"eslint-config-prettier": "8.3.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.18.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-react": "^7.20.3",
"eslint-plugin-react-hooks": "^4.0.8",
"eslint-plugin-storybook": "^0.6.14",
"globals": "^17.3.0",
"husky": "^8.0.1",
"jest": "^29.7.0",
"lint-staged": "^13.0.3",
Expand All @@ -232,7 +234,7 @@
"supertest": "^6.2.4",
"ts-jest": "^29.1.1",
"typescript": "^4.3.5",
"wait-on": "^6.0.1"
"wait-on": "9.0.3"
},
"browserslist": [
">0.2%",
Expand Down
Loading
Loading