Skip to content

Commit 8369fef

Browse files
committed
feat: eslint
1 parent 73c317f commit 8369fef

File tree

130 files changed

+1613
-1623
lines changed

Some content is hidden

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

130 files changed

+1613
-1623
lines changed

.github/workflows/pull-request-build-lint-web-apps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
- name: Install dependencies
4444
run: pnpm install --frozen-lockfile
4545

46+
- name: Build Affected
47+
run: pnpm turbo run build --affected
48+
4649
- name: Lint Affected
4750
run: pnpm turbo run check:lint --affected
4851

@@ -51,6 +54,3 @@ jobs:
5154

5255
- name: Check Affected types
5356
run: pnpm turbo run check:types --affected
54-
55-
- name: Build Affected
56-
run: pnpm turbo run build --affected

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pnpm lint-staged

.npmrc

Lines changed: 50 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,59 @@
1-
# Enforce pnpm workspace behavior and allow Turbo's lifecycle hooks if scripts are disabled
2-
# This repo uses pnpm with workspaces.
1+
# ------------------------------
2+
# Core Workspace Behavior
3+
# ------------------------------
34

4-
# Prefer linking local workspace packages when available
5-
prefer-workspace-packages=true
6-
link-workspace-packages=true
7-
shared-workspace-lockfile=true
5+
# Always prefer using local workspace packages when available
6+
prefer-workspace-packages = true
87

9-
# Make peer installs smoother across the monorepo
10-
auto-install-peers=true
11-
strict-peer-dependencies=false
8+
# Symlink workspace packages instead of duplicating them
9+
link-workspace-packages = true
1210

13-
# If scripts are disabled (e.g., CI with --ignore-scripts), allowlisted packages can still run their hooks
14-
# Turbo occasionally performs postinstall tasks for optimal performance
15-
# moved to pnpm-workspace.yaml: onlyBuiltDependencies (e.g., allow turbo)
11+
# Use a single lockfile across the whole monorepo
12+
shared-workspace-lockfile = true
1613

17-
public-hoist-pattern[]=*eslint*
18-
public-hoist-pattern[]=prettier
19-
public-hoist-pattern[]=typescript
14+
# Ensure packages added from workspace save using workspace: protocol
15+
save-workspace-protocol = true
2016

21-
# Reproducible installs across CI and dev
22-
prefer-frozen-lockfile=true
2317

24-
# Prefer resolving to highest versions in monorepo to reduce duplication
25-
resolution-mode=highest
18+
# ------------------------------
19+
# Dependency Resolution
20+
# ------------------------------
2621

27-
# Speed up native module builds by caching side effects
28-
side-effects-cache=true
22+
# Choose the highest compatible version across the workspace
23+
# → reduces fragmentation & node_modules bloat
24+
resolution-mode = highest
2925

30-
# Speed up local dev by reusing local store when possible
31-
prefer-offline=true
26+
# Automatically install peer dependencies instead of forcing every package to declare them
27+
auto-install-peers = true
3228

33-
# Ensure workspace protocol is used when adding internal deps
34-
save-workspace-protocol=true
29+
# Don't break the install if peers are missing
30+
strict-peer-dependencies = false
31+
32+
33+
# ------------------------------
34+
# Performance Optimizations
35+
# ------------------------------
36+
37+
# Use cached artifacts for native modules (sharp, esbuild, etc.)
38+
side-effects-cache = true
39+
40+
# Prefer local cached packages rather than hitting network
41+
prefer-offline = true
42+
43+
# In CI, refuse to modify lockfile (prevents drift)
44+
prefer-frozen-lockfile = true
45+
46+
# Use isolated linker (best compatibility with Node ecosystem tools)
47+
node-linker = isolated
48+
49+
50+
# ------------------------------
51+
# Hoisting Strategy
52+
# ------------------------------
53+
54+
# Hoist commonly used tools to the root to prevent duplicates and speed up resolution
55+
public-hoist-pattern[] = typescript
56+
public-hoist-pattern[] = eslint
57+
public-hoist-pattern[] = *@plane/*
58+
public-hoist-pattern[] = vite
59+
public-hoist-pattern[] = turbo

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
**/.next
2+
**/.react-router
3+
**/.turbo
4+
**/.vercel
5+
**/.vite
6+
**/build
7+
**/dist
8+
**/node_modules
9+
**/out
10+
**/public
11+
pnpm-lock.yaml

.prettierrc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
{
2+
"$schema": "https://json.schemastore.org/prettierrc",
3+
"overrides": [
4+
{
5+
"files": ["packages/codemods/**/*"],
6+
"options": {
7+
"printWidth": 80
8+
}
9+
}
10+
],
11+
"plugins": ["@prettier/plugin-oxc"],
212
"printWidth": 120,
313
"tabWidth": 2,
4-
"trailingComma": "es5",
5-
"plugins": ["@prettier/plugin-oxc"]
14+
"trailingComma": "es5"
615
}

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
eslint.config.mjs @lifeiscontent

CONTRIBUTING.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ If you would like to _implement_ it, an issue with your proposal must be submitt
9191
To ensure consistency throughout the source code, please keep these rules in mind as you are working:
9292

9393
- All features or bug fixes must be tested by one or more specs (unit-tests).
94-
- We use [Eslint default rule guide](https://eslint.org/docs/rules/), with minor changes. An automated formatter is available using prettier.
94+
- 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`.
9595

9696
## Ways to contribute
9797

@@ -187,18 +187,19 @@ Adding a new language involves several steps to ensure it integrates seamlessly
187187
Add the new language to the TLanguage type in the language definitions file:
188188

189189
```ts
190-
// packages/i18n/src/types/language.ts
191-
export type TLanguage = "en" | "fr" | "your-lang";
190+
// packages/i18n/src/types/language.ts
191+
export type TLanguage = "en" | "fr" | "your-lang";
192192
```
193193

194194
1. **Add language configuration**
195195
Include the new language in the list of supported languages:
196+
196197
```ts
197-
// packages/i18n/src/constants/language.ts
198-
export const SUPPORTED_LANGUAGES: ILanguageOption[] = [
199-
{ label: "English", value: "en" },
200-
{ label: "Your Language", value: "your-lang" }
201-
];
198+
// packages/i18n/src/constants/language.ts
199+
export const SUPPORTED_LANGUAGES: ILanguageOption[] = [
200+
{ label: "English", value: "en" },
201+
{ label: "Your Language", value: "your-lang" },
202+
];
202203
```
203204

204205
2. **Create translation files**
@@ -210,6 +211,7 @@ Adding a new language involves several steps to ensure it integrates seamlessly
210211

211212
3. **Update import logic**
212213
Modify the language import logic to include your new language:
214+
213215
```ts
214216
private importLanguageFile(language: TLanguage): Promise<any> {
215217
switch (language) {

apps/admin/.eslintignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

apps/admin/.eslintrc.cjs

Lines changed: 0 additions & 18 deletions
This file was deleted.

apps/admin/.prettierignore

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
.next
2-
.react-router
3-
.vite
4-
.vercel
5-
.tubro
6-
out/
7-
dist/
8-
build/
1+
**/.next
2+
**/.react-router
3+
**/.turbo
4+
**/.vercel
5+
**/.vite
6+
**/build
7+
**/dist
8+
**/node_modules
9+
**/out
10+
**/public
11+
pnpm-lock.yaml

0 commit comments

Comments
 (0)