Skip to content

Instantly share code, notes, and snippets.

@guidefari
Created July 5, 2026 10:11
Show Gist options
  • Select an option

  • Save guidefari/67636c73587ab25597794f5b48eed089 to your computer and use it in GitHub Desktop.

Select an option

Save guidefari/67636c73587ab25597794f5b48eed089 to your computer and use it in GitHub Desktop.
Strictest JS/TS defaults — oxlint, tsconfig, vitest, oxfmt
{
"$schema": "https://raw.githubusercontent.com/nicksrandall/oxfmt/refs/heads/main/configuration_schema.json",
"semi": false,
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"experimentalSortImports": {
"groups": ["builtin", "external", "internal", ["parent", "sibling", "index"]],
"newlinesBetween": true
},
"ignorePatterns": [
"**/node_modules/**", "**/dist/**", "**/build/**", "**/.next/**",
"**/.turbo/**", "**/coverage/**", "**/*.gen.*", "**/*.generated.*",
"**/routeTree.gen.ts", "**/package.json", "**/tsconfig.json"
]
}
{
"$schema": "https://raw.githubusercontent.com/oxc-project/oxc/main/npm/oxlint/configuration_schema.json",
"plugins": ["typescript", "import", "unicorn", "oxc", "eslint"],
"categories": {
"correctness": "error",
"suspicious": "error",
"perf": "error",
"style": "off",
"pedantic": "off",
"restriction": "off"
},
"rules": {
"typescript/consistent-type-imports": ["error", { "fixStyle": "inline-type-imports" }],
"typescript/no-import-type-side-effects": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-useless-empty-export": "error",
"typescript/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_" }],
"typescript/array-type": ["error", { "default": "generic", "readonly": "generic" }],
"typescript/no-non-null-assertion": "error",
"typescript/consistent-type-assertions": ["error", { "assertionStyle": "never" }],
"typescript/no-explicit-any": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-dynamic-delete": "error",
"typescript/no-unnecessary-type-arguments": "error",
"typescript/no-unnecessary-type-assertion": "error",
"typescript/no-confusing-non-null-assertion": "error",
"import/no-duplicates": "error",
"import/no-self-import": "error",
"import/no-empty-named-blocks": "error",
"import/no-commonjs": "error",
"eslint/no-console": "error",
"eslint/no-var": "error",
"eslint/no-useless-constructor": "error",
"eslint/no-unneeded-ternary": "error",
"eslint/no-useless-concat": "error",
"no-underscore-dangle": ["error", { "allow": ["_tag"] }],
"unicorn/prefer-array-flat-map": "error",
"unicorn/no-accessor-recursion": "error",
"no-shadow": "off",
"require-yield": "off",
"no-fallthrough": "off",
"no-await-in-loop": "off",
"eslint/object-shorthand": "off",
"no-unused-expressions": "off",
"no-new": "off",
"typescript/no-empty-interface": "off",
"typescript/ban-ts-comment": "off",
"typescript/no-namespace": "off",
"typescript/unified-signatures": "off",
"typescript/no-invalid-void-type": "off",
"unicorn/consistent-function-scoping": "off",
"unicorn/no-array-sort": "off",
"unicorn/no-array-reverse": "off",
"unicorn/no-new-array": "off",
"oxc/no-map-spread": "off"
},
"overrides": [
{
"files": ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/test/**"],
"rules": {
"unicorn/no-array-sort": "off",
"unicorn/consistent-function-scoping": "off",
"require-yield": "off",
"eslint/no-console": "off",
"typescript/no-explicit-any": "off",
"typescript/no-non-null-assertion": "off",
"typescript/consistent-type-assertions": "off"
}
},
{
"files": ["**/*.d.ts"],
"rules": {
"typescript/consistent-type-imports": "off",
"typescript/consistent-type-assertions": "off",
"typescript/no-explicit-any": "off"
}
},
{
"files": ["**/*.gen.*", "**/*.generated.*", "**/routeTree.gen.ts", "**/*sst-env.d.ts"],
"rules": {
"typescript/no-unused-vars": "off",
"typescript/no-explicit-any": "off",
"typescript/no-non-null-assertion": "off",
"typescript/consistent-type-assertions": "off",
"unicorn/consistent-function-scoping": "off",
"import/no-commonjs": "off",
"eslint/no-console": "off"
}
},
{
"files": ["vite.config.ts", "vitest.config.ts", "playwright.config.ts"],
"rules": {
"eslint/no-console": "off"
}
}
],
"ignorePatterns": [
"**/node_modules/**", "**/dist/**", "**/build/**", "**/.next/**",
"**/.turbo/**", "**/coverage/**", "**/*.gen.ts", "**/*.generated.ts",
"**/routeTree.gen.ts"
]
}
{
"compilerOptions": {
"strict": true,
"exactOptionalPropertyTypes": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitOverride": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitReturns": true,
"noUncheckedSideEffectImports": true,
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ES2022",
"lib": ["ES2022"],
"skipLibCheck": true,
"isolatedModules": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true,
"declaration": true,
"declarationMap": true,
"sourceMap": true
}
}
import { defineConfig } from "vitest/config"
export default defineConfig({
test: {
globals: true,
include: ["src/**/*.test.ts"],
sequence: { concurrent: true },
fakeTimers: { toFake: undefined },
coverage: {
provider: "v8",
reporter: ["text", "html"],
exclude: [
"node_modules/",
"dist/",
"**/*.d.ts",
"**/*.config.*",
"**/vitest.setup.*",
],
},
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment