@hooshid/ox-config 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +84 -0
- package/dist/format.d.mts.map +1 -1
- package/dist/format.mjs +37 -7
- package/dist/format.mjs.map +1 -1
- package/dist/lint.mjs.map +1 -1
- package/package.json +26 -27
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 hooshid
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# @hooshid/ox-config
|
|
2
|
+
|
|
3
|
+
Shared Oxlint + Oxfmt presets for my projects — one install for lint and format.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -D @hooshid/ox-config oxlint oxfmt
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Oxlint
|
|
14
|
+
|
|
15
|
+
Create `oxlint.config.ts` in your project root:
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import {
|
|
19
|
+
base,
|
|
20
|
+
unicorn,
|
|
21
|
+
depend,
|
|
22
|
+
react,
|
|
23
|
+
tanstackRouter,
|
|
24
|
+
tailwind,
|
|
25
|
+
vitest,
|
|
26
|
+
} from '@hooshid/ox-config/lint'
|
|
27
|
+
import { defineConfig } from 'oxlint'
|
|
28
|
+
|
|
29
|
+
export default defineConfig({
|
|
30
|
+
extends: [
|
|
31
|
+
base(),
|
|
32
|
+
unicorn(),
|
|
33
|
+
depend(),
|
|
34
|
+
react(),
|
|
35
|
+
tanstackRouter(),
|
|
36
|
+
tailwind(),
|
|
37
|
+
vitest(),
|
|
38
|
+
],
|
|
39
|
+
})
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Oxfmt
|
|
43
|
+
|
|
44
|
+
Create `oxfmt.config.ts`:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import { format, tailwindFormat } from '@hooshid/ox-config/format'
|
|
48
|
+
import { defineConfig } from 'oxfmt'
|
|
49
|
+
|
|
50
|
+
export default defineConfig({
|
|
51
|
+
...format(),
|
|
52
|
+
...tailwindFormat({ stylesheet: 'src/styles/globals.css' }),
|
|
53
|
+
})
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Available Presets
|
|
57
|
+
|
|
58
|
+
### `@hooshid/ox-config/lint`
|
|
59
|
+
|
|
60
|
+
| Preset | Purpose |
|
|
61
|
+
| :--- | :--- |
|
|
62
|
+
| `base()` | TypeScript + Import rules — always include first |
|
|
63
|
+
| `unicorn()` | Code quality rules |
|
|
64
|
+
| `depend()` | Dependency optimization |
|
|
65
|
+
| `typeAware()` | Type-aware rules via tsgolint |
|
|
66
|
+
| `react()` | React + react-refresh |
|
|
67
|
+
| `tanstackRouter()` | TanStack Router rules |
|
|
68
|
+
| `tailwind()` | Tailwind class rules |
|
|
69
|
+
| `vitest()` | Vitest test rules |
|
|
70
|
+
| `node()` | Node.js environment |
|
|
71
|
+
| `promise()` | Promise rules |
|
|
72
|
+
| `nestjs()` | NestJS rules |
|
|
73
|
+
| `drizzle()` | Drizzle ORM rules |
|
|
74
|
+
|
|
75
|
+
### `@hooshid/ox-config/format`
|
|
76
|
+
|
|
77
|
+
| Export | Purpose |
|
|
78
|
+
| :--- | :--- |
|
|
79
|
+
| `format()` | Base formatting config |
|
|
80
|
+
| `tailwindFormat()` | Tailwind class sorting |
|
|
81
|
+
|
|
82
|
+
## License
|
|
83
|
+
|
|
84
|
+
MIT
|
package/dist/format.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.mts","names":[],"sources":["../src/format.ts"],"mappings":";;;wBAqBgB,OAAO,YAAY,0BAA0B;;;;;
|
|
1
|
+
{"version":3,"file":"format.d.mts","names":[],"sources":["../src/format.ts"],"mappings":";;;wBAqBgB,OAAO,YAAY,0BAA0B;;;;;wBA4E7C,eAAe;EAAW;IAA6B"}
|
package/dist/format.mjs
CHANGED
|
@@ -18,16 +18,19 @@ import { defu } from "defu";
|
|
|
18
18
|
/** Base format preset. Pass overrides to customize. */
|
|
19
19
|
function format(overrides) {
|
|
20
20
|
return defu(overrides, {
|
|
21
|
-
semi: false,
|
|
22
|
-
singleQuote: true,
|
|
23
|
-
trailingComma: "all",
|
|
24
21
|
printWidth: 100,
|
|
25
22
|
tabWidth: 2,
|
|
26
23
|
useTabs: false,
|
|
27
|
-
arrowParens: "always",
|
|
28
|
-
bracketSpacing: true,
|
|
29
24
|
endOfLine: "lf",
|
|
25
|
+
semi: false,
|
|
26
|
+
singleQuote: true,
|
|
27
|
+
jsxSingleQuote: false,
|
|
30
28
|
quoteProps: "consistent",
|
|
29
|
+
trailingComma: "all",
|
|
30
|
+
bracketSpacing: true,
|
|
31
|
+
bracketSameLine: false,
|
|
32
|
+
arrowParens: "always",
|
|
33
|
+
sortPackageJson: true,
|
|
31
34
|
sortImports: {
|
|
32
35
|
groups: [
|
|
33
36
|
"builtin",
|
|
@@ -42,9 +45,36 @@ function format(overrides) {
|
|
|
42
45
|
{ newlinesBetween: true },
|
|
43
46
|
"type"
|
|
44
47
|
],
|
|
45
|
-
internalPattern: [
|
|
48
|
+
internalPattern: [
|
|
49
|
+
"~/",
|
|
50
|
+
"@/",
|
|
51
|
+
"#/"
|
|
52
|
+
]
|
|
46
53
|
},
|
|
47
|
-
|
|
54
|
+
ignorePatterns: [
|
|
55
|
+
"dist/**",
|
|
56
|
+
"build/**",
|
|
57
|
+
"out/**",
|
|
58
|
+
".output/**",
|
|
59
|
+
".next/**",
|
|
60
|
+
".turbo/**",
|
|
61
|
+
".cache/**",
|
|
62
|
+
".nitro/**",
|
|
63
|
+
".tanstack/**",
|
|
64
|
+
".vinxi/**",
|
|
65
|
+
".content-collections/**",
|
|
66
|
+
"public/**",
|
|
67
|
+
"coverage/**",
|
|
68
|
+
"**/api",
|
|
69
|
+
"**/build",
|
|
70
|
+
"**/public",
|
|
71
|
+
"routeTree.gen.ts",
|
|
72
|
+
"*.min.js",
|
|
73
|
+
"*.min.css",
|
|
74
|
+
"pnpm-lock.yaml",
|
|
75
|
+
"package-lock.json",
|
|
76
|
+
"yarn.lock"
|
|
77
|
+
]
|
|
48
78
|
});
|
|
49
79
|
}
|
|
50
80
|
/**
|
package/dist/format.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.mjs","names":[],"sources":["../src/format.ts"],"sourcesContent":["/**\
|
|
1
|
+
{"version":3,"file":"format.mjs","names":[],"sources":["../src/format.ts"],"sourcesContent":["/**\n * Oxfmt format presets.\n *\n * @example\n * ```ts\n * // oxfmt.config.ts\n * import { format, tailwindFormat } from '@hooshid/ox-config/format'\n * import { defineConfig } from 'oxfmt'\n *\n * export default defineConfig({\n * ...format(),\n * ...tailwindFormat({ stylesheet: 'src/styles/globals.css' }),\n * })\n * ```\n */\n\nimport { defu } from 'defu'\n\nimport type { OxfmtConfig } from 'oxfmt'\n\n/** Base format preset. Pass overrides to customize. */\nexport function format(overrides?: Record<string, unknown>): OxfmtConfig {\n return defu(overrides, {\n // Layout\n printWidth: 100,\n tabWidth: 2,\n useTabs: false,\n endOfLine: 'lf' as const,\n\n // Quotes & Semicolons\n semi: false,\n singleQuote: true,\n jsxSingleQuote: false,\n quoteProps: 'consistent' as const,\n\n // Trailing & Spacing\n trailingComma: 'all' as const,\n bracketSpacing: true,\n bracketSameLine: false,\n arrowParens: 'always' as const,\n\n // Sorting\n sortPackageJson: true,\n sortImports: {\n groups: [\n 'builtin',\n { newlinesBetween: true },\n 'external',\n { newlinesBetween: true },\n 'internal',\n { newlinesBetween: true },\n ['parent', 'sibling'],\n { newlinesBetween: true },\n 'index',\n { newlinesBetween: true },\n 'type',\n ],\n internalPattern: ['~/', '@/', '#/'],\n },\n\n // Ignore\n ignorePatterns: [\n // Build outputs\n 'dist/**',\n 'build/**',\n 'out/**',\n '.output/**',\n '.next/**',\n '.turbo/**',\n '.cache/**',\n '.nitro/**',\n '.tanstack/**',\n '.vinxi/**',\n '.content-collections/**',\n\n // Generated / vendor\n 'public/**',\n 'coverage/**',\n '**/api',\n '**/build',\n '**/public',\n 'routeTree.gen.ts',\n '*.min.js',\n '*.min.css',\n\n // Lock files\n 'pnpm-lock.yaml',\n 'package-lock.json',\n 'yarn.lock',\n ],\n }) as OxfmtConfig\n}\n\n/**\n * Oxfmt Tailwind class-sorting preset.\n * Spread into your format config alongside `format()` to enable.\n */\nexport function tailwindFormat(options: { stylesheet?: string } = {}): OxfmtConfig {\n return {\n sortTailwindcss: {\n stylesheet: options.stylesheet ?? 'src/styles/globals.css',\n functions: ['cn', 'clsx', 'cva', 'tw'] as string[],\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,SAAgB,OAAO,WAAkD;CACvE,OAAO,KAAK,WAAW;EAErB,YAAY;EACZ,UAAU;EACV,SAAS;EACT,WAAW;EAGX,MAAM;EACN,aAAa;EACb,gBAAgB;EAChB,YAAY;EAGZ,eAAe;EACf,gBAAgB;EAChB,iBAAiB;EACjB,aAAa;EAGb,iBAAiB;EACjB,aAAa;GACX,QAAQ;IACN;IACA,EAAE,iBAAiB,KAAK;IACxB;IACA,EAAE,iBAAiB,KAAK;IACxB;IACA,EAAE,iBAAiB,KAAK;IACxB,CAAC,UAAU,SAAS;IACpB,EAAE,iBAAiB,KAAK;IACxB;IACA,EAAE,iBAAiB,KAAK;IACxB;GACF;GACA,iBAAiB;IAAC;IAAM;IAAM;GAAI;EACpC;EAGA,gBAAgB;GAEd;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAGA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GAGA;GACA;GACA;EACF;CACF,CAAC;AACH;;;;;AAMA,SAAgB,eAAe,UAAmC,CAAC,GAAgB;CACjF,OAAO,EACL,iBAAiB;EACf,YAAY,QAAQ,cAAc;EAClC,WAAW;GAAC;GAAM;GAAQ;GAAO;EAAI;CACvC,EACF;AACF"}
|
package/dist/lint.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lint.mjs","names":["defineConfig"],"sources":["../src/utils.ts","../src/lint.ts"],"sourcesContent":["/**\r\n * Utility functions and constants\r\n */\r\n\r\n// ============================================================================\r\n// Environment detection\r\n// ============================================================================\r\n\r\nconst env = process.env\r\n\r\nfunction isCI(): boolean {\r\n return !!(\r\n env['CI'] ||\r\n env['CONTINUOUS_INTEGRATION'] ||\r\n env['BUILD_ID'] ||\r\n env['BUILD_NUMBER'] ||\r\n env['RUN_ID']\r\n )\r\n}\r\n\r\nfunction isInGitHooksOrLintStaged(): boolean {\r\n return (\r\n !!(env['GIT_PARAMS'] || env['VSCODE_GIT_COMMAND']) ||\r\n env['npm_lifecycle_script']?.startsWith('lint-staged') === true\r\n )\r\n}\r\n\r\n/**\r\n * Detects whether running in an editor environment.\r\n * Returns false in CI, Git Hooks, or lint-staged.\r\n */\r\nexport function isInEditorEnv(): boolean {\r\n if (isCI()) return false\r\n if (isInGitHooksOrLintStaged()) return false\r\n return !!(\r\n env['VSCODE_PID'] ||\r\n env['VSCODE_CWD'] ||\r\n env['JETBRAINS_IDE'] ||\r\n env['VIM'] ||\r\n env['NVIM']\r\n )\r\n}\r\n\r\n// ============================================================================\r\n// File matching patterns (Globs)\r\n// ============================================================================\r\n\r\n/** All JS/TS source files */\r\nexport const GLOB_SRC = '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'\r\n\r\n/** JavaScript files only */\r\nexport const GLOB_JS = '**/*.{js,mjs,cjs,jsx}'\r\n\r\n/** TypeScript files only */\r\nexport const GLOB_TS = '**/*.{ts,mts,cts,tsx}'\r\n\r\n/** JSX/TSX files (React-related) */\r\nexport const GLOB_JSX = '**/*.{jsx,tsx}'\r\n\r\n/** Test files */\r\nexport const GLOB_TESTS: string[] = [\r\n '**/*.{test,spec}.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',\r\n '**/__tests__/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',\r\n]\r\n\r\n/** JSON files */\r\nexport const GLOB_JSON = '**/*.json'\r\n\r\n/** Markdown files */\r\nexport const GLOB_MARKDOWN = '**/*.md'","/**\r\n * Oxlint lint presets.\r\n *\r\n * Every preset is a function that accepts optional overrides, merged via `defu`.\r\n * User overrides take priority over preset defaults.\r\n *\r\n * @example\r\n * ```ts\r\n * // oxlint.config.ts\r\n * import { base, unicorn, react, tailwind, vitest } from '@hooshid/ox-config/lint'\r\n * import { defineConfig } from 'oxlint'\r\n *\r\n * export default defineConfig({\r\n * extends: [base(), unicorn(), react(), tailwind(), vitest()],\r\n * })\r\n * ```\r\n */\r\nimport { existsSync, readFileSync } from 'node:fs'\r\nimport { createRequire } from 'node:module'\r\nimport path from 'node:path'\r\n\r\nimport { defu } from 'defu'\r\nimport { defineConfig } from 'oxlint'\r\n\r\nimport { GLOB_JSX, GLOB_SRC, GLOB_TESTS, GLOB_TS, isInEditorEnv } from './utils'\r\n\r\nimport type { ExternalPluginEntry, OxlintConfig } from 'oxlint'\r\n\r\nconst require = createRequire(import.meta.url)\r\n\r\n// ============================================================================\r\n// Ignore patterns\r\n// ============================================================================\r\n\r\nconst DEFAULT_IGNORES: string[] = [\r\n '**/node_modules/**',\r\n '**/dist/**',\r\n '**/build/**',\r\n '**/out/**',\r\n '**/.next/**',\r\n '**/.cache/**',\r\n '**/.turbo/**',\r\n '**/.output/**',\r\n '**/.nitro/**',\r\n '**/.tanstack/**',\r\n '**/.vinxi/**',\r\n '**/.git/**',\r\n '**/public/**',\r\n '**/*.d.ts',\r\n]\r\n\r\nfunction loadGitignorePatterns(): string[] {\r\n const gitignoreFile = path.resolve(process.cwd(), '.gitignore')\r\n if (!existsSync(gitignoreFile)) return []\r\n\r\n return readFileSync(gitignoreFile, 'utf8')\r\n .split(/\\r?\\n/u)\r\n .map((line) => line.trim())\r\n .filter((line) => line && !line.startsWith('#'))\r\n .map((pattern) => {\r\n let p = pattern.trimEnd()\r\n if (p.startsWith('/')) p = p.slice(1)\r\n if (!p.includes('/') && !p.includes('*')) p = `**/${p}`\r\n if (p.endsWith('/')) p = `${p}**`\r\n return p\r\n })\r\n}\r\n\r\n// ============================================================================\r\n// Helpers\r\n// ============================================================================\r\n\r\nfunction preset(defaults: OxlintConfig, overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return defineConfig(defu(overrides ?? {}, defaults))\r\n}\r\n\r\nfunction resolvePlugin(name: string): string {\r\n try {\r\n return require.resolve(name)\r\n } catch {\r\n return name\r\n }\r\n}\r\n\r\nfunction resolvePlugins(plugins: ExternalPluginEntry[]): ExternalPluginEntry[] {\r\n return plugins.map((p) => {\r\n if (typeof p === 'string') return resolvePlugin(p)\r\n return { ...p, specifier: resolvePlugin(p.specifier) }\r\n })\r\n}\r\n\r\n// ============================================================================\r\n// Core\r\n// ============================================================================\r\n\r\n/**\r\n * Base lint preset — TypeScript + Import plugins, categories, env, ignores.\r\n * Always include first.\r\n */\r\nexport function base(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n plugins: ['typescript', 'import'],\r\n categories: {\r\n correctness: 'error',\r\n suspicious: 'error',\r\n perf: 'error',\r\n pedantic: 'warn',\r\n },\r\n rules: {\r\n 'no-await-in-loop': 'off',\r\n 'typescript/prefer-readonly-parameter-types': 'off',\r\n 'typescript/strict-boolean-expressions': 'off',\r\n 'max-lines': 'off',\r\n 'max-lines-per-function': 'off',\r\n 'no-inline-comments': 'off',\r\n 'no-warning-comments': 'off',\r\n 'import/max-dependencies': 'off',\r\n 'react/no-unescaped-entities': 'off',\r\n 'require-await': 'off',\r\n },\r\n env: {\r\n browser: true,\r\n node: true,\r\n es2026: true,\r\n builtin: true,\r\n },\r\n ignorePatterns: [...DEFAULT_IGNORES, ...loadGitignorePatterns()],\r\n overrides: [\r\n {\r\n files: [GLOB_TS],\r\n rules: {\r\n 'typescript/consistent-type-definitions': 'off',\r\n 'typescript/consistent-type-imports': 'error',\r\n 'no-unused-vars': 'off',\r\n 'typescript/array-type': 'error',\r\n 'typescript/consistent-generic-constructors': 'error',\r\n 'typescript/consistent-indexed-object-style': 'error',\r\n 'typescript/consistent-type-assertions': 'error',\r\n 'typescript/ban-tslint-comment': 'error',\r\n 'typescript/no-empty-interface': 'error',\r\n 'typescript/no-inferrable-types': 'error',\r\n 'typescript/prefer-for-of': 'error',\r\n 'typescript/prefer-function-type': 'error',\r\n 'typescript/unified-signatures': 'error',\r\n },\r\n },\r\n {\r\n files: [GLOB_SRC],\r\n rules: {\r\n 'import/no-unassigned-import': 'off',\r\n 'import/no-relative-parent-imports': 'error',\r\n 'import/first': 'error',\r\n 'import/no-duplicates': 'error',\r\n 'import/consistent-type-specifier-style': 'error',\r\n 'import/no-mutable-exports': 'error',\r\n 'import/no-named-default': 'error',\r\n },\r\n },\r\n {\r\n files: ['**/*.config.{ts,mts,cts,js,mjs,cjs}'],\r\n rules: {\r\n 'import/no-relative-parent-imports': 'off',\r\n },\r\n },\r\n {\r\n files: GLOB_TESTS,\r\n rules: {\r\n 'import/first': 'off',\r\n 'import/no-duplicates': 'off',\r\n 'import/consistent-type-specifier-style': 'off',\r\n 'unicorn/no-useless-undefined': 'off',\r\n 'typescript/no-empty-function': 'off',\r\n 'unicorn/prefer-string-replace-all': 'off',\r\n 'unicorn/no-array-callback-reference': 'off',\r\n 'unicorn/prefer-spread': 'off',\r\n 'typescript/no-non-null-assertion': 'off',\r\n 'no-magic-numbers': 'off',\r\n 'typescript/no-explicit-any': 'off',\r\n 'typescript/no-unsafe-assignment': 'off',\r\n 'typescript/no-unsafe-call': 'off',\r\n 'typescript/no-unsafe-member-access': 'off',\r\n 'typescript/no-unsafe-return': 'off',\r\n 'typescript/no-unsafe-argument': 'off',\r\n 'react/no-array-index-key': 'off',\r\n },\r\n },\r\n ],\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n/** Type-aware lint preset — enables 59 type-aware rules via tsgolint. */\r\nexport function typeAware(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n options: {\r\n typeAware: true,\r\n typeCheck: true,\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n/** Unicorn lint preset — 100+ code quality rules. */\r\nexport function unicorn(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n plugins: ['unicorn'],\r\n rules: {\r\n 'unicorn/no-null': 'off',\r\n 'unicorn/filename-case': ['error', { case: 'kebabCase' }],\r\n 'unicorn/catch-error-name': 'error',\r\n 'unicorn/error-message': 'error',\r\n 'unicorn/prefer-optional-catch-binding': 'error',\r\n 'unicorn/no-zero-fractions': 'error',\r\n 'unicorn/number-literal-case': 'error',\r\n 'unicorn/numeric-separators-style': 'error',\r\n 'unicorn/prefer-includes': 'error',\r\n 'unicorn/prefer-spread': 'error',\r\n 'unicorn/prefer-ternary': 'error',\r\n 'unicorn/prefer-string-trim-start-end': 'error',\r\n 'unicorn/prefer-structured-clone': 'error',\r\n 'unicorn/prefer-default-parameters': 'error',\r\n 'unicorn/no-console-spaces': 'error',\r\n 'unicorn/throw-new-error': 'error',\r\n 'unicorn/require-array-join-separator': 'error',\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n/** Dependency optimization — flags packages replaceable with native APIs. */\r\nexport function depend(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n jsPlugins: resolvePlugins(['eslint-plugin-depend']),\r\n rules: {\r\n 'depend/ban-dependencies': [\r\n 'error',\r\n {\r\n presets: ['native', 'microutilities', 'preferred'],\r\n modules: [],\r\n allowed: ['dotenv'],\r\n },\r\n ],\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n// ============================================================================\r\n// Runtime environments\r\n// ============================================================================\r\n\r\n/** Node.js lint preset — native node plugin. */\r\nexport function node(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset({ plugins: ['node'] }, overrides)\r\n}\r\n\r\n/** Promise lint preset — native promise plugin. */\r\nexport function promise(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset({ plugins: ['promise'] }, overrides)\r\n}\r\n\r\n// ============================================================================\r\n// Frontend\r\n// ============================================================================\r\n\r\nconst reactStyleRules = {\r\n 'react/jsx-pascal-case': 'error',\r\n 'react/jsx-boolean-value': 'error',\r\n 'react/jsx-curly-brace-presence': 'error',\r\n 'react/jsx-fragments': 'error',\r\n 'react/self-closing-comp': 'error',\r\n 'react/hook-use-state': 'error',\r\n} as const\r\n\r\n/**\r\n * React lint preset — React + react-refresh (for Vite/TanStack Start).\r\n */\r\nexport function react(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n plugins: ['react'],\r\n jsPlugins: resolvePlugins(['eslint-plugin-react-refresh']),\r\n rules: {\r\n 'react/react-in-jsx-scope': 'off',\r\n ...reactStyleRules,\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n/**\r\n * TanStack Router lint preset — loads @tanstack/eslint-plugin-router.\r\n * Covers route-param-names and create-route-property-order.\r\n */\r\nexport function tanstackRouter(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n jsPlugins: resolvePlugins([\r\n { name: 'tanstack-router', specifier: '@tanstack/eslint-plugin-router' },\r\n ]),\r\n rules: {\r\n 'tanstack-router/route-param-names': 'error',\r\n 'tanstack-router/create-route-property-order': 'error',\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n// ============================================================================\r\n// Tailwind\r\n// ============================================================================\r\n\r\ninterface TailwindOptions extends Partial<OxlintConfig> {\r\n entryPoint?: string\r\n rootFontSize?: number\r\n /** File glob patterns for tailwind rules. @default GLOB_JSX */\r\n files?: string[]\r\n}\r\n\r\n/** Tailwind CSS lint preset — eslint-plugin-better-tailwindcss. */\r\nexport function tailwind(options: TailwindOptions = {}): OxlintConfig {\r\n const { entryPoint = 'src/styles/globals.css', rootFontSize = 16, files, ...overrides } = options\r\n\r\n return preset(\r\n {\r\n jsPlugins: resolvePlugins(['eslint-plugin-better-tailwindcss']),\r\n settings: { 'better-tailwindcss': { entryPoint, rootFontSize } },\r\n overrides: [\r\n {\r\n files: files ?? [GLOB_JSX],\r\n rules: {\r\n 'better-tailwindcss/enforce-consistent-line-wrapping': ['error', { printWidth: 0 }],\r\n 'better-tailwindcss/enforce-canonical-classes': 'error',\r\n },\r\n },\r\n ],\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n// ============================================================================\r\n// Testing\r\n// ============================================================================\r\n\r\ninterface VitestOptions extends Partial<OxlintConfig> {\r\n files?: string[]\r\n}\r\n\r\n/** Vitest lint preset — native vitest plugin with test-file scoping. */\r\nexport function vitest(options?: VitestOptions): OxlintConfig {\r\n const { files, ...overrides } = options ?? {}\r\n\r\n return preset(\r\n {\r\n plugins: ['vitest'],\r\n settings: { vitest: { typecheck: true } },\r\n overrides: [\r\n {\r\n files: files ?? GLOB_TESTS,\r\n rules: {\r\n 'vitest/expect-expect': 'error',\r\n 'vitest/no-conditional-expect': 'error',\r\n 'vitest/no-identical-title': 'error',\r\n 'vitest/no-import-node-test': 'error',\r\n 'vitest/no-interpolation-in-snapshots': 'error',\r\n 'vitest/no-mocks-import': 'error',\r\n 'vitest/no-standalone-expect': 'error',\r\n 'vitest/valid-describe-callback': 'error',\r\n 'vitest/valid-expect': 'error',\r\n 'vitest/valid-title': 'error',\r\n 'vitest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],\r\n 'vitest/prefer-hooks-in-order': 'error',\r\n 'vitest/prefer-lowercase-title': 'error',\r\n 'vitest/no-disabled-tests': isInEditorEnv() ? 'warn' : 'error',\r\n 'vitest/no-focused-tests': isInEditorEnv() ? 'warn' : 'error',\r\n 'vitest/require-mock-type-parameters': 'off',\r\n 'no-console': 'off',\r\n 'unicorn/no-null': 'off',\r\n 'typescript/ban-ts-comment': 'off',\r\n },\r\n },\r\n ],\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n// ============================================================================\r\n// Backend / ORM\r\n// ============================================================================\r\n\r\n/** NestJS lint preset — @darraghor/eslint-plugin-nestjs-typed. */\r\nexport function nestjs(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n jsPlugins: resolvePlugins([\r\n { name: 'nestjs-typed', specifier: '@darraghor/eslint-plugin-nestjs-typed' },\r\n ]),\r\n rules: {\r\n 'nestjs-typed/injectable-should-be-provided': 'error',\r\n 'nestjs-typed/provided-injected-should-match-factory-parameters': 'error',\r\n 'nestjs-typed/use-injectable-provided-token': 'error',\r\n 'nestjs-typed/api-property-matches-property-optionality': 'error',\r\n 'nestjs-typed/controllers-should-supply-api-tags': 'error',\r\n 'nestjs-typed/api-method-should-specify-api-response': 'error',\r\n 'nestjs-typed/api-property-returning-array-should-set-array': 'error',\r\n 'nestjs-typed/api-property-should-have-api-extra-models': 'error',\r\n 'nestjs-typed/api-operation-summary-description-capitalized': 'error',\r\n 'nestjs-typed/param-decorator-name-matches-route-param': 'error',\r\n 'nestjs-typed/validate-nested-of-array-should-set-each': 'error',\r\n 'nestjs-typed/all-properties-are-whitelisted': 'error',\r\n 'nestjs-typed/no-duplicate-decorators': 'error',\r\n 'nestjs-typed/validation-pipe-should-use-forbid-unknown': 'error',\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n/** Drizzle ORM lint preset — eslint-plugin-drizzle. */\r\nexport function drizzle(overrides?: Partial<OxlintConfig>): OxlintConfig {\r\n return preset(\r\n {\r\n jsPlugins: resolvePlugins(['eslint-plugin-drizzle']),\r\n rules: {\r\n 'drizzle/enforce-delete-with-where': 'error',\r\n 'drizzle/enforce-update-with-where': 'error',\r\n },\r\n },\r\n overrides,\r\n )\r\n}\r\n\r\n// ============================================================================\r\n// Re-exports\r\n// ============================================================================\r\n\r\nexport { defineConfig } from 'oxlint'\r\nexport {\r\n GLOB_SRC,\r\n GLOB_JS,\r\n GLOB_TS,\r\n GLOB_JSX,\r\n GLOB_TESTS,\r\n GLOB_JSON,\r\n GLOB_MARKDOWN,\r\n} from './utils'"],"mappings":";;;;;;;;;AAQA,MAAM,MAAM,QAAQ;AAEpB,SAAS,OAAgB;CACvB,OAAO,CAAC,EACN,IAAI,SACJ,IAAI,6BACJ,IAAI,eACJ,IAAI,mBACJ,IAAI;AAER;AAEA,SAAS,2BAAoC;CAC3C,OACE,CAAC,EAAE,IAAI,iBAAiB,IAAI,0BAC5B,IAAI,uBAAuB,EAAE,WAAW,aAAa,MAAM;AAE/D;;;;;AAMA,SAAgB,gBAAyB;CACvC,IAAI,KAAK,GAAG,OAAO;CACnB,IAAI,yBAAyB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F,GACA,SACF;AACF;;AAOA,SAAgB,OAAO,WAAiD;CACtE,OAAO,OACL;EACE,WAAW,eAAe,CACxB;GAAE,MAAM;GAAgB,WAAW;EAAwC,CAC7E,CAAC;EACD,OAAO;GACL,8CAA8C;GAC9C,kEAAkE;GAClE,8CAA8C;GAC9C,0DAA0D;GAC1D,mDAAmD;GACnD,uDAAuD;GACvD,8DAA8D;GAC9D,0DAA0D;GAC1D,8DAA8D;GAC9D,yDAAyD;GACzD,yDAAyD;GACzD,+CAA+C;GAC/C,wCAAwC;GACxC,0DAA0D;EAC5D;CACF,GACA,SACF;AACF;;AAGA,SAAgB,QAAQ,WAAiD;CACvE,OAAO,OACL;EACE,WAAW,eAAe,CAAC,uBAAuB,CAAC;EACnD,OAAO;GACL,qCAAqC;GACrC,qCAAqC;EACvC;CACF,GACA,SACF;AACF"}
|
|
1
|
+
{"version":3,"file":"lint.mjs","names":["defineConfig"],"sources":["../src/utils.ts","../src/lint.ts"],"sourcesContent":["/**\n * Utility functions and constants\n */\n\n// ============================================================================\n// Environment detection\n// ============================================================================\n\nconst env = process.env\n\nfunction isCI(): boolean {\n return !!(\n env['CI'] ||\n env['CONTINUOUS_INTEGRATION'] ||\n env['BUILD_ID'] ||\n env['BUILD_NUMBER'] ||\n env['RUN_ID']\n )\n}\n\nfunction isInGitHooksOrLintStaged(): boolean {\n return (\n !!(env['GIT_PARAMS'] || env['VSCODE_GIT_COMMAND']) ||\n env['npm_lifecycle_script']?.startsWith('lint-staged') === true\n )\n}\n\n/**\n * Detects whether running in an editor environment.\n * Returns false in CI, Git Hooks, or lint-staged.\n */\nexport function isInEditorEnv(): boolean {\n if (isCI()) return false\n if (isInGitHooksOrLintStaged()) return false\n return !!(\n env['VSCODE_PID'] ||\n env['VSCODE_CWD'] ||\n env['JETBRAINS_IDE'] ||\n env['VIM'] ||\n env['NVIM']\n )\n}\n\n// ============================================================================\n// File matching patterns (Globs)\n// ============================================================================\n\n/** All JS/TS source files */\nexport const GLOB_SRC = '**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}'\n\n/** JavaScript files only */\nexport const GLOB_JS = '**/*.{js,mjs,cjs,jsx}'\n\n/** TypeScript files only */\nexport const GLOB_TS = '**/*.{ts,mts,cts,tsx}'\n\n/** JSX/TSX files (React-related) */\nexport const GLOB_JSX = '**/*.{jsx,tsx}'\n\n/** Test files */\nexport const GLOB_TESTS: string[] = [\n '**/*.{test,spec}.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',\n '**/__tests__/**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx}',\n]\n\n/** JSON files */\nexport const GLOB_JSON = '**/*.json'\n\n/** Markdown files */\nexport const GLOB_MARKDOWN = '**/*.md'\n","/**\n * Oxlint lint presets.\n *\n * Every preset is a function that accepts optional overrides, merged via `defu`.\n * User overrides take priority over preset defaults.\n *\n * @example\n * ```ts\n * // oxlint.config.ts\n * import { base, unicorn, react, tailwind, vitest } from '@hooshid/ox-config/lint'\n * import { defineConfig } from 'oxlint'\n *\n * export default defineConfig({\n * extends: [base(), unicorn(), react(), tailwind(), vitest()],\n * })\n * ```\n */\nimport { existsSync, readFileSync } from 'node:fs'\nimport { createRequire } from 'node:module'\nimport path from 'node:path'\n\nimport { defu } from 'defu'\nimport { defineConfig } from 'oxlint'\n\nimport { GLOB_JSX, GLOB_SRC, GLOB_TESTS, GLOB_TS, isInEditorEnv } from './utils'\n\nimport type { ExternalPluginEntry, OxlintConfig } from 'oxlint'\n\nconst require = createRequire(import.meta.url)\n\n// ============================================================================\n// Ignore patterns\n// ============================================================================\n\nconst DEFAULT_IGNORES: string[] = [\n '**/node_modules/**',\n '**/dist/**',\n '**/build/**',\n '**/out/**',\n '**/.next/**',\n '**/.cache/**',\n '**/.turbo/**',\n '**/.output/**',\n '**/.nitro/**',\n '**/.tanstack/**',\n '**/.vinxi/**',\n '**/.git/**',\n '**/public/**',\n '**/*.d.ts',\n]\n\nfunction loadGitignorePatterns(): string[] {\n const gitignoreFile = path.resolve(process.cwd(), '.gitignore')\n if (!existsSync(gitignoreFile)) return []\n\n return readFileSync(gitignoreFile, 'utf8')\n .split(/\\r?\\n/u)\n .map((line) => line.trim())\n .filter((line) => line && !line.startsWith('#'))\n .map((pattern) => {\n let p = pattern.trimEnd()\n if (p.startsWith('/')) p = p.slice(1)\n if (!p.includes('/') && !p.includes('*')) p = `**/${p}`\n if (p.endsWith('/')) p = `${p}**`\n return p\n })\n}\n\n// ============================================================================\n// Helpers\n// ============================================================================\n\nfunction preset(defaults: OxlintConfig, overrides?: Partial<OxlintConfig>): OxlintConfig {\n return defineConfig(defu(overrides ?? {}, defaults))\n}\n\nfunction resolvePlugin(name: string): string {\n try {\n return require.resolve(name)\n } catch {\n return name\n }\n}\n\nfunction resolvePlugins(plugins: ExternalPluginEntry[]): ExternalPluginEntry[] {\n return plugins.map((p) => {\n if (typeof p === 'string') return resolvePlugin(p)\n return { ...p, specifier: resolvePlugin(p.specifier) }\n })\n}\n\n// ============================================================================\n// Core\n// ============================================================================\n\n/**\n * Base lint preset — TypeScript + Import plugins, categories, env, ignores.\n * Always include first.\n */\nexport function base(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n plugins: ['typescript', 'import'],\n categories: {\n correctness: 'error',\n suspicious: 'error',\n perf: 'error',\n pedantic: 'warn',\n },\n rules: {\n 'no-await-in-loop': 'off',\n 'typescript/prefer-readonly-parameter-types': 'off',\n 'typescript/strict-boolean-expressions': 'off',\n 'max-lines': 'off',\n 'max-lines-per-function': 'off',\n 'no-inline-comments': 'off',\n 'no-warning-comments': 'off',\n 'import/max-dependencies': 'off',\n 'react/no-unescaped-entities': 'off',\n 'require-await': 'off',\n },\n env: {\n browser: true,\n node: true,\n es2026: true,\n builtin: true,\n },\n ignorePatterns: [...DEFAULT_IGNORES, ...loadGitignorePatterns()],\n overrides: [\n {\n files: [GLOB_TS],\n rules: {\n 'typescript/consistent-type-definitions': 'off',\n 'typescript/consistent-type-imports': 'error',\n 'no-unused-vars': 'off',\n 'typescript/array-type': 'error',\n 'typescript/consistent-generic-constructors': 'error',\n 'typescript/consistent-indexed-object-style': 'error',\n 'typescript/consistent-type-assertions': 'error',\n 'typescript/ban-tslint-comment': 'error',\n 'typescript/no-empty-interface': 'error',\n 'typescript/no-inferrable-types': 'error',\n 'typescript/prefer-for-of': 'error',\n 'typescript/prefer-function-type': 'error',\n 'typescript/unified-signatures': 'error',\n },\n },\n {\n files: [GLOB_SRC],\n rules: {\n 'import/no-unassigned-import': 'off',\n 'import/no-relative-parent-imports': 'error',\n 'import/first': 'error',\n 'import/no-duplicates': 'error',\n 'import/consistent-type-specifier-style': 'error',\n 'import/no-mutable-exports': 'error',\n 'import/no-named-default': 'error',\n },\n },\n {\n files: ['**/*.config.{ts,mts,cts,js,mjs,cjs}'],\n rules: {\n 'import/no-relative-parent-imports': 'off',\n },\n },\n {\n files: GLOB_TESTS,\n rules: {\n 'import/first': 'off',\n 'import/no-duplicates': 'off',\n 'import/consistent-type-specifier-style': 'off',\n 'unicorn/no-useless-undefined': 'off',\n 'typescript/no-empty-function': 'off',\n 'unicorn/prefer-string-replace-all': 'off',\n 'unicorn/no-array-callback-reference': 'off',\n 'unicorn/prefer-spread': 'off',\n 'typescript/no-non-null-assertion': 'off',\n 'no-magic-numbers': 'off',\n 'typescript/no-explicit-any': 'off',\n 'typescript/no-unsafe-assignment': 'off',\n 'typescript/no-unsafe-call': 'off',\n 'typescript/no-unsafe-member-access': 'off',\n 'typescript/no-unsafe-return': 'off',\n 'typescript/no-unsafe-argument': 'off',\n 'react/no-array-index-key': 'off',\n },\n },\n ],\n },\n overrides,\n )\n}\n\n/** Type-aware lint preset — enables 59 type-aware rules via tsgolint. */\nexport function typeAware(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n options: {\n typeAware: true,\n typeCheck: true,\n },\n },\n overrides,\n )\n}\n\n/** Unicorn lint preset — 100+ code quality rules. */\nexport function unicorn(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n plugins: ['unicorn'],\n rules: {\n 'unicorn/no-null': 'off',\n 'unicorn/filename-case': ['error', { case: 'kebabCase' }],\n 'unicorn/catch-error-name': 'error',\n 'unicorn/error-message': 'error',\n 'unicorn/prefer-optional-catch-binding': 'error',\n 'unicorn/no-zero-fractions': 'error',\n 'unicorn/number-literal-case': 'error',\n 'unicorn/numeric-separators-style': 'error',\n 'unicorn/prefer-includes': 'error',\n 'unicorn/prefer-spread': 'error',\n 'unicorn/prefer-ternary': 'error',\n 'unicorn/prefer-string-trim-start-end': 'error',\n 'unicorn/prefer-structured-clone': 'error',\n 'unicorn/prefer-default-parameters': 'error',\n 'unicorn/no-console-spaces': 'error',\n 'unicorn/throw-new-error': 'error',\n 'unicorn/require-array-join-separator': 'error',\n },\n },\n overrides,\n )\n}\n\n/** Dependency optimization — flags packages replaceable with native APIs. */\nexport function depend(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n jsPlugins: resolvePlugins(['eslint-plugin-depend']),\n rules: {\n 'depend/ban-dependencies': [\n 'error',\n {\n presets: ['native', 'microutilities', 'preferred'],\n modules: [],\n allowed: ['dotenv'],\n },\n ],\n },\n },\n overrides,\n )\n}\n\n// ============================================================================\n// Runtime environments\n// ============================================================================\n\n/** Node.js lint preset — native node plugin. */\nexport function node(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset({ plugins: ['node'] }, overrides)\n}\n\n/** Promise lint preset — native promise plugin. */\nexport function promise(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset({ plugins: ['promise'] }, overrides)\n}\n\n// ============================================================================\n// Frontend\n// ============================================================================\n\nconst reactStyleRules = {\n 'react/jsx-pascal-case': 'error',\n 'react/jsx-boolean-value': 'error',\n 'react/jsx-curly-brace-presence': 'error',\n 'react/jsx-fragments': 'error',\n 'react/self-closing-comp': 'error',\n 'react/hook-use-state': 'error',\n} as const\n\n/**\n * React lint preset — React + react-refresh (for Vite/TanStack Start).\n */\nexport function react(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n plugins: ['react'],\n jsPlugins: resolvePlugins(['eslint-plugin-react-refresh']),\n rules: {\n 'react/react-in-jsx-scope': 'off',\n ...reactStyleRules,\n },\n },\n overrides,\n )\n}\n\n/**\n * TanStack Router lint preset — loads @tanstack/eslint-plugin-router.\n * Covers route-param-names and create-route-property-order.\n */\nexport function tanstackRouter(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n jsPlugins: resolvePlugins([\n { name: 'tanstack-router', specifier: '@tanstack/eslint-plugin-router' },\n ]),\n rules: {\n 'tanstack-router/route-param-names': 'error',\n 'tanstack-router/create-route-property-order': 'error',\n },\n },\n overrides,\n )\n}\n\n// ============================================================================\n// Tailwind\n// ============================================================================\n\ninterface TailwindOptions extends Partial<OxlintConfig> {\n entryPoint?: string\n rootFontSize?: number\n /** File glob patterns for tailwind rules. @default GLOB_JSX */\n files?: string[]\n}\n\n/** Tailwind CSS lint preset — eslint-plugin-better-tailwindcss. */\nexport function tailwind(options: TailwindOptions = {}): OxlintConfig {\n const { entryPoint = 'src/styles/globals.css', rootFontSize = 16, files, ...overrides } = options\n\n return preset(\n {\n jsPlugins: resolvePlugins(['eslint-plugin-better-tailwindcss']),\n settings: { 'better-tailwindcss': { entryPoint, rootFontSize } },\n overrides: [\n {\n files: files ?? [GLOB_JSX],\n rules: {\n 'better-tailwindcss/enforce-consistent-line-wrapping': ['error', { printWidth: 0 }],\n 'better-tailwindcss/enforce-canonical-classes': 'error',\n },\n },\n ],\n },\n overrides,\n )\n}\n\n// ============================================================================\n// Testing\n// ============================================================================\n\ninterface VitestOptions extends Partial<OxlintConfig> {\n files?: string[]\n}\n\n/** Vitest lint preset — native vitest plugin with test-file scoping. */\nexport function vitest(options?: VitestOptions): OxlintConfig {\n const { files, ...overrides } = options ?? {}\n\n return preset(\n {\n plugins: ['vitest'],\n settings: { vitest: { typecheck: true } },\n overrides: [\n {\n files: files ?? GLOB_TESTS,\n rules: {\n 'vitest/expect-expect': 'error',\n 'vitest/no-conditional-expect': 'error',\n 'vitest/no-identical-title': 'error',\n 'vitest/no-import-node-test': 'error',\n 'vitest/no-interpolation-in-snapshots': 'error',\n 'vitest/no-mocks-import': 'error',\n 'vitest/no-standalone-expect': 'error',\n 'vitest/valid-describe-callback': 'error',\n 'vitest/valid-expect': 'error',\n 'vitest/valid-title': 'error',\n 'vitest/consistent-test-it': ['error', { fn: 'it', withinDescribe: 'it' }],\n 'vitest/prefer-hooks-in-order': 'error',\n 'vitest/prefer-lowercase-title': 'error',\n 'vitest/no-disabled-tests': isInEditorEnv() ? 'warn' : 'error',\n 'vitest/no-focused-tests': isInEditorEnv() ? 'warn' : 'error',\n 'vitest/require-mock-type-parameters': 'off',\n 'no-console': 'off',\n 'unicorn/no-null': 'off',\n 'typescript/ban-ts-comment': 'off',\n },\n },\n ],\n },\n overrides,\n )\n}\n\n// ============================================================================\n// Backend / ORM\n// ============================================================================\n\n/** NestJS lint preset — @darraghor/eslint-plugin-nestjs-typed. */\nexport function nestjs(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n jsPlugins: resolvePlugins([\n { name: 'nestjs-typed', specifier: '@darraghor/eslint-plugin-nestjs-typed' },\n ]),\n rules: {\n 'nestjs-typed/injectable-should-be-provided': 'error',\n 'nestjs-typed/provided-injected-should-match-factory-parameters': 'error',\n 'nestjs-typed/use-injectable-provided-token': 'error',\n 'nestjs-typed/api-property-matches-property-optionality': 'error',\n 'nestjs-typed/controllers-should-supply-api-tags': 'error',\n 'nestjs-typed/api-method-should-specify-api-response': 'error',\n 'nestjs-typed/api-property-returning-array-should-set-array': 'error',\n 'nestjs-typed/api-property-should-have-api-extra-models': 'error',\n 'nestjs-typed/api-operation-summary-description-capitalized': 'error',\n 'nestjs-typed/param-decorator-name-matches-route-param': 'error',\n 'nestjs-typed/validate-nested-of-array-should-set-each': 'error',\n 'nestjs-typed/all-properties-are-whitelisted': 'error',\n 'nestjs-typed/no-duplicate-decorators': 'error',\n 'nestjs-typed/validation-pipe-should-use-forbid-unknown': 'error',\n },\n },\n overrides,\n )\n}\n\n/** Drizzle ORM lint preset — eslint-plugin-drizzle. */\nexport function drizzle(overrides?: Partial<OxlintConfig>): OxlintConfig {\n return preset(\n {\n jsPlugins: resolvePlugins(['eslint-plugin-drizzle']),\n rules: {\n 'drizzle/enforce-delete-with-where': 'error',\n 'drizzle/enforce-update-with-where': 'error',\n },\n },\n overrides,\n )\n}\n\n// ============================================================================\n// Re-exports\n// ============================================================================\n\nexport { defineConfig } from 'oxlint'\nexport { GLOB_SRC, GLOB_JS, GLOB_TS, GLOB_JSX, GLOB_TESTS, GLOB_JSON, GLOB_MARKDOWN } from './utils'\n"],"mappings":";;;;;;;;;AAQA,MAAM,MAAM,QAAQ;AAEpB,SAAS,OAAgB;CACvB,OAAO,CAAC,EACN,IAAI,SACJ,IAAI,6BACJ,IAAI,eACJ,IAAI,mBACJ,IAAI;AAER;AAEA,SAAS,2BAAoC;CAC3C,OACE,CAAC,EAAE,IAAI,iBAAiB,IAAI,0BAC5B,IAAI,uBAAuB,EAAE,WAAW,aAAa,MAAM;AAE/D;;;;;AAMA,SAAgB,gBAAyB;CACvC,IAAI,KAAK,GAAG,OAAO;CACnB,IAAI,yBAAyB,GAAG,OAAO;CACvC,OAAO,CAAC,EACN,IAAI,iBACJ,IAAI,iBACJ,IAAI,oBACJ,IAAI,UACJ,IAAI;AAER;;AAOA,MAAa,WAAW;;AAGxB,MAAa,UAAU;;AAGvB,MAAa,UAAU;;AAGvB,MAAa,WAAW;;AAGxB,MAAa,aAAuB,CAClC,oDACA,mDACF;;AAGA,MAAa,YAAY;;AAGzB,MAAa,gBAAgB;;;;;;;;;;;;;;;;;;;;ACzC7B,MAAM,UAAU,cAAc,YAAY,GAAG;AAM7C,MAAM,kBAA4B;CAChC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAEA,SAAS,wBAAkC;CACzC,MAAM,g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B,CAAC;EACnD,OAAO;GACL,qCAAqC;GACrC,qCAAqC;EACvC;CACF,GACA,SACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hooshid/ox-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared Oxlint + Oxfmt presets — one install for lint and format.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"config",
|
|
7
|
+
"format",
|
|
8
|
+
"lint",
|
|
9
|
+
"oxfmt",
|
|
10
|
+
"oxlint",
|
|
11
|
+
"preset"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/hooshid/ox-config#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/hooshid/ox-config/issues"
|
|
16
|
+
},
|
|
5
17
|
"license": "MIT",
|
|
6
18
|
"author": "hooshid",
|
|
7
19
|
"repository": {
|
|
8
20
|
"type": "git",
|
|
9
21
|
"url": "git+https://github.com/hooshid/ox-config.git"
|
|
10
22
|
},
|
|
11
|
-
"homepage": "https://github.com/hooshid/ox-config#readme",
|
|
12
|
-
"bugs": {
|
|
13
|
-
"url": "https://github.com/hooshid/ox-config/issues"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"oxlint",
|
|
17
|
-
"oxfmt",
|
|
18
|
-
"lint",
|
|
19
|
-
"format",
|
|
20
|
-
"preset",
|
|
21
|
-
"config"
|
|
22
|
-
],
|
|
23
23
|
"files": [
|
|
24
24
|
"dist"
|
|
25
25
|
],
|
|
@@ -38,20 +38,6 @@
|
|
|
38
38
|
"publishConfig": {
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"build": "tsdown",
|
|
43
|
-
"dev": "tsdown --watch",
|
|
44
|
-
"lint": "oxlint .",
|
|
45
|
-
"lint:fix": "oxlint . --fix",
|
|
46
|
-
"format": "oxfmt .",
|
|
47
|
-
"format:check": "oxfmt --check .",
|
|
48
|
-
"typecheck": "tsc --noEmit",
|
|
49
|
-
"changeset": "changeset",
|
|
50
|
-
"changeset:version": "changeset version",
|
|
51
|
-
"changeset:publish": "changeset publish",
|
|
52
|
-
"changeset:release": "pnpm build && changeset publish",
|
|
53
|
-
"prepublishOnly": "pnpm build"
|
|
54
|
-
},
|
|
55
41
|
"dependencies": {
|
|
56
42
|
"@darraghor/eslint-plugin-nestjs-typed": "^7.5.6",
|
|
57
43
|
"@tanstack/eslint-plugin-router": "^1.162.0",
|
|
@@ -77,5 +63,18 @@
|
|
|
77
63
|
},
|
|
78
64
|
"engines": {
|
|
79
65
|
"node": ">=20"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsdown",
|
|
69
|
+
"dev": "tsdown --watch",
|
|
70
|
+
"lint": "oxlint .",
|
|
71
|
+
"lint:fix": "oxlint . --fix",
|
|
72
|
+
"format": "oxfmt .",
|
|
73
|
+
"format:check": "oxfmt --check .",
|
|
74
|
+
"typecheck": "tsc --noEmit",
|
|
75
|
+
"changeset": "changeset",
|
|
76
|
+
"changeset:version": "changeset version",
|
|
77
|
+
"changeset:publish": "changeset publish",
|
|
78
|
+
"changeset:release": "pnpm build && changeset publish"
|
|
80
79
|
}
|
|
81
80
|
}
|