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
4 changes: 2 additions & 2 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
- name: 📦 Install dependencies
run: pnpm install

- name: Run eslint
run: pnpm run lint:eslint
- name: Run oxlint
run: pnpm oxlint --deny-warnings .

typescriptChecker:
name: 🟦 TypeScript Checker
Expand Down
28 changes: 28 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"printWidth": 80,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"endOfLine": "lf",
"sortTailwindcss": {
"stylesheet": "./src/app.css",
"functions": ["cn", "tv"]
},
"ignorePatterns": [
"node_modules",
"pnpm-lock.yaml",
".expo",
"dist",
"android",
"ios",
"**/*.md",
"**/*.mdx",
".env*",
"src/lib/hey-api/generated",
"uniwind-types.d.ts",
"src/uniwind-types.d.ts"
]
}
114 changes: 114 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "react-hooks", "unicorn", "typescript", "node"],
"jsPlugins": [
"@tanstack/eslint-plugin-query",
"eslint-plugin-simple-import-sort",
"eslint-plugin-sonarjs",
"eslint-plugin-storybook"
],
"categories": {
"correctness": "error"
},
"ignorePatterns": [
"src/lib/hey-api/generated/**",
".rnstorybook/storybook.requires.ts",
"uniwind-types.d.ts",
"src/uniwind-types.d.ts"
],
"rules": {
"no-unreachable": "error",
"react/no-unescaped-entities": "off",
"typescript/no-unused-vars": [
"error",
{
"args": "all",
"argsIgnorePattern": "^_",
"caughtErrors": "all",
"caughtErrorsIgnorePattern": "^_",
"destructuredArrayIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"ignoreRestSiblings": true
}
],
"unicorn/filename-case": [
"error",
{
"case": "kebabCase",
"ignore": ["^Icon(.*)\\.tsx", "^Logo.tsx"]
}
],
"simple-import-sort/exports": "warn",
"simple-import-sort/imports": [
"warn",
{
"groups": [
["^@?\\w", "^\\u0000"],
["^.+\\.s?css$"],
["^@/lib", "^@/hooks"],
["^@/data"],
["^@/components"],
["^@/"],
[
"^\\./?$",
"^\\.(?!/?$)",
"^\\.\\./?$",
"^\\.\\.(?!/?$)",
"^\\.\\./\\.\\./?$",
"^\\.\\./\\.\\.(?!/?$)",
"^\\.\\./\\.\\./\\.\\./?$",
"^\\.\\./\\.\\./\\.\\.(?!/?$)"
],
["^@/types"],
["^"]
]
}
],
"@tanstack/query/exhaustive-deps": "error",
"@tanstack/query/no-rest-destructuring": "warn",
"@tanstack/query/stable-query-client": "error",
"@tanstack/query/no-unstable-deps": "error",
"@tanstack/query/infinite-query-property-order": "error",
"@tanstack/query/no-void-query-fn": "error",
"@tanstack/query/mutation-property-order": "error",
"sonarjs/cognitive-complexity": ["warn", 50],
"sonarjs/prefer-immediate-return": "warn",
"sonarjs/todo-tag": "warn"
},
"overrides": [
{
"files": ["src/**/*"],
"rules": {
"node/no-process-env": "error"
}
},
{
"files": ["src/env.ts"],
"rules": {
"node/no-process-env": "off"
}
},
{
"files": ["src/app/**/*.*", "**/generated/**/*.*"],
"rules": {
"unicorn/filename-case": "off"
}
},
{
"files": ["**/*.stories.*"],
"rules": {
"storybook/await-interactions": "error",
"storybook/context-in-play-function": "error",
"storybook/default-exports": "error",
"storybook/hierarchy-separator": "warn",
"storybook/no-redundant-story-name": "warn",
"storybook/no-renderer-packages": "error",
"storybook/prefer-pascal-case": "warn",
"storybook/story-exports": "error",
"storybook/use-storybook-expect": "error",
"storybook/use-storybook-testing-library": "error",
"storybook/no-uninstalled-addons": "error"
}
}
]
}
13 changes: 0 additions & 13 deletions .prettierignore

This file was deleted.

16 changes: 0 additions & 16 deletions .prettierrc.cjs

This file was deleted.

3 changes: 1 addition & 2 deletions .rnstorybook/storybook.requires.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* do not change this file, it is auto generated by storybook. */
/// <reference types="@storybook/react-native/metro-env" />
import {
type Features,
start,
updateView,
View,
type Features,
} from '@storybook/react-native';

import '@storybook/addon-ondevice-controls/register';
import '@storybook/addon-ondevice-actions/register';

Expand Down
8 changes: 2 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
{
"recommendations": [
"expo.vscode-expo-tools",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
]
{
"recommendations": ["expo.vscode-expo-tools", "oxc.oxc-vscode"]
}
125 changes: 0 additions & 125 deletions eslint.config.js

This file was deleted.

11 changes: 7 additions & 4 deletions lefthook.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
pre-commit:
commands:
check:
glob: '*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}'
run: pnpm prettier --write {staged_files}
format:
glob: '*.{js,ts,cjs,mjs,jsx,tsx,json,jsonc,css,scss}'
run: pnpm oxfmt {staged_files}
stage_fixed: true
oxlint:
glob: '*.{js,ts,cjs,mjs,jsx,tsx}'
run: pnpm oxlint --fix {staged_files}
stage_fixed: true

pre-push:
commands:
check:
glob: '*.{js,ts,cjs,mjs,d.cts,d.mts,jsx,tsx,json,jsonc}'
run: pnpm lint
Loading
Loading