Skip to content
Draft
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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ web_modules/
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

Expand Down
98 changes: 98 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"options": {
"typeAware": true,
// typeCheck reports project TypeScript diagnostics that are already covered by
// package `test`/`vitest --typecheck` and are noisy across Svelte/pkg-utils configs
"typeCheck": false,
"denyWarnings": true,
"reportUnusedDisableDirectives": "error"
},
"ignorePatterns": [
"**/dist",
"**/dist-svelte",
"**/storybook-static",
"**/legacy",
"**/next-env.d.ts",
"**/sanity.types.ts",
// Apps were not covered by the previous per-package eslint setup
"apps/**",
// Oxlint has limited Svelte support; Svelte files keep framework-native checking
"**/*.svelte"
],
"plugins": ["react", "unicorn", "typescript", "oxc", "import", "node"],
"jsPlugins": ["eslint-plugin-storybook"],
"categories": {
"correctness": "error",
"suspicious": "warn",
"perf": "error"
},
"rules": {
"typescript/ban-ts-comment": "error",
"typescript/prefer-ts-expect-error": "error",
"typescript/switch-exhaustiveness-check": "error",
"typescript/no-deprecated": "error",
"typescript/no-explicit-any": "off",
"typescript/no-empty-object-type": "off",
"typescript/no-unsafe-type-assertion": "off",
"typescript/no-unnecessary-type-assertion": "off",
"typescript/no-unnecessary-type-parameters": "off",
"typescript/no-redundant-type-constituents": "off",
"typescript/no-unnecessary-boolean-literal-compare": "off",
"typescript/no-unnecessary-template-expression": "off",
"typescript/no-unnecessary-type-arguments": "off",
// Type-checked rules that were not part of the previous eslint config
"typescript/no-base-to-string": "off",
"typescript/no-floating-promises": "off",
"typescript/await-thenable": "off",
"typescript/no-misused-spread": "off",
"typescript/restrict-template-expressions": "off",
"typescript/no-useless-default-assignment": "off",
"react-in-jsx-scope": "off",
"react/rules-of-hooks": "error",
"react/exhaustive-deps": "error",
"react/jsx-key": "error",
"react/react-compiler": "error",
"eslint/no-console": ["error", {"allow": ["warn", "error"]}],
"eslint/no-shadow": "off",
"import/no-unassigned-import": ["error", {"allow": ["**/*.css", "server-only"]}],
"consistent-return": "off",
"consistent-function-scoping": "off",
"eslint/no-underscore-dangle": "off",
// Requires polyfills for older browsers
"no-array-reverse": "off",
"no-array-sort": "off",
// Common in list rendering; not enforced by previous config
"react/no-array-index-key": "off",
// Perf suggestions that are often intentional
"oxc/no-map-spread": "off",
"oxc/no-accumulating-spread": "off"
},
"overrides": [
{
"files": ["**/*.stories.{js,jsx,mjs,cjs,ts,tsx}", "**/*.story.{js,jsx,mjs,cjs,ts,tsx}"],
"rules": {
"storybook/await-interactions": "error",
"storybook/context-in-play-function": "error",
"storybook/default-exports": "error",
"storybook/hierarchy-separator": "error",
"storybook/no-redundant-story-name": "error",
// Storybook 8 in this repo imports from @storybook/react
"storybook/no-renderer-packages": "off",
"storybook/prefer-pascal-case": "error",
"storybook/story-exports": "error",
"storybook/use-storybook-expect": "error",
"storybook/use-storybook-testing-library": "error"
}
},
{
"files": ["**/.storybook/main.{js,cjs,mjs,ts}"],
"rules": {
"storybook/no-uninstalled-addons": [
"error",
{"packageJsonLocation": "./packages/visual-editing/package.json"}
]
}
}
]
}
3 changes: 0 additions & 3 deletions apps/live-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,5 @@
"sonner": "^2.0.7",
"tailwindcss": "catalog:tailwind3",
"typescript": "catalog:"
},
"devDependencies": {
"eslint": "^8.57.1"
}
}
1 change: 0 additions & 1 deletion apps/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"@types/react-dom": "catalog:",
"@vercel/stega": "^1.1.0",
"@vercel/toolbar": "^0.2.6",
"eslint": "^8.57.1",
"next": "^16.2.11",
"next-sanity": "^13.1.7",
"postcss": "8.5.10",
Expand Down
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"dev:page-builder-demo": "turbo run build --filter=page-builder-demo^... --filter=apps-studio^... && turbo watch dev --filter=page-builder-demo... --filter=apps-studio...",
"format": "oxfmt . --no-error-on-unmatched-pattern",
"knip": "knip",
"lint": "turbo run lint",
"lint:fix": "pnpm lint -- --fix",
"lint": "oxlint",
"lint:fix": "oxlint --fix --fix-suggestions",
"preview": "turbo run preview",
"report:react-compiler-healthcheck": "turbo run react-compiler-healthcheck",
"storybook:visual-editing": "turbo run build --filter='@sanity/visual-editing^...' && turbo watch dev storybook --filter='@sanity/visual-editing...'",
Expand All @@ -26,8 +26,11 @@
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"eslint-plugin-storybook": "^10.5.5",
"knip": "^5.88.1",
"oxfmt": "^0.60.0",
"oxlint": "^1.76.0",
"oxlint-tsgolint": "^7.0.2001",
"pkg-pr-new": "^0.0.60",
"turbo": "^2.10.5",
"typescript": "catalog:"
Expand All @@ -53,7 +56,6 @@
"@sanity/visual-editing-csm": "workspace:*",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"eslint-plugin-react-hooks": "catalog:",
"groq": "catalog:",
"sanity": "catalog:"
}
Expand Down
43 changes: 0 additions & 43 deletions packages/@repo/eslint-config/index.js

This file was deleted.

17 changes: 0 additions & 17 deletions packages/@repo/eslint-config/package.json

This file was deleted.

1 change: 0 additions & 1 deletion packages/@repo/sanity-schema/.eslintignore

This file was deleted.

11 changes: 1 addition & 10 deletions packages/@repo/sanity-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"scripts": {
"build": "pkg build --strict --check --clean",
"extract": "sanity schema extract --force --workspace shoes --path ../../../apps/next/schema.json && sanity schema extract --force --workspace live-demo --path ../../../apps/live-next/schema.json && sanity schema extract --force --workspace page-builder-demo --path ../../../apps/page-builder-demo/schema.json",
"lint": "eslint .",
"prepack": "turbo run build"
},
"dependencies": {
Expand All @@ -42,7 +41,6 @@
"react": "catalog:"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/package.config": "workspace:*",
"@sanity/assist": "catalog:",
"@sanity/color-input": "catalog:",
Expand All @@ -54,7 +52,6 @@
"@sanity/visual-editing-csm": "workspace:*",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"eslint": "^8.57.1",
"rxjs": "catalog:",
"sanity": "catalog:",
"sanity-plugin-asset-source-unsplash": "catalog:",
Expand All @@ -70,11 +67,5 @@
"sanity": "catalog:",
"sanity-plugin-asset-source-unsplash": "catalog:"
},
"browserslist": "extends @sanity/browserslist-config",
"eslintConfig": {
"extends": [
"@repo/eslint-config"
],
"root": true
}
"browserslist": "extends @sanity/browserslist-config"
}
1 change: 0 additions & 1 deletion packages/@repo/sanity-schema/src/live-demo/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {assist} from '@sanity/assist'
import {colorInput} from '@sanity/color-input'
import {CogIcon} from '@sanity/icons/Cog'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export function PageSectionInput(props: ObjectInputProps): React.JSX.Element {
)

return (
// oxlint-disable-next-line typescript/no-deprecated
<Stack space={5}>
{symbolFieldMember && (
<Card padding={4} style={{margin: '-20px -20px -20px'}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ export const pageBuilderDemoPlugin = definePlugin<
title: 'Basic page',
schemaType: 'page',
parameters: [{name: 'title', title: 'Page Title', type: 'string'}],
// eslint-disable-next-line @typescript-eslint/no-explicit-any
value: (params: any) => {
return {
title: params.title,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {definePlugin} from 'sanity'
import {structureTool} from 'sanity/structure'

Expand Down
1 change: 0 additions & 1 deletion packages/@repo/studio-url/.eslintignore

This file was deleted.

10 changes: 1 addition & 9 deletions packages/@repo/studio-url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,13 @@
},
"scripts": {
"build": "pkg build --strict --check --clean",
"lint": "eslint .",
"prepack": "turbo run build"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/package.config": "workspace:*",
"@sanity/pkg-utils": "catalog:",
"@sanity/tsconfig": "catalog:",
"typescript": "catalog:"
},
"browserslist": "extends @sanity/browserslist-config",
"eslintConfig": {
"extends": [
"@repo/eslint-config"
],
"root": true
}
"browserslist": "extends @sanity/browserslist-config"
}
4 changes: 2 additions & 2 deletions packages/@repo/studio-url/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// oxlint-disable-next-line typescript/ban-ts-comment, typescript/prefer-ts-expect-error -- has to be exact @ts-ignore for string replacement to work
// @ts-ignore has to be exact for string replacement to work
const envUrl = process.env.VERCEL_BRANCH_URL
const isStablePreviewBranch = envUrl?.includes('-git-preview')
Expand All @@ -7,7 +7,7 @@ const isLinearBranch = envUrl?.includes('-git-crx-')

/** @public */
export const studioUrl =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// oxlint-disable-next-line typescript/ban-ts-comment, typescript/prefer-ts-expect-error -- has to be exact @ts-ignore for string replacement to work
// @ts-ignore has to be exact for string replacement to work
process.env.NODE_ENV === 'development'
? 'http://localhost:3333'
Expand Down
1 change: 0 additions & 1 deletion packages/core-loader/.eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions packages/core-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
"scripts": {
"build": "pkg build --strict --check --clean",
"dev": "pkg build --strict",
"lint": "eslint .",
"prepack": "turbo run build",
"test": "vitest --pass-with-no-tests --typecheck"
},
Expand All @@ -77,26 +76,16 @@
"@sanity/visual-editing-csm": "workspace:^"
},
"devDependencies": {
"@repo/eslint-config": "workspace:*",
"@repo/package.config": "workspace:*",
"@sanity/pkg-utils": "catalog:",
"@sanity/tsconfig": "catalog:",
"@typescript-eslint/eslint-plugin": "catalog:",
"@typescript-eslint/parser": "catalog:",
"async-cache-dedupe": "2.2.0",
"eslint": "^8.57.1",
"happy-dom": "^18.0.1",
"nanostores": "1.0.1",
"typescript": "catalog:",
"vitest": "^3.2.4"
},
"browserslist": "extends @sanity/browserslist-config",
"eslintConfig": {
"extends": [
"@repo/eslint-config"
],
"root": true
},
"engines": {
"node": ">=18"
}
Expand Down
3 changes: 2 additions & 1 deletion packages/core-loader/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export interface CreateQueryStoreOptions {
* @example `import {createClient} from '@sanity/preview-kit/client'`
* @example `import {createClient} from 'next-sanity'`
*/
// oxlint-disable-next-line typescript/no-deprecated
client: SanityClient | import('@sanity/client/stega').SanityStegaClient | false
/**
* If you want all data fetching to be done server-side in production, set this to `true` and `client: false`.
Expand Down Expand Up @@ -50,6 +51,7 @@ export interface QueryStore {
* When `ssr: true` you call this in your server entry point that imports the result of `createQueryStore` instance.
* It's required to call it before any data fetching is done.
*/
// oxlint-disable-next-line typescript/no-deprecated
setServerClient: (client: SanityClient | import('@sanity/client/stega').SanityStegaClient) => void
enableLiveMode: EnableLiveMode
/** @internal */
Expand Down Expand Up @@ -139,7 +141,6 @@ export const createQueryStore = (options: CreateQueryStoreOptions): QueryStore =
.instance!.fetch(JSON.stringify({query, params}))
.then((response) => {
if (controller.signal.aborted) return
// eslint-disable-next-line @typescript-eslint/no-explicit-any
$fetch.setKey('data', response.result as any)
$fetch.setKey('sourceMap', response.resultSourceMap)
$fetch.setKey('perspective', initialPerspective)
Expand Down
Loading