Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Introduction

This package provides the shared oxlint configuration for the entire FRAME monorepo. Its goal is to guarantee consistency in static analysis, code quality, and convention compliance across all applications and packages.

The package exposes a single root configuration from src/base.ts, which groups four plugin layers applied via overrides according to file type:

graph TD
  A[base.ts] --> B[TypeScript Plugin]
  A --> C["Overrides *.cjs/*.cts"]
  A --> D["Overrides *.ts/*.tsx"]
  A --> E["Overrides *.js/*.jsx/*.ts/*.tsx"]
  E --> F[eslint-plugin-import]
  E --> G[eslint-plugin-perfectionist]
  E --> H[eslint-plugin-sonarjs]
  E --> I[eslint-plugin-unicorn]
  E --> J["@tanstack/eslint-plugin-query"]
  E --> K[eslint-plugin-check-file]
PluginPurpose
typescriptStatic analysis rules for TypeScript
eslint-plugin-importValidation of import/export declarations
eslint-plugin-perfectionistConsistent ordering of imports, exports, objects, JSX props
eslint-plugin-sonarjsBug and code-smell detection in the SonarQube style
eslint-plugin-unicornModern JavaScript/TypeScript best practices
@tanstack/eslint-plugin-queryRules specific to TanStack Query
eslint-plugin-check-fileFile and folder naming conventions
oxlint-tsgolintAdditional TypeScript rules via oxlint

The configuration automatically excludes the following build directories and files:

**/node_modules/**
**/.next/**
**/out/**
**/build/**
**/public/**
**/dist/**
**/coverage/**
**/.turbo/**
**/pnpm-lock.yaml
**/yarn.lock
**/package-lock.json
RuleLevel
@typescript-eslint/no-explicit-anyerror
@typescript-eslint/no-namespaceerror
@typescript-eslint/ban-ts-commenterror
@typescript-eslint/consistent-type-importswarn
@typescript-eslint/no-unsafe-declaration-mergingerror
RuleLevel
import/no-duplicateserror
import/no-commonjserror
import/no-dynamic-requireerror
import/no-absolute-patherror
perfectionist/sort-exportswarn
perfectionist/sort-import-attributeserror
RuleLevel
unicorn/filename-caseerror (kebab-case)
unicorn/no-nullerror
unicorn/prefer-node-protocolerror
unicorn/prefer-top-level-awaiterror
unicorn/no-array-for-eacherror
    1. Add the package as a development dependency:
      package.json
      {
      "devDependencies": {
      "@frame/oxlint": "workspace:*"
      }
      }
    2. Create an oxlint.config.ts file at the package root:
      oxlint.config.ts
      import base from "@frame/oxlint/base"
      export default {
      ...base,
      // override or extend rules as needed
      }
    3. Add the lint script to `package.json`:
    ```json title="package.json"
    {
    "scripts": {
    "lint": "oxlint --fix"
    }
    }
    1. Run lint manually:
      Terminal window
      pnpm -F <package-name> lint

The check-file/folder-naming-convention rule enforces kebab-case in the following directories:

DirectoryConvention
content/**KEBAB_CASE
e2e/**KEBAB_CASE