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
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

170 changes: 0 additions & 170 deletions .eslintrc.js

This file was deleted.

6 changes: 3 additions & 3 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Maps which event triggers which workflow and how they call each other.

| Workflow | Trigger | What runs |
|---|---|---|
| [build-pr.yml](workflows/build-pr.yml) | `pull_request` (all branches) | ESLint + tests, PR changelog, Android + iOS store builds (gated), E2E build + Maestro shards on both platforms (gated) |
| [build-develop.yml](workflows/build-develop.yml) | `push: develop` | ESLint + tests, release changelog, Android + iOS store builds, seeds Android AVD + SDK caches for E2E shards |
| [prettier.yml](workflows/prettier.yml) | `push: * except master, develop, single-server` (main repo) | Auto-formats with Prettier + ESLint and commits any fixes back to the branch |
| [build-pr.yml](workflows/build-pr.yml) | `pull_request` (all branches) | Lint + tests, PR changelog, Android + iOS store builds (gated), E2E build + Maestro shards on both platforms (gated) |
| [build-develop.yml](workflows/build-develop.yml) | `push: develop` | Lint + tests, release changelog, Android + iOS store builds, seeds Android AVD + SDK caches for E2E shards |
| [prettier.yml](workflows/prettier.yml) | `push: * except master, develop, single-server` (main repo) | Auto-formats with Oxfmt + Oxlint and commits any fixes back to the branch |
| [organize_translations.yml](workflows/organize_translations.yml) | `push` touching `app/i18n/locales/**.json` | Sorts JSON keys and commits the result |

## Call graph
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run ESLint and Test
name: Run Lint and Test

on:
workflow_call:
Expand All @@ -14,7 +14,7 @@ jobs:
- name: Checkout and Setup Node
uses: ./.github/actions/setup-node

- name: Run ESLint
- name: Run Oxlint
run: pnpm lint

- name: Run Tests
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Format Code with Prettier
name: Format Code with Oxfmt

on:
push:
Expand All @@ -23,11 +23,11 @@ jobs:
- name: Checkout and Setup Node
uses: ./.github/actions/setup-node

- name: Run Prettier
run: pnpm exec prettier --write .
- name: Run Oxfmt
run: pnpm exec oxfmt

- name: Run ESLint
run: pnpm exec eslint . --fix
- name: Run Oxlint
run: pnpm exec oxlint --fix -A react/exhaustive-deps

- name: Check for changes
id: changes
Expand All @@ -40,7 +40,7 @@ jobs:
echo "changes=true" >> $GITHUB_OUTPUT
fi

- name: Commit and push eslint changes
- name: Commit and push format changes
if: steps.changes.outputs.changes == 'true'
run: |
git config user.name "${{ github.actor }}"
Expand Down
2 changes: 1 addition & 1 deletion .maestro/scripts/data-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const createUserWithPasswordChange = () => {
return createUser({ requirePasswordChange: true });
}

const deleteCreatedUser = async ({ username: usernameToDelete }) => {
const deleteCreatedUser = ({ username: usernameToDelete }) => {
try {
login(output.account.adminUser, output.account.adminPassword);

Expand Down
41 changes: 41 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"bracketSpacing": true,
"singleQuote": true,
"jsxSingleQuote": true,
"trailingComma": "none",
"printWidth": 130,
"useTabs": true,
"arrowParens": "avoid",
"bracketSameLine": true,
"sortPackageJson": false,
"ignorePatterns": [
".github/",
"build/",
"node_modules/",
"coverage/",
"e2e/docker/",
"artifacts/",
"android/",
"ios/",
"patches/",
"scripts/",
".worktrees/",
".bettercodehub.yml",
".buckconfig",
".gitattributes",
".gitignore",
".snyk",
".watchmanconfig",
"CONTRIBUTING.md",
"README.md",
"SECURITY.md",
"npm-debug.log",
"yarn-error.log",
"pnpm-lock.yaml",
".storybook/",
"app/i18n/locales/",
"app/containers/CustomIcon/mappedIcons.js",
"app/containers/CustomIcon/selection.json"
]
}
104 changes: 104 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["import", "react", "jest"],
Comment thread
coderabbitai[bot] marked this conversation as resolved.
"jsPlugins": ["eslint-plugin-react-native"],
"categories": {
"correctness": "off"
},
"env": {
"builtin": true,
"es2024": true
},
"ignorePatterns": [
"**/__tests__",
"**/node_modules",
"**/coverage",
"e2e/docker",
"**/android",
"**/ios",
"**/.worktrees/",
".rnstorybook/storybook.requires.ts"
],
"rules": {
"import/extensions": "off",
"import/no-cycle": "warn",
"react/jsx-fragments": ["error", "syntax"],
"react-native/no-single-element-style-arrays": "error",
"react-native/no-unused-styles": "error",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react",
"importNames": ["default"],
"message": "Import specific named exports from React instead."
}
]
}
],
"no-void": "error",
"new-cap": "error",
"require-await": "error",
"react/exhaustive-deps": "warn",
"react/rules-of-hooks": "error",
"react/react-compiler": "warn"
},
"overrides": [
{
"files": ["**/*.ts", "**/*.tsx"],
"rules": {
"no-return-assign": "off",
"no-dupe-class-members": "error",
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "react",
"importNames": ["default"],
"message": "Import specific named exports from React instead."
}
]
}
],
"no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "none"
}
],
"no-useless-constructor": "off",
"no-use-before-define": "off",
"new-cap": "off",
"no-empty-function": "off",
"typescript/ban-ts-comment": "off",
"typescript/ban-types": "off",
"typescript/consistent-type-imports": [
"error",
{
"prefer": "type-imports",
"disallowTypeAnnotations": true,
"fixStyle": "inline-type-imports"
}
],
"typescript/no-explicit-any": "off",
"typescript/no-var-requires": "off"
},
"plugins": ["typescript"]
},
{
"files": ["jest.setup.js", "__mocks__/**/*.js", "**/*.test.{js,ts,tsx}"],
"rules": {
"jest/no-commented-out-tests": "warn",
"jest/no-identical-title": "error",
"jest/no-focused-tests": "error",
"jest/valid-expect": "error",
"jest/no-conditional-expect": "error",
"jest/expect-expect": "off"
}
}
]
}
Loading
Loading