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
14 changes: 7 additions & 7 deletions .github/workflows/e2e-tests-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
lint:
name: TSC, ESLint, ShellCheck and Prettier
name: Oxlint, Oxfmt, and ShellCheck
runs-on: ubuntu-latest

steps:
Expand All @@ -33,18 +33,18 @@ jobs:
working-directory: ./e2e-tests
run: yarn install --mode=skip-build

- name: Run TypeScript Compiler check
- name: Run Oxlint
working-directory: ./e2e-tests
run: yarn tsc:check
run: yarn lint

- name: Run ESLint check
- name: Verify Playwright test collection
working-directory: ./e2e-tests
run: yarn lint:check
run: yarn test:list

- name: Run ShellCheck
working-directory: ./e2e-tests
run: yarn shellcheck

- name: Run Prettier check
- name: Run Oxfmt check
working-directory: ./e2e-tests
run: yarn prettier:check
run: yarn fmt:check
3 changes: 1 addition & 2 deletions e2e-tests/.lintstagedrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
*/
export default {
"*.sh": "shellcheck --severity=warning --color=always",
"*": "yarn prettier:fix",
"*": "yarn fmt",
"*.{js,jsx,ts,tsx,mjs,cjs}": "yarn lint:fix",
"*.{ts,tsx}": () => "yarn tsc:check",
};
5 changes: 5 additions & 0 deletions e2e-tests/.oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"sortImports": true,
"ignorePatterns": [".local-test", "coverage"]
}
50 changes: 0 additions & 50 deletions e2e-tests/.prettierrc.cjs

This file was deleted.

136 changes: 0 additions & 136 deletions e2e-tests/eslint.config.js

This file was deleted.

117 changes: 117 additions & 0 deletions e2e-tests/oxlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
import { defineConfig } from "oxlint";

export default defineConfig({
plugins: ["eslint", "typescript", "unicorn", "oxc", "import", "node", "promise"],
categories: {
correctness: "error",
suspicious: "error",
},
options: {
typeAware: true,
typeCheck: true,
},
jsPlugins: ["eslint-plugin-playwright", "eslint-plugin-check-file"],
ignorePatterns: [
"node_modules/**",
"playwright-report/**",
"test-results/**",
"coverage/**",
".local-test/**",
],
rules: {
"typescript/no-floating-promises": "error",
"typescript/await-thenable": "error",
"typescript/no-unsafe-assignment": "error",
"typescript/no-unsafe-member-access": "error",
"typescript/no-unsafe-call": "error",
"typescript/no-unsafe-return": "error",
"typescript/strict-void-return": "error",
"check-file/filename-naming-convention": [
"error",
{
"**/*.{js,ts,jsx,tsx}": "KEBAB_CASE",
},
{
ignoreMiddleExtensions: true,
},
],
"check-file/folder-naming-convention": [
"error",
{
"**": "KEBAB_CASE",
},
],
"playwright/no-wait-for-timeout": "error",
"playwright/no-force-option": "error",
"playwright/expect-expect": "error",
"playwright/valid-expect": "error",
"playwright/prefer-native-locators": "error",
"playwright/no-raw-locators": [
"error",
{
allowed: [],
},
],
"playwright/no-skipped-test": [
"error",
{
allowConditional: true,
},
],
},
overrides: [
{
files: ["playwright/e2e/auth-providers/**/*.spec.ts"],
rules: {
"typescript/strict-void-return": "off",
},
},
{
files: ["**/*.spec.ts", "**/*.test.ts", "playwright/**/*.ts"],
rules: {
// Playwright requires object destructuring for hook/test callbacks that take
// testInfo as a second argument (e.g. async ({}, testInfo) =>). Oxlint's
// no-empty-pattern rejects {}; disable it here so lint and runtime agree.
"eslint/no-empty-pattern": "off",
"playwright/valid-title": "off",
"playwright/valid-describe-callback": "off",
"playwright/no-wait-for-selector": "off",
"playwright/expect-expect": [
"error",
{
assertFunctionNames: [
"expect",
"toPass",
"verifyHeading",
"verifyQuickAccess",
"verifyLink",
"verifyRowsInTable",
"verifyRowInTableByUniqueText",
"verifyDivHasText",
"verifyComponentInCatalog",
"verifyParagraph",
"verifyText",
"verifyTextinCard",
"verifyVisitedCardContent",
"verifyAboutCardIsDisplayed",
"verifyPRStatisticsRendered",
"verifyPRRows",
"verifyPRRowsPerPage",
"registerExistingComponent",
"inspectEntityAndVerifyYaml",
"runAccessibilityTests",
"validateLog",
"validateLogEvent",
"validateRbacLogEvent",
"checkRbacResponse",
"verifyTextInSelector",
"verifyPartialTextInSelector",
"loginAsGuest",
"waitForTitle",
],
},
],
},
},
],
});
Loading
Loading