fix: replace eslint with oxlint (#8677)
* fix: replace eslint with oxlint * chore: adding max warning * fix: formatting
This commit is contained in:
parent
41abaffc6e
commit
c5542438a1
31 changed files with 439 additions and 2466 deletions
|
|
@ -117,16 +117,54 @@ jobs:
|
||||||
path: .turbo
|
path: .turbo
|
||||||
key: turbo-${{ runner.os }}-${{ github.event.pull_request.base.sha }}-${{ github.sha }}
|
key: turbo-${{ runner.os }}-${{ github.event.pull_request.base.sha }}-${{ github.sha }}
|
||||||
|
|
||||||
# Lint and type checks depend on build artifacts
|
# Lint check - no build dependency, OxLint is a standalone Rust binary
|
||||||
check:
|
check-lint:
|
||||||
name: ${{ matrix.task }}
|
name: check:lint
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
timeout-minutes: 10
|
||||||
|
if: |
|
||||||
|
github.event.pull_request.draft == false &&
|
||||||
|
github.event.pull_request.requested_reviewers != null
|
||||||
|
env:
|
||||||
|
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
|
||||||
|
TURBO_SCM_HEAD: ${{ github.sha }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
fetch-depth: 50
|
||||||
|
filter: blob:none
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
|
||||||
|
- name: Enable Corepack and pnpm
|
||||||
|
run: corepack enable pnpm
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Cache pnpm store
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: pnpm-store-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
pnpm-store-${{ runner.os }}-
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
|
- name: Run check:lint
|
||||||
|
run: pnpm turbo run check:lint --affected
|
||||||
|
|
||||||
|
# Type check depends on build artifacts
|
||||||
|
check-types:
|
||||||
|
name: check:types
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: build
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
task: [check:lint, check:types]
|
|
||||||
env:
|
env:
|
||||||
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
|
TURBO_SCM_BASE: ${{ github.event.pull_request.base.sha }}
|
||||||
TURBO_SCM_HEAD: ${{ github.sha }}
|
TURBO_SCM_HEAD: ${{ github.sha }}
|
||||||
|
|
@ -165,5 +203,5 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --frozen-lockfile
|
run: pnpm install --frozen-lockfile
|
||||||
|
|
||||||
- name: Run ${{ matrix.task }}
|
- name: Run check:types
|
||||||
run: pnpm turbo run ${{ matrix.task }} --affected
|
run: pnpm turbo run check:types --affected
|
||||||
|
|
|
||||||
49
.oxlintrc.json
Normal file
49
.oxlintrc.json
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
||||||
|
"plugins": ["react", "typescript", "jsx-a11y", "import", "promise", "unicorn", "oxc"],
|
||||||
|
"categories": {
|
||||||
|
"correctness": "warn",
|
||||||
|
"suspicious": "warn",
|
||||||
|
"perf": "warn"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"node": true,
|
||||||
|
"es2024": true
|
||||||
|
},
|
||||||
|
"settings": {
|
||||||
|
"react": {
|
||||||
|
"version": "18.3"
|
||||||
|
},
|
||||||
|
"jsx-a11y": {
|
||||||
|
"polymorphicPropName": "as"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ignorePatterns": [
|
||||||
|
".cache/**",
|
||||||
|
".next/**",
|
||||||
|
".react-router/**",
|
||||||
|
".storybook/**",
|
||||||
|
".turbo/**",
|
||||||
|
".vite/**",
|
||||||
|
"*.config.{js,mjs,cjs,ts}",
|
||||||
|
"build/**",
|
||||||
|
"coverage/**",
|
||||||
|
"dist/**",
|
||||||
|
"**/public/**",
|
||||||
|
"storybook-static/**"
|
||||||
|
],
|
||||||
|
"rules": {
|
||||||
|
"react/prop-types": "off",
|
||||||
|
"unicorn/filename-case": "off",
|
||||||
|
"unicorn/no-null": "off",
|
||||||
|
"unicorn/prevent-abbreviations": "off",
|
||||||
|
"no-unused-vars": ["warn", {
|
||||||
|
"argsIgnorePattern": "^_",
|
||||||
|
"varsIgnorePattern": "^_",
|
||||||
|
"caughtErrorsIgnorePattern": "^_",
|
||||||
|
"destructuredArrayIgnorePattern": "^_",
|
||||||
|
"ignoreRestSiblings": true
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
- `pnpm dev` - Start all dev servers (web:3000, admin:3001)
|
- `pnpm dev` - Start all dev servers (web:3000, admin:3001)
|
||||||
- `pnpm build` - Build all packages and apps
|
- `pnpm build` - Build all packages and apps
|
||||||
- `pnpm check` - Run all checks (format, lint, types)
|
- `pnpm check` - Run all checks (format, lint, types)
|
||||||
- `pnpm check:lint` - ESLint across all packages
|
- `pnpm check:lint` - OxLint across all packages
|
||||||
- `pnpm check:types` - TypeScript type checking
|
- `pnpm check:types` - TypeScript type checking
|
||||||
- `pnpm fix` - Auto-fix format and lint issues
|
- `pnpm fix` - Auto-fix format and lint issues
|
||||||
- `pnpm turbo run <command> --filter=<package>` - Target specific package/app
|
- `pnpm turbo run <command> --filter=<package>` - Target specific package/app
|
||||||
|
|
@ -15,8 +15,8 @@
|
||||||
|
|
||||||
- **Imports**: Use `workspace:*` for internal packages, `catalog:` for external deps
|
- **Imports**: Use `workspace:*` for internal packages, `catalog:` for external deps
|
||||||
- **TypeScript**: Strict mode enabled, all files must be typed
|
- **TypeScript**: Strict mode enabled, all files must be typed
|
||||||
- **Formatting**: Prettier with Tailwind plugin, run `pnpm fix:format`
|
- **Formatting**: oxfmt, run `pnpm fix:format`
|
||||||
- **Linting**: ESLint with shared config, max warnings vary by package
|
- **Linting**: OxLint with shared `.oxlintrc.json` config
|
||||||
- **Naming**: camelCase for variables/functions, PascalCase for components/types
|
- **Naming**: camelCase for variables/functions, PascalCase for components/types
|
||||||
- **Error Handling**: Use try-catch with proper error types, log errors appropriately
|
- **Error Handling**: Use try-catch with proper error types, log errors appropriately
|
||||||
- **State Management**: MobX stores in `packages/shared-state`, reactive patterns
|
- **State Management**: MobX stores in `packages/shared-state`, reactive patterns
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ If you would like to _implement_ it, an issue with your proposal must be submitt
|
||||||
To ensure consistency throughout the source code, please keep these rules in mind as you are working:
|
To ensure consistency throughout the source code, please keep these rules in mind as you are working:
|
||||||
|
|
||||||
- All features or bug fixes must be tested by one or more specs (unit-tests).
|
- All features or bug fixes must be tested by one or more specs (unit-tests).
|
||||||
- We lint with [ESLint 9](https://eslint.org/docs/latest/) using the shared `eslint.config.mjs` (type-aware via `typescript-eslint`) and format with [Prettier](https://prettier.io/) using `prettier.config.cjs`.
|
- We lint with [OxLint](https://oxc.rs/docs/guide/usage/linter) using the shared `.oxlintrc.json` and format with [oxfmt](https://oxc.rs/docs/guide/usage/formatter) using `.oxfmtrc.json`.
|
||||||
|
|
||||||
## Ways to contribute
|
## Ways to contribute
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,10 @@
|
||||||
"preview": "react-router build && serve -s build/client -l 3001",
|
"preview": "react-router build && serve -s build/client -l 3001",
|
||||||
"start": "serve -s build/client -l 3001",
|
"start": "serve -s build/client -l 3001",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist && rm -rf build",
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist && rm -rf build",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=485",
|
"check:lint": "oxlint --max-warnings=758 .",
|
||||||
"check:types": "react-router typegen && tsc --noEmit",
|
"check:types": "react-router typegen && tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=485",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt ."
|
"fix:format": "oxfmt ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@
|
||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"test:coverage": "vitest run --coverage",
|
"test:coverage": "vitest run --coverage",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=160",
|
"check:lint": "oxlint --max-warnings=119 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=160",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@
|
||||||
"preview": "react-router build && PORT=3002 react-router-serve ./build/server/index.js",
|
"preview": "react-router build && PORT=3002 react-router-serve ./build/server/index.js",
|
||||||
"start": "PORT=3002 react-router-serve ./build/server/index.js",
|
"start": "PORT=3002 react-router-serve ./build/server/index.js",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build",
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=932",
|
"check:lint": "oxlint --max-warnings=675 .",
|
||||||
"check:types": "react-router typegen && tsc --noEmit",
|
"check:types": "react-router typegen && tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=932",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt ."
|
"fix:format": "oxfmt ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,10 @@
|
||||||
"preview": "react-router build && serve -s build/client -l 3000",
|
"preview": "react-router build && serve -s build/client -l 3000",
|
||||||
"start": "serve -s build/client -l 3000",
|
"start": "serve -s build/client -l 3000",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build",
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf .react-router && rm -rf node_modules && rm -rf dist && rm -rf build",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=14367",
|
"check:lint": "oxlint --max-warnings=11957 .",
|
||||||
"check:types": "react-router typegen && tsc --noEmit",
|
"check:types": "react-router typegen && tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=14367",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt ."
|
"fix:format": "oxfmt ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
103
docs/eslint.md
103
docs/eslint.md
|
|
@ -1,103 +0,0 @@
|
||||||
# ESLint in Plane - How It Works
|
|
||||||
|
|
||||||
We've recently upgraded our ESLint setup to use **typed linting** with a **single root-level configuration**. This means faster lint runs and simpler config management across the entire monorepo.
|
|
||||||
|
|
||||||
## Key Changes
|
|
||||||
|
|
||||||
1. **Single Root Config** - Instead of individual `eslint.config.mjs` files in every package, we now have one config at the repo root that handles all packages and apps
|
|
||||||
2. **Typed Linting Enabled** - ESLint now uses TypeScript's type information for more powerful checks (catching things like floating promises, unsafe any usage, etc.)
|
|
||||||
3. **ESLint Flat Config** - We're using ESLint v9's new flat config format
|
|
||||||
|
|
||||||
## How to Run ESLint
|
|
||||||
|
|
||||||
From the root of the repo:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# Check for lint errors
|
|
||||||
pnpm check:lint
|
|
||||||
|
|
||||||
# Auto-fix lint errors
|
|
||||||
pnpm fix:lint
|
|
||||||
```
|
|
||||||
|
|
||||||
## VS Code Integration
|
|
||||||
|
|
||||||
ESLint should work automatically in VS Code. The extension will:
|
|
||||||
|
|
||||||
- Show inline errors/warnings as you type
|
|
||||||
- Use the root `eslint.config.mjs` for all files in the monorepo
|
|
||||||
|
|
||||||
**Tip:** Make sure you have the [ESLint extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) installed.
|
|
||||||
|
|
||||||
## What Gets Linted
|
|
||||||
|
|
||||||
The config applies to all TypeScript and JavaScript files across:
|
|
||||||
|
|
||||||
- `apps/web`, `apps/admin`, `apps/space`, `apps/live`
|
|
||||||
- All packages in `packages/`
|
|
||||||
|
|
||||||
**Ignored paths:**
|
|
||||||
|
|
||||||
- `node_modules/`, `dist/`, `build/`, `.next/`, `.turbo/`
|
|
||||||
- Config files (`*.config.{js,mjs,cjs,ts}`)
|
|
||||||
- Public folders
|
|
||||||
|
|
||||||
## Rules Overview
|
|
||||||
|
|
||||||
We're enforcing warnings (not errors) for most rules during the transition period. Key categories:
|
|
||||||
|
|
||||||
| Category | What It Catches |
|
|
||||||
| ----------------- | -------------------------------------------------------------------------------- |
|
|
||||||
| **TypeScript** | `no-explicit-any`, `no-floating-promises`, `no-unsafe-*` family, unused vars |
|
|
||||||
| **React** | Display names, hooks rules (including new React Compiler rules), refresh exports |
|
|
||||||
| **Accessibility** | Alt text, keyboard events, ARIA roles, focus management |
|
|
||||||
| **Imports** | Type imports style (`prefer-top-level`), unresolved imports |
|
|
||||||
| **Promises** | Always return, catch-or-return |
|
|
||||||
|
|
||||||
## Adding New Packages
|
|
||||||
|
|
||||||
When creating a new package, **you don't need to add an ESLint config**. Just ensure:
|
|
||||||
|
|
||||||
1. The package has a `tsconfig.json`
|
|
||||||
2. The `tsconfig.json` is discoverable via the pattern `{apps,packages}/*/tsconfig.json`
|
|
||||||
|
|
||||||
The root config will automatically pick it up.
|
|
||||||
|
|
||||||
## Suppressing Warnings
|
|
||||||
|
|
||||||
If you need to suppress a specific warning:
|
|
||||||
|
|
||||||
```typescript
|
|
||||||
// Single line
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
||||||
const data: any = response;
|
|
||||||
|
|
||||||
// Block
|
|
||||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
|
||||||
// ... code
|
|
||||||
/* eslint-enable @typescript-eslint/no-unsafe-assignment */
|
|
||||||
```
|
|
||||||
|
|
||||||
**Please use sparingly** - most warnings indicate real issues that should be fixed.
|
|
||||||
|
|
||||||
## Pre-commit Hook
|
|
||||||
|
|
||||||
Lint-staged runs automatically on commit via Husky:
|
|
||||||
|
|
||||||
- Prettier formats your staged files
|
|
||||||
- ESLint fixes what it can (with `--max-warnings=0`)
|
|
||||||
|
|
||||||
If the commit fails due to lint errors, fix them before committing.
|
|
||||||
|
|
||||||
## Reference Files
|
|
||||||
|
|
||||||
- [eslint.config.mjs](../eslint.config.mjs) - Full ESLint configuration
|
|
||||||
- [package.json](../package.json) - Available scripts
|
|
||||||
|
|
||||||
## Help Us Improve!
|
|
||||||
|
|
||||||
If you have the time, please consider trying to put up PRs to turn the rules I've set to `warn` to `error`, or getting all of strict mode in TypeScript working for a package (e.g., `noUncheckedIndexAccess`, `strictNullChecks`). It'll help prevent bugs at Plane, and your co-workers will unknowingly thank you for it.
|
|
||||||
|
|
||||||
If you do decide to tackle this, please feel free to reach out to [@lifeiscontent](https://github.com/lifeiscontent) for advice on issues you get stuck on.
|
|
||||||
|
|
||||||
Thanks!
|
|
||||||
92
docs/linting.md
Normal file
92
docs/linting.md
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
# Linting in Plane - How It Works
|
||||||
|
|
||||||
|
We use [OxLint](https://oxc.rs/docs/guide/usage/linter) for linting across the entire monorepo. OxLint is a single Rust binary that's 50-100x faster than ESLint, with zero Node.js dependencies at runtime.
|
||||||
|
|
||||||
|
## Key Points
|
||||||
|
|
||||||
|
1. **Single Root Config** - One `.oxlintrc.json` at the repo root handles all packages and apps
|
||||||
|
2. **No Build Required** - OxLint doesn't need TypeScript build artifacts, so lint runs independently of build
|
||||||
|
3. **Plugin Coverage** - react, typescript, jsx-a11y, import, promise, unicorn, oxc
|
||||||
|
|
||||||
|
## How to Run
|
||||||
|
|
||||||
|
From the root of the repo:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Check for lint errors
|
||||||
|
pnpm check:lint
|
||||||
|
|
||||||
|
# Auto-fix lint errors
|
||||||
|
pnpm fix:lint
|
||||||
|
```
|
||||||
|
|
||||||
|
To lint a specific package:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pnpm turbo run check:lint --filter=@plane/ui
|
||||||
|
```
|
||||||
|
|
||||||
|
## VS Code Integration
|
||||||
|
|
||||||
|
Install the [OxLint extension](https://marketplace.visualstudio.com/items?itemName=nicolo-ribaudo.vscode-oxlint) for inline errors/warnings as you type.
|
||||||
|
|
||||||
|
## What Gets Linted
|
||||||
|
|
||||||
|
The config applies to all TypeScript and JavaScript files across:
|
||||||
|
|
||||||
|
- `apps/web`, `apps/admin`, `apps/space`, `apps/live`
|
||||||
|
- All packages in `packages/`
|
||||||
|
|
||||||
|
**Ignored paths:**
|
||||||
|
|
||||||
|
- `node_modules/`, `dist/`, `build/`, `.next/`, `.turbo/`
|
||||||
|
- Config files (`*.config.{js,mjs,cjs,ts}`)
|
||||||
|
- Public folders, coverage, storybook-static
|
||||||
|
|
||||||
|
## Rules Overview
|
||||||
|
|
||||||
|
OxLint uses category-based configuration:
|
||||||
|
|
||||||
|
| Category | Level | What It Catches |
|
||||||
|
| --------------- | ----- | -------------------------------------------------- |
|
||||||
|
| **correctness** | error | Real bugs that will cause runtime errors |
|
||||||
|
| **suspicious** | warn | Code patterns that are likely mistakes |
|
||||||
|
| **perf** | warn | Performance anti-patterns |
|
||||||
|
|
||||||
|
Additional rule overrides:
|
||||||
|
- `react/prop-types` off (TypeScript handles prop validation)
|
||||||
|
- `no-unused-vars` warns with `_` prefix pattern ignored
|
||||||
|
- Several noisy unicorn rules disabled
|
||||||
|
|
||||||
|
## Backward Compatibility
|
||||||
|
|
||||||
|
OxLint supports `eslint-disable` comments, so existing inline suppressions continue to work.
|
||||||
|
|
||||||
|
## Suppressing Warnings
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Single line
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const data = response;
|
||||||
|
|
||||||
|
// Block
|
||||||
|
/* eslint-disable no-unused-vars */
|
||||||
|
// ... code
|
||||||
|
/* eslint-enable no-unused-vars */
|
||||||
|
```
|
||||||
|
|
||||||
|
**Please use sparingly** - most warnings indicate real issues that should be fixed.
|
||||||
|
|
||||||
|
## Pre-commit Hook
|
||||||
|
|
||||||
|
Lint-staged runs automatically on commit via Husky:
|
||||||
|
|
||||||
|
- oxfmt formats your staged files
|
||||||
|
- OxLint fixes what it can (with `--deny-warnings`)
|
||||||
|
|
||||||
|
If the commit fails due to lint errors, fix them before committing.
|
||||||
|
|
||||||
|
## Reference Files
|
||||||
|
|
||||||
|
- [.oxlintrc.json](../.oxlintrc.json) - OxLint configuration
|
||||||
|
- [package.json](../package.json) - Available scripts
|
||||||
|
|
@ -1,183 +0,0 @@
|
||||||
// @ts-check
|
|
||||||
import { defineConfig, globalIgnores } from "eslint/config";
|
|
||||||
|
|
||||||
import eslint from "@eslint/js";
|
|
||||||
import tseslint from "typescript-eslint";
|
|
||||||
|
|
||||||
import importPlugin from "eslint-plugin-import";
|
|
||||||
import jsxA11yPlugin from "eslint-plugin-jsx-a11y";
|
|
||||||
import promisePlugin from "eslint-plugin-promise";
|
|
||||||
import reactPlugin from "eslint-plugin-react";
|
|
||||||
import reactHooksPlugin from "eslint-plugin-react-hooks";
|
|
||||||
import reactRefreshPlugin from "eslint-plugin-react-refresh";
|
|
||||||
import turboPlugin from "eslint-plugin-turbo";
|
|
||||||
import vitestPlugin from "@vitest/eslint-plugin";
|
|
||||||
// import storybookPlugin from "eslint-plugin-storybook";
|
|
||||||
|
|
||||||
import prettierConfig from "eslint-config-prettier/flat";
|
|
||||||
import globals from "globals";
|
|
||||||
|
|
||||||
export default defineConfig([
|
|
||||||
globalIgnores([
|
|
||||||
"**/.cache/**",
|
|
||||||
"**/.env.*",
|
|
||||||
"**/.env",
|
|
||||||
"**/.next/**",
|
|
||||||
"**/.react-router/**",
|
|
||||||
"**/.storybook/**",
|
|
||||||
"**/.turbo/**",
|
|
||||||
"**/.vite/**",
|
|
||||||
"**/*.config.{js,mjs,cjs,ts}",
|
|
||||||
"**/build/**",
|
|
||||||
"**/coverage/**",
|
|
||||||
"**/dist/**",
|
|
||||||
"**/node_modules/**",
|
|
||||||
"**/public/**",
|
|
||||||
]),
|
|
||||||
eslint.configs.recommended,
|
|
||||||
// @ts-expect-error promise plugin has no flat type definitions
|
|
||||||
promisePlugin.configs["flat/recommended"],
|
|
||||||
reactPlugin.configs.flat.recommended,
|
|
||||||
reactPlugin.configs.flat["jsx-runtime"],
|
|
||||||
reactHooksPlugin.configs.flat.recommended,
|
|
||||||
jsxA11yPlugin.flatConfigs.recommended,
|
|
||||||
reactRefreshPlugin.configs.recommended,
|
|
||||||
reactRefreshPlugin.configs.vite,
|
|
||||||
turboPlugin.configs["flat/recommended"],
|
|
||||||
tseslint.configs.recommendedTypeChecked,
|
|
||||||
vitestPlugin.configs.recommended,
|
|
||||||
// TODO: enable storybook linting once issues are resolved
|
|
||||||
// storybookPlugin.configs["flat/recommended"],
|
|
||||||
{
|
|
||||||
settings: {
|
|
||||||
react: {
|
|
||||||
version: "detect",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
languageOptions: {
|
|
||||||
parserOptions: {
|
|
||||||
ecmaFeatures: {
|
|
||||||
jsx: true,
|
|
||||||
},
|
|
||||||
// @ts-ignore
|
|
||||||
tsconfigRootDir: import.meta.dirname,
|
|
||||||
projectService: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"@typescript-eslint/await-thenable": "warn",
|
|
||||||
"@typescript-eslint/no-base-to-string": "warn",
|
|
||||||
"@typescript-eslint/no-duplicate-type-constituents": "warn",
|
|
||||||
"@typescript-eslint/no-explicit-any": "warn",
|
|
||||||
"@typescript-eslint/no-floating-promises": "warn",
|
|
||||||
"@typescript-eslint/no-for-in-array": "warn",
|
|
||||||
"@typescript-eslint/no-import-type-side-effects": "error",
|
|
||||||
"@typescript-eslint/no-misused-promises": "warn",
|
|
||||||
"@typescript-eslint/no-redundant-type-constituents": "warn",
|
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-argument": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-assignment": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-call": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-enum-comparison": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-member-access": "warn",
|
|
||||||
"@typescript-eslint/no-unsafe-return": "warn",
|
|
||||||
"@typescript-eslint/no-unused-expressions": "warn",
|
|
||||||
"@typescript-eslint/no-unused-vars": [
|
|
||||||
"warn",
|
|
||||||
{
|
|
||||||
args: "all",
|
|
||||||
argsIgnorePattern: "^_",
|
|
||||||
caughtErrors: "all",
|
|
||||||
caughtErrorsIgnorePattern: "^_",
|
|
||||||
destructuredArrayIgnorePattern: "^_",
|
|
||||||
varsIgnorePattern: "^_",
|
|
||||||
ignoreRestSiblings: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
"@typescript-eslint/only-throw-error": "warn",
|
|
||||||
"@typescript-eslint/prefer-promise-reject-errors": "warn",
|
|
||||||
"@typescript-eslint/require-await": "warn",
|
|
||||||
"@typescript-eslint/restrict-plus-operands": "warn",
|
|
||||||
"@typescript-eslint/restrict-template-expressions": "warn",
|
|
||||||
"@typescript-eslint/unbound-method": "warn",
|
|
||||||
"jsdoc/require-jsdoc": "off",
|
|
||||||
"jsx-a11y/alt-text": "warn",
|
|
||||||
"jsx-a11y/anchor-is-valid": "warn",
|
|
||||||
"jsx-a11y/click-events-have-key-events": "warn",
|
|
||||||
"jsx-a11y/iframe-has-title": "warn",
|
|
||||||
"jsx-a11y/img-redundant-alt": "warn",
|
|
||||||
"jsx-a11y/interactive-supports-focus": "warn",
|
|
||||||
"jsx-a11y/label-has-associated-control": "warn",
|
|
||||||
"jsx-a11y/mouse-events-have-key-events": "warn",
|
|
||||||
"jsx-a11y/no-autofocus": "warn",
|
|
||||||
"jsx-a11y/no-noninteractive-element-interactions": "warn",
|
|
||||||
"jsx-a11y/no-noninteractive-element-to-interactive-role": "warn",
|
|
||||||
"jsx-a11y/no-noninteractive-tabindex": "warn",
|
|
||||||
"jsx-a11y/no-redundant-roles": "warn",
|
|
||||||
"jsx-a11y/no-static-element-interactions": "warn",
|
|
||||||
"jsx-a11y/tabindex-no-positive": "warn",
|
|
||||||
"no-cond-assign": "warn",
|
|
||||||
"no-constant-binary-expression": "warn",
|
|
||||||
"no-empty-pattern": "warn",
|
|
||||||
"no-empty": "warn",
|
|
||||||
"no-extra-boolean-cast": "warn",
|
|
||||||
"no-prototype-builtins": "warn",
|
|
||||||
"no-unsafe-optional-chaining": "warn",
|
|
||||||
"no-useless-catch": "warn",
|
|
||||||
"no-useless-escape": "warn",
|
|
||||||
"promise/always-return": "warn",
|
|
||||||
"promise/catch-or-return": "warn",
|
|
||||||
"promise/param-names": "warn",
|
|
||||||
"react-hooks/immutability": "warn",
|
|
||||||
"react-hooks/preserve-manual-memoization": "warn",
|
|
||||||
"react-hooks/purity": "warn",
|
|
||||||
"react-hooks/refs": "warn",
|
|
||||||
"react-hooks/rules-of-hooks": "warn",
|
|
||||||
"react-hooks/set-state-in-effect": "warn",
|
|
||||||
"react-hooks/static-components": "warn",
|
|
||||||
"react-refresh/only-export-components": [
|
|
||||||
"warn",
|
|
||||||
{ allowExportNames: ["meta", "links", "headers", "loader", "action"] },
|
|
||||||
],
|
|
||||||
"react/display-name": "warn",
|
|
||||||
"react/jsx-no-target-blank": "warn",
|
|
||||||
"react/no-unknown-property": "warn",
|
|
||||||
"react/prop-types": "off",
|
|
||||||
"valid-typeof": "warn",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: ["**/*.{ts,tsx}"],
|
|
||||||
extends: [importPlugin.flatConfigs.recommended, importPlugin.flatConfigs.typescript],
|
|
||||||
settings: {
|
|
||||||
"import/ignore": ["next/link", "next/navigation", "next/script"],
|
|
||||||
"import/resolver": {
|
|
||||||
typescript: {
|
|
||||||
alwaysTryTypes: true,
|
|
||||||
project: "{apps,packages}/*/tsconfig.json",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
"import/internal-regex": "^@plane/",
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"import/consistent-type-specifier-style": ["error", "prefer-top-level"],
|
|
||||||
"import/no-unresolved": ["error", { ignore: ["next/link", "next/navigation", "next/script"] }],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: ["**/*.{js,mjs,cjs,jsx}"],
|
|
||||||
extends: [tseslint.configs.disableTypeChecked],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
files: ["**/*.cjs"],
|
|
||||||
languageOptions: {
|
|
||||||
globals: {
|
|
||||||
...globals.node,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
"@typescript-eslint/no-require-imports": "off",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
prettierConfig,
|
|
||||||
]);
|
|
||||||
24
package.json
24
package.json
|
|
@ -20,34 +20,18 @@
|
||||||
"prepare": "husky"
|
"prepare": "husky"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "9.39.1",
|
|
||||||
"oxfmt": "0.35.0",
|
|
||||||
"@vitest/eslint-plugin": "1.5.1",
|
|
||||||
"eslint": "9.39.1",
|
|
||||||
"eslint-config-prettier": "10.1.8",
|
|
||||||
"eslint-import-resolver-node": "0.3.9",
|
|
||||||
"eslint-import-resolver-typescript": "4.4.4",
|
|
||||||
"eslint-plugin-import": "2.32.0",
|
|
||||||
"eslint-plugin-jsx-a11y": "6.10.2",
|
|
||||||
"eslint-plugin-n": "17.23.1",
|
|
||||||
"eslint-plugin-promise": "7.2.1",
|
|
||||||
"eslint-plugin-react": "7.37.5",
|
|
||||||
"eslint-plugin-react-hooks": "7.0.1",
|
|
||||||
"eslint-plugin-react-refresh": "0.4.24",
|
|
||||||
"eslint-plugin-storybook": "10.1.4",
|
|
||||||
"eslint-plugin-turbo": "2.6.3",
|
|
||||||
"globals": "16.5.0",
|
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"lint-staged": "16.2.7",
|
"lint-staged": "16.2.7",
|
||||||
"turbo": "2.6.3",
|
"oxfmt": "0.35.0",
|
||||||
"typescript-eslint": "8.48.1"
|
"oxlint": "1.51.0",
|
||||||
|
"turbo": "2.6.3"
|
||||||
},
|
},
|
||||||
"lint-staged": {
|
"lint-staged": {
|
||||||
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts,json,css,md}": [
|
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts,json,css,md}": [
|
||||||
"pnpm exec oxfmt --no-error-on-unmatched-pattern"
|
"pnpm exec oxfmt --no-error-on-unmatched-pattern"
|
||||||
],
|
],
|
||||||
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts}": [
|
"*.{js,jsx,ts,tsx,cjs,mjs,cts,mts}": [
|
||||||
"pnpm exec eslint --fix --max-warnings=0 --no-warn-ignored"
|
"pnpm exec oxlint --fix --deny-warnings"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=30",
|
"check:lint": "oxlint --max-warnings=2 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=30",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=29",
|
"check:lint": "oxlint --max-warnings=3 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=29",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc && tsdown",
|
"build": "tsc && tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=1435",
|
"check:lint": "oxlint --max-warnings=416 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=1435",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
.next/
|
|
||||||
.react-router/
|
|
||||||
.turbo/
|
|
||||||
.vite/
|
|
||||||
build/
|
|
||||||
dist/
|
|
||||||
node_modules/
|
|
||||||
out/
|
|
||||||
pnpm-lock.yaml
|
|
||||||
storybook-static/
|
|
||||||
|
|
@ -18,10 +18,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=60",
|
"check:lint": "oxlint --max-warnings=4 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=60",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
import { useState, useEffect, useCallback } from "react";
|
import { useState, useEffect, useCallback } from "react";
|
||||||
|
|
||||||
export const getValueFromLocalStorage = (key: string, defaultValue: any) => {
|
export const getValueFromLocalStorage = (key: string, defaultValue: any) => {
|
||||||
if (typeof window === undefined || typeof window === "undefined") return defaultValue;
|
if (typeof window === "undefined" || typeof window === "undefined") return defaultValue;
|
||||||
try {
|
try {
|
||||||
const item = window.localStorage.getItem(key);
|
const item = window.localStorage.getItem(key);
|
||||||
return item ? JSON.parse(item) : defaultValue;
|
return item ? JSON.parse(item) : defaultValue;
|
||||||
|
|
@ -18,7 +18,7 @@ export const getValueFromLocalStorage = (key: string, defaultValue: any) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const setValueIntoLocalStorage = (key: string, value: any) => {
|
export const setValueIntoLocalStorage = (key: string, value: any) => {
|
||||||
if (typeof window === undefined || typeof window === "undefined") return false;
|
if (typeof window === "undefined" || typeof window === "undefined") return false;
|
||||||
try {
|
try {
|
||||||
window.localStorage.setItem(key, JSON.stringify(value));
|
window.localStorage.setItem(key, JSON.stringify(value));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=51",
|
"check:lint": "oxlint --max-warnings=2 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=51",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=0",
|
"check:lint": "oxlint --max-warnings=0 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=0",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -52,10 +52,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=1306",
|
"check:lint": "oxlint --max-warnings=3605 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=1306",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist",
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist",
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
|
|
|
||||||
|
|
@ -17,10 +17,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=1131",
|
"check:lint": "oxlint --max-warnings=6 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=1131",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,6 @@ export class ModuleLinkService extends APIService {
|
||||||
* Creates an instance of ModuleLinkService.
|
* Creates an instance of ModuleLinkService.
|
||||||
* @param {string} baseURL - The base URL for the API endpoints
|
* @param {string} baseURL - The base URL for the API endpoints
|
||||||
*/
|
*/
|
||||||
constructor(baseURL: string) {
|
|
||||||
super(baseURL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new module link.
|
* Creates a new module link.
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,6 @@ import type { IModule, ILinkDetails, ModuleLink, TIssuesResponse } from "@plane/
|
||||||
import { APIService } from "../api.service";
|
import { APIService } from "../api.service";
|
||||||
|
|
||||||
export class ModuleService extends APIService {
|
export class ModuleService extends APIService {
|
||||||
constructor(baseURL: string) {
|
|
||||||
super(baseURL);
|
|
||||||
}
|
|
||||||
|
|
||||||
async workspaceModulesList(workspaceSlug: string): Promise<IModule[]> {
|
async workspaceModulesList(workspaceSlug: string): Promise<IModule[]> {
|
||||||
return this.get(`/api/workspaces/${workspaceSlug}/modules/`)
|
return this.get(`/api/workspaces/${workspaceSlug}/modules/`)
|
||||||
.then((response) => response?.data)
|
.then((response) => response?.data)
|
||||||
|
|
|
||||||
|
|
@ -10,10 +10,6 @@
|
||||||
import { APIService } from "../api.service";
|
import { APIService } from "../api.service";
|
||||||
|
|
||||||
export class ModuleOperationService extends APIService {
|
export class ModuleOperationService extends APIService {
|
||||||
constructor(baseURL: string) {
|
|
||||||
super(baseURL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add issues to a module
|
* Add issues to a module
|
||||||
* @param {string} workspaceSlug - The slug of the workspace
|
* @param {string} workspaceSlug - The slug of the workspace
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=191",
|
"check:lint": "oxlint --max-warnings=0 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=191",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=151",
|
"check:lint": "oxlint --max-warnings=1 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=151",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -22,10 +22,10 @@
|
||||||
"storybook": "storybook dev -p 6006",
|
"storybook": "storybook dev -p 6006",
|
||||||
"build-storybook": "storybook build",
|
"build-storybook": "storybook build",
|
||||||
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
|
"postcss": "postcss styles/globals.css -o styles/output.css --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=643",
|
"check:lint": "oxlint --max-warnings=66 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=643",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf .next && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsdown",
|
"build": "tsdown",
|
||||||
"dev": "tsdown --watch",
|
"dev": "tsdown --watch",
|
||||||
"check:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --max-warnings=1062",
|
"check:lint": "oxlint --max-warnings=38 .",
|
||||||
"check:types": "tsc --noEmit",
|
"check:types": "tsc --noEmit",
|
||||||
"check:format": "oxfmt --check .",
|
"check:format": "oxfmt --check .",
|
||||||
"fix:lint": "eslint . --cache --cache-location node_modules/.cache/eslint/ --fix --max-warnings=1062",
|
"fix:lint": "oxlint --fix .",
|
||||||
"fix:format": "oxfmt .",
|
"fix:format": "oxfmt .",
|
||||||
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
2293
pnpm-lock.yaml
generated
2293
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"$schema": "https://turborepo.com/schema.json",
|
"$schema": "https://turborepo.com/schema.json",
|
||||||
"globalDependencies": [".npmrc", ".oxfmtrc.json", "eslint.config.mjs"],
|
"globalDependencies": [".npmrc", ".oxfmtrc.json", ".oxlintrc.json"],
|
||||||
"globalEnv": [
|
"globalEnv": [
|
||||||
"APP_VERSION",
|
"APP_VERSION",
|
||||||
"DEV",
|
"DEV",
|
||||||
|
|
@ -53,9 +53,8 @@
|
||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
"check:lint": {
|
"check:lint": {
|
||||||
"dependsOn": ["^build"],
|
|
||||||
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"],
|
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"],
|
||||||
"outputs": ["node_modules/.cache/eslint/**"]
|
"outputs": []
|
||||||
},
|
},
|
||||||
"check:types": {
|
"check:types": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
|
|
@ -79,9 +78,8 @@
|
||||||
"outputs": []
|
"outputs": []
|
||||||
},
|
},
|
||||||
"fix:lint": {
|
"fix:lint": {
|
||||||
"dependsOn": ["^build"],
|
|
||||||
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"],
|
"inputs": ["$TURBO_DEFAULT$", "!**/*.md"],
|
||||||
"outputs": ["node_modules/.cache/eslint/**"]
|
"outputs": []
|
||||||
},
|
},
|
||||||
"start": {
|
"start": {
|
||||||
"cache": false,
|
"cache": false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue