Skip to content

Commit c14c45a

Browse files
authored
Merge pull request #761 from rage/prettier-fix
Prettier fix
2 parents 8692980 + f3f59ad commit c14c45a

94 files changed

Lines changed: 237 additions & 315 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.prettierrc

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
{
2-
"printWidth": 110,
3-
"tabWidth": 2,
4-
"useTabs": false,
5-
"semi": true,
6-
"singleQuote": false,
7-
"quoteProps": "consistent",
8-
"jsxSingleQuote": false,
9-
"trailingComma": "es5",
10-
"bracketSpacing": true,
11-
"jsxBracketSameLine": true,
12-
"arrowParens": "always"
2+
"plugins": ["@trivago/prettier-plugin-sort-imports"],
3+
"arrowParens": "always",
4+
"endOfLine": "lf",
5+
"printWidth": 100,
6+
"tabWidth": 4,
7+
"trailingComma": "all"
138
}

backend/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import bodyParser from "body-parser";
2-
import express, { Response } from "express";
3-
41
import {
52
Course,
63
CourseDetails,
@@ -13,7 +10,6 @@ import {
1310
SubmissionResponse,
1411
SubmissionStatusReport,
1512
} from "../src/api/types";
16-
1713
import { applicationRouter, langsRounter, oauthRouter } from "./controllers";
1814
import {
1915
BackendCourse,
@@ -27,6 +23,8 @@ import {
2723
passingExerciseId,
2824
respondWithFile,
2925
} from "./utils";
26+
import bodyParser from "body-parser";
27+
import express, { Response } from "express";
3028

3129
const PORT = 4001;
3230

backend/setup.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1+
import * as config from "../config";
2+
import { getLangsCLIForPlatform, getPlatform } from "../src/utilities/env";
13
import archiver from "archiver";
24
import fs from "fs";
35
import { ncp } from "ncp";
46
import path from "path";
57

6-
import * as config from "../config";
7-
import { getLangsCLIForPlatform, getPlatform } from "../src/utilities/env";
8-
98
const TMC_LANGS_DL_URL = config.productionApi.__TMC_LANGS_DL_URL__.replace(/"/g, "");
109
const TMC_LANGS_VERSION = config.productionApi.__TMC_LANGS_VERSION__.replace(/"/g, "");
1110

backend/utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { Response } from "express";
2-
import path from "path";
3-
41
import {
52
Course,
63
CourseDetails,
@@ -12,6 +9,8 @@ import {
129
Organization,
1310
SubmissionResultReport,
1411
} from "../src/api/types";
12+
import { Response } from "express";
13+
import path from "path";
1514

1615
interface CreateOrganizationParams {
1716
information: string;

eslint.config.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1+
import { FlatCompat } from "@eslint/eslintrc";
2+
import js from "@eslint/js";
13
import typescriptEslint from "@typescript-eslint/eslint-plugin";
4+
import tsParser from "@typescript-eslint/parser";
25
import prettier from "eslint-plugin-prettier";
36
import sortClassMembers from "eslint-plugin-sort-class-members";
47
import globals from "globals";
5-
import tsParser from "@typescript-eslint/parser";
68
import path from "node:path";
79
import { fileURLToPath } from "node:url";
8-
import js from "@eslint/js";
9-
import { FlatCompat } from "@eslint/eslintrc";
1010

1111
const __filename = fileURLToPath(import.meta.url);
1212
const __dirname = path.dirname(__filename);

package-lock.json

Lines changed: 47 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,6 @@
457457
"eslint src --cache --max-warnings 0"
458458
]
459459
},
460-
"prettier": {
461-
"arrowParens": "always",
462-
"endOfLine": "lf",
463-
"printWidth": 100,
464-
"tabWidth": 4,
465-
"trailingComma": "all"
466-
},
467460
"dependencies": {
468461
"@aws-crypto/sha256-js": "^5.2.0",
469462
"del": "^8.0.0",
@@ -486,6 +479,7 @@
486479
"@eslint/eslintrc": "^3.1.0",
487480
"@eslint/js": "^9.10.0",
488481
"@playwright/test": "1.46.1",
482+
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
489483
"@types/chai": "^4.3.3",
490484
"@types/chai-as-promised": "^7.1.8",
491485
"@types/du": "^1.0.3",
@@ -513,7 +507,7 @@
513507
"husky": "^9.1.5",
514508
"lint-staged": "^15.2.9",
515509
"mocha": "^10.7.3",
516-
"prettier": "^3.3.3",
510+
"prettier": "^3.6.2",
517511
"raw-loader": "^4.0.2",
518512
"terser-webpack-plugin": "^5.3.10",
519513
"tmp": "0.2.3",

playwright/pages/course.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { FrameLocator, Page } from "@playwright/test";
2-
31
import { TmcPage } from "./tmc";
2+
import { FrameLocator, Page } from "@playwright/test";
43

54
export class CoursePage extends TmcPage {
65
constructor(

playwright/pages/login.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { FrameLocator, Page } from "@playwright/test";
2-
31
import { TmcPage } from "./tmc";
2+
import { FrameLocator, Page } from "@playwright/test";
43

54
export class LoginPage extends TmcPage {
65
constructor(

playwright/pages/my-courses.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { FrameLocator, Page } from "@playwright/test";
2-
31
import { SelectCourse } from "./select-course";
42
import { SelectOrganization } from "./select-organization";
53
import { TmcPage } from "./tmc";
4+
import { FrameLocator, Page } from "@playwright/test";
65

76
export class MyCoursesPage extends TmcPage {
87
constructor(

0 commit comments

Comments
 (0)