@maprox/lint-config 0.0.0-stage → 1.0.1

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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 sunsay
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 CHANGED
@@ -1,3 +1,141 @@
1
- # Temporary Holding Version
1
+ # @maprox/lint-config
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared ESLint flat configs for maprox (and related) projects, plus an experimental Oxlint base.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install --save-dev @maprox/lint-config
9
+ ```
10
+
11
+ Install peers for the preset you use (`eslint`, `typescript`, and for Vue also `@nuxt/eslint-config`, for Astro also `eslint-plugin-astro`, etc.).
12
+
13
+ ## Usage
14
+
15
+ ### Base (TS/JS)
16
+
17
+ ```js
18
+ export { default } from '@maprox/lint-config'
19
+ ```
20
+
21
+ ### Vue / Nuxt
22
+
23
+ Prefer a one-liner. Non-Vue rules (style, imports, TS, relative-import ban) live in **base**; `./vue` only adds Vue SFC rules. No Tailwind checks unless you opt in.
24
+
25
+ ```js
26
+ export { default } from '@maprox/lint-config/vue'
27
+ ```
28
+
29
+ Optional project overrides only when truly necessary:
30
+
31
+ ```js
32
+ import maproxVue from '@maprox/lint-config/vue'
33
+
34
+ export default maproxVue.append([
35
+ {
36
+ rules: {
37
+ // rare project-only exceptions
38
+ },
39
+ },
40
+ ])
41
+ ```
42
+
43
+ ### Tailwind CSS v4 (opt-in)
44
+
45
+ Projects without Tailwind should **not** import this. Without a real CSS entry the plugin errors / false-positives on ordinary classes.
46
+
47
+ Install optional peers: `eslint-plugin-tailwindcss@4` and `tailwindcss@4` (Node >= 20.19).
48
+
49
+ ```js
50
+ import maproxVue from '@maprox/lint-config/vue'
51
+ import tailwind from '@maprox/lint-config/tailwind'
52
+
53
+ export default maproxVue.append([
54
+ ...tailwind({
55
+ // CSS entry with `@import "tailwindcss"` — not tailwind.config.ts
56
+ cssConfigPath: 'app/assets/css/main.css',
57
+ }),
58
+ ])
59
+ ```
60
+
61
+ With a flat array preset (Astro / base):
62
+
63
+ ```js
64
+ import maproxAstro from '@maprox/lint-config/astro'
65
+ import tailwind from '@maprox/lint-config/tailwind'
66
+
67
+ export default [
68
+ ...maproxAstro,
69
+ ...tailwind({ cssConfigPath: 'src/styles/global.css' }),
70
+ ]
71
+ ```
72
+
73
+ Only `classnames-order` is on by default (`warn`, autofixable). Noisy rules such as `no-custom-classname` stay off unless you enable them yourself. Do **not** use `prettier-plugin-tailwindcss` alongside it.
74
+
75
+ ### Astro
76
+
77
+ ```js
78
+ import maproxAstro from '@maprox/lint-config/astro'
79
+
80
+ export default maproxAstro
81
+ ```
82
+
83
+ ### Node / scripts
84
+
85
+ ```js
86
+ export { default } from '@maprox/lint-config/node'
87
+ ```
88
+
89
+ ### Custom relative-import message
90
+
91
+ Base (and thus `./vue`, `./node`, `./astro`) bans relative imports with Nuxt-style alias guidance. To customize the message:
92
+
93
+ ```js
94
+ import maproxVue from '@maprox/lint-config/vue'
95
+ import { noRelativeImports } from '@maprox/lint-config/no-relative-imports'
96
+
97
+ export default maproxVue.append([
98
+ noRelativeImports({ message: 'Use your aliases…' }),
99
+ ])
100
+ ```
101
+
102
+ ### Oxlint (experimental)
103
+
104
+ ```ts
105
+ import { defineConfig } from 'oxlint'
106
+ import base from '@maprox/lint-config/oxlint'
107
+
108
+ export default defineConfig({
109
+ extends: [base],
110
+ })
111
+ ```
112
+
113
+ Vue stays on the ESLint `./vue` preset for now.
114
+
115
+ ## What is included
116
+
117
+ - **Base / portable:** `@stylistic`, import order (`import-x` + `import-newlines`), TS strictness, type-aware rules for `*.ts`, relative-import ban, `curly` / `no-console`, etc. Enums are PascalCase with `UPPER_CASE` members. Boolean variables and parameters are PascalCase with a prefix of `is`, `should`, `has`, `can`, `did`, or `will` (`isReady`, `hasError`). Needs a usable `tsconfig.json` (`project: true`).
118
+ - **Vue:** `createConfigForNuxt` + portable layer + Vue SFC-only rules; type-aware rules also cover `.vue` `<script>` (`extraFileExtensions`).
119
+ - **Astro / Node:** extend base with their parsers/globals.
120
+ - **Tailwind (opt-in `./tailwind`):** `eslint-plugin-tailwindcss@4` `classnames-order` + required `cssConfigPath`.
121
+
122
+ Prefer either the package stylistic rules **or** Prettier at full strength — not both.
123
+
124
+ ## Requirements
125
+
126
+ - ESLint 9+ (flat config)
127
+ - Node.js 18+ (Tailwind layer: Node.js 20.19+)
128
+ - TypeScript project with `tsconfig.json` for type-aware rules in base / vue
129
+ - Tailwind CSS 4.x only when using `./tailwind`
130
+
131
+ ## Key dependencies
132
+
133
+ - `@nuxt/eslint-config` (peer, Vue preset)
134
+ - `typescript-eslint`, `@eslint/js`, `globals`
135
+ - `@stylistic/eslint-plugin`, `eslint-plugin-import-x`, `eslint-plugin-import-newlines` (dependencies, base)
136
+ - `eslint-plugin-astro` (optional peer, Astro preset)
137
+ - `eslint-plugin-tailwindcss`, `tailwindcss` (optional peers, `./tailwind` only)
138
+
139
+ ## License
140
+
141
+ MIT
package/package.json CHANGED
@@ -1,6 +1,99 @@
1
1
  {
2
2
  "name": "@maprox/lint-config",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "description": "Shared ESLint flat configs (base, vue, astro, node, opt-in tailwind) + oxlint skeleton",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "author": "maprox",
8
+ "keywords": [
9
+ "eslint",
10
+ "eslint-config",
11
+ "flat-config",
12
+ "typescript",
13
+ "vue",
14
+ "nuxt",
15
+ "astro",
16
+ "tailwind",
17
+ "oxlint"
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://git.primne.com/sunsay/eslint-config.git"
22
+ },
23
+ "homepage": "https://git.primne.com/sunsay/eslint-config",
24
+ "bugs": {
25
+ "url": "https://git.primne.com/sunsay/eslint-config/issues"
26
+ },
27
+ "publishConfig": {
28
+ "access": "public",
29
+ "registry": "https://registry.npmjs.org/"
30
+ },
31
+ "sideEffects": false,
32
+ "exports": {
33
+ ".": "./src/eslint/index.js",
34
+ "./vue": "./src/eslint/vue.js",
35
+ "./astro": "./src/eslint/astro.js",
36
+ "./node": "./src/eslint/node.js",
37
+ "./tailwind": "./src/eslint/tailwind.js",
38
+ "./no-relative-imports": "./src/eslint/no-relative-imports.js",
39
+ "./oxlint": "./src/oxlint/index.js",
40
+ "./oxlint/base": "./src/oxlint/base.js"
41
+ },
42
+ "files": [
43
+ "src",
44
+ "README.md",
45
+ "LICENSE"
46
+ ],
47
+ "engines": {
48
+ "node": ">=18"
49
+ },
50
+ "scripts": {
51
+ "test": "node scripts/smoke.mjs",
52
+ "pack:check": "npm pack --dry-run"
53
+ },
54
+ "peerDependencies": {
55
+ "@eslint/js": "^9.0.0 || ^10.0.0",
56
+ "@nuxt/eslint-config": "^1.0.0",
57
+ "eslint": "^9.0.0 || ^10.0.0",
58
+ "eslint-plugin-astro": "^1.0.0",
59
+ "eslint-plugin-tailwindcss": "^4.4.0",
60
+ "globals": "^15.0.0 || ^16.0.0 || ^17.0.0",
61
+ "oxlint": ">=0.15.0",
62
+ "tailwindcss": "^4.0.0",
63
+ "typescript": ">=5.0.0",
64
+ "typescript-eslint": "^8.0.0"
65
+ },
66
+ "peerDependenciesMeta": {
67
+ "@nuxt/eslint-config": {
68
+ "optional": true
69
+ },
70
+ "eslint-plugin-astro": {
71
+ "optional": true
72
+ },
73
+ "eslint-plugin-tailwindcss": {
74
+ "optional": true
75
+ },
76
+ "oxlint": {
77
+ "optional": true
78
+ },
79
+ "tailwindcss": {
80
+ "optional": true
81
+ }
82
+ },
83
+ "dependencies": {
84
+ "@stylistic/eslint-plugin": "^5.0.0",
85
+ "eslint-plugin-import-newlines": "^2.0.0",
86
+ "eslint-plugin-import-x": "^4.16.0"
87
+ },
88
+ "devDependencies": {
89
+ "@eslint/js": "^10.0.1",
90
+ "@nuxt/eslint-config": "^1.16.0",
91
+ "eslint": "^10.5.0",
92
+ "eslint-plugin-astro": "^1.7.0",
93
+ "eslint-plugin-tailwindcss": "^4.4.0",
94
+ "globals": "^17.7.0",
95
+ "tailwindcss": "^4.1.14",
96
+ "typescript": "^5.9.0",
97
+ "typescript-eslint": "^8.62.0"
98
+ }
99
+ }
@@ -0,0 +1,11 @@
1
+ import eslintPluginAstro from 'eslint-plugin-astro'
2
+ import base from './base.js'
3
+
4
+ /**
5
+ * Astro preset: base + eslint-plugin-astro recommended.
6
+ * Tailwind class sorting is opt-in via `@maprox/lint-config/tailwind`.
7
+ */
8
+ export default [
9
+ ...base,
10
+ ...eslintPluginAstro.configs['flat/recommended'],
11
+ ]
@@ -0,0 +1,27 @@
1
+ import eslint from '@eslint/js'
2
+ import globals from 'globals'
3
+ import tseslint from 'typescript-eslint'
4
+ import { portableOverrides } from './portable.js'
5
+
6
+ export default [
7
+ {
8
+ ignores: [
9
+ '**/dist/**',
10
+ '**/node_modules/**',
11
+ '**/.nuxt/**',
12
+ '**/.astro/**',
13
+ '**/.output/**',
14
+ ],
15
+ },
16
+ eslint.configs.recommended,
17
+ ...tseslint.configs.recommended,
18
+ {
19
+ languageOptions: {
20
+ globals: {
21
+ ...globals.browser,
22
+ ...globals.node,
23
+ },
24
+ },
25
+ },
26
+ ...portableOverrides,
27
+ ]
@@ -0,0 +1 @@
1
+ export { default } from './base.js'
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Project-specific ban on relative imports (aliases differ per repo).
3
+ *
4
+ * @param {{ message?: string, patterns?: string[] }} [options]
5
+ * @returns {import('eslint').Linter.Config}
6
+ */
7
+ export function noRelativeImports({
8
+ message = 'Relative imports are forbidden. Use path aliases.',
9
+ patterns = ['./*', './**', '../*', '../**'],
10
+ } = {}) {
11
+ return {
12
+ rules: {
13
+ 'no-restricted-imports': [
14
+ 'error',
15
+ {
16
+ patterns: [
17
+ {
18
+ group: patterns,
19
+ message,
20
+ },
21
+ ],
22
+ },
23
+ ],
24
+ },
25
+ }
26
+ }
@@ -0,0 +1,13 @@
1
+ import globals from 'globals'
2
+ import base from './base.js'
3
+
4
+ export default [
5
+ ...base,
6
+ {
7
+ languageOptions: {
8
+ globals: {
9
+ ...globals.node,
10
+ },
11
+ },
12
+ },
13
+ ]
@@ -0,0 +1,168 @@
1
+ import stylistic from '@stylistic/eslint-plugin'
2
+ import importX from 'eslint-plugin-import-x'
3
+ import importNewlines from 'eslint-plugin-import-newlines'
4
+ import tseslint from 'typescript-eslint'
5
+ import { noRelativeImports } from './no-relative-imports.js'
6
+
7
+ /** Type-aware TS rules shared by base (`*.ts`) and vue (`*.vue` scripts). */
8
+ export const typeAwareTsRules = {
9
+ '@typescript-eslint/no-import-type-side-effects': 'error',
10
+ '@typescript-eslint/no-useless-constructor': 'warn',
11
+ '@typescript-eslint/consistent-type-imports': [
12
+ 'error',
13
+ { prefer: 'type-imports' },
14
+ ],
15
+ '@typescript-eslint/naming-convention': [
16
+ 'error',
17
+ {
18
+ selector: 'enum',
19
+ format: ['PascalCase'],
20
+ },
21
+ {
22
+ selector: 'enumMember',
23
+ format: ['UPPER_CASE'],
24
+ },
25
+ {
26
+ selector: ['variable', 'parameter'],
27
+ types: ['boolean'],
28
+ format: ['PascalCase'],
29
+ prefix: ['is', 'should', 'has', 'can', 'did', 'will'],
30
+ },
31
+ ],
32
+ '@stylistic/member-delimiter-style': [
33
+ 'error',
34
+ {
35
+ multiline: {
36
+ delimiter: 'none',
37
+ requireLast: false,
38
+ },
39
+ singleline: {
40
+ delimiter: 'comma',
41
+ requireLast: false,
42
+ },
43
+ },
44
+ ],
45
+ }
46
+
47
+ /**
48
+ * Shared non-Vue overrides used by `base` and layered onto Nuxt in `vue`.
49
+ * Does not include @eslint/js / typescript-eslint recommended (those come from
50
+ * base itself or from createConfigForNuxt).
51
+ */
52
+ export const portableOverrides = [
53
+ {
54
+ ignores: [
55
+ '.history/**',
56
+ '**/generated/**',
57
+ 'src/infra/http/generated/**',
58
+ ],
59
+ },
60
+ {
61
+ plugins: {
62
+ '@stylistic': stylistic,
63
+ import: importX,
64
+ 'import-newlines': importNewlines,
65
+ },
66
+ rules: {
67
+ '@typescript-eslint/no-explicit-any': 'error',
68
+ '@typescript-eslint/no-unused-vars': [
69
+ 'warn',
70
+ { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
71
+ ],
72
+ '@typescript-eslint/no-dynamic-delete': 'off',
73
+ '@typescript-eslint/no-invalid-void-type': 'off',
74
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
75
+ '@typescript-eslint/prefer-literal-enum-member': 'off',
76
+ '@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
77
+ '@stylistic/brace-style': ['error', '1tbs'],
78
+ '@stylistic/comma-dangle': ['error', 'always-multiline'],
79
+ '@stylistic/indent': ['error', 2],
80
+ '@stylistic/max-len': ['warn', { code: 120 }],
81
+ '@stylistic/operator-linebreak': [
82
+ 'error',
83
+ 'after',
84
+ {
85
+ overrides: {
86
+ '?': 'before',
87
+ ':': 'before',
88
+ },
89
+ },
90
+ ],
91
+ '@stylistic/padding-line-between-statements': [
92
+ 'error',
93
+ {
94
+ blankLine: 'always',
95
+ prev: '*',
96
+ next: 'return',
97
+ },
98
+ ],
99
+ '@stylistic/quote-props': ['error', 'as-needed'],
100
+ 'import/order': [
101
+ 'error',
102
+ {
103
+ groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'],
104
+ alphabetize: { order: 'asc', caseInsensitive: true },
105
+ 'newlines-between': 'always',
106
+ },
107
+ ],
108
+ 'import/named': 'off',
109
+ 'import-newlines/enforce': ['warn', { items: 5, 'max-len': 120 }],
110
+ 'no-console': 'error',
111
+ 'no-constant-condition': ['error', { checkLoops: 'none' }],
112
+ 'no-lonely-if': 'error',
113
+ 'no-useless-constructor': 'off',
114
+ 'nonblock-statement-body-position': ['error', 'below'],
115
+ 'space-before-function-paren': [
116
+ 'error',
117
+ {
118
+ anonymous: 'always',
119
+ named: 'never',
120
+ asyncArrow: 'always',
121
+ },
122
+ ],
123
+ 'switch-colon-spacing': ['error', { after: true, before: false }],
124
+ curly: 'error',
125
+ },
126
+ },
127
+ {
128
+ files: ['**/*.{ts,tsx,mts,cts}'],
129
+ languageOptions: {
130
+ parserOptions: {
131
+ project: true,
132
+ },
133
+ },
134
+ rules: typeAwareTsRules,
135
+ },
136
+ noRelativeImports({
137
+ message:
138
+ 'Relative imports are forbidden. Use path aliases (~, ~~, #domain, #application, #infra, #mocks, #app, #components).',
139
+ }),
140
+ {
141
+ files: ['eslint.config.*', '**/eslint.config.*'],
142
+ rules: {
143
+ 'no-restricted-imports': 'off',
144
+ },
145
+ },
146
+ ...tseslint.config({
147
+ files: [
148
+ 'tailwind.config.ts',
149
+ 'vitest.config.ts',
150
+ 'nuxt.config.ts',
151
+ '**/tailwind.config.ts',
152
+ '**/vitest.config.ts',
153
+ '**/nuxt.config.ts',
154
+ ],
155
+ extends: [tseslint.configs.disableTypeChecked],
156
+ }),
157
+ {
158
+ files: [
159
+ 'tests/e2e/scripts/**',
160
+ 'scripts/**',
161
+ 'ci/**',
162
+ '**/notify-hermes-ci-failure.mjs',
163
+ ],
164
+ rules: {
165
+ 'no-console': 'off',
166
+ },
167
+ },
168
+ ]
@@ -0,0 +1,34 @@
1
+ import tailwindcss from 'eslint-plugin-tailwindcss'
2
+
3
+ /**
4
+ * Opt-in Tailwind CSS v4 ESLint layer (`eslint-plugin-tailwindcss@4`).
5
+ * Compose with `./vue`, `./astro`, or `./` — do not bake into those presets.
6
+ *
7
+ * @param {{ cssConfigPath: string }} options
8
+ * `cssConfigPath` — path to the CSS entry with `@import "tailwindcss"`
9
+ * (not a JS/TS Tailwind config). Absolute or project-relative.
10
+ * @returns {import('eslint').Linter.Config[]}
11
+ */
12
+ export default function tailwind(options = {}) {
13
+ const cssConfigPath = options.cssConfigPath
14
+ if (!cssConfigPath || typeof cssConfigPath !== 'string') {
15
+ throw new Error(
16
+ '@maprox/lint-config/tailwind: cssConfigPath is required (CSS entry with `@import "tailwindcss"`)',
17
+ )
18
+ }
19
+
20
+ return [
21
+ {
22
+ plugins: { tailwindcss },
23
+ settings: {
24
+ tailwindcss: {
25
+ cssConfigPath,
26
+ },
27
+ },
28
+ rules: {
29
+ // Only class sorting by default — leave noisy rules like no-custom-classname off.
30
+ 'tailwindcss/classnames-order': 'warn',
31
+ },
32
+ },
33
+ ]
34
+ }
@@ -0,0 +1,85 @@
1
+ import { createConfigForNuxt } from '@nuxt/eslint-config'
2
+ import { portableOverrides, typeAwareTsRules } from './portable.js'
3
+
4
+ /**
5
+ * Nuxt/Vue preset: createConfigForNuxt + shared portable rules + Vue SFC only.
6
+ * Tailwind class sorting is opt-in via `@maprox/lint-config/tailwind`.
7
+ */
8
+ export default createConfigForNuxt({
9
+ features: {
10
+ tooling: {
11
+ regexp: false,
12
+ jsdoc: false,
13
+ },
14
+ typescript: {
15
+ strict: true,
16
+ },
17
+ vue: true,
18
+ stylistic: true,
19
+ },
20
+ }).append([
21
+ ...portableOverrides,
22
+ {
23
+ rules: {
24
+ // Nuxt tooling enables unicorn; tone down noisy defaults.
25
+ 'unicorn/no-new-array': 'off',
26
+ 'unicorn/prefer-dom-node-text-content': 'off',
27
+ 'unicorn/prefer-node-protocol': 'off',
28
+ 'unicorn/prefer-number-properties': 'off',
29
+ 'vue/block-lang': [
30
+ 'error',
31
+ {
32
+ script: {
33
+ lang: ['ts', 'tsx'],
34
+ },
35
+ },
36
+ ],
37
+ 'vue/block-order': [
38
+ 'error',
39
+ {
40
+ order: ['script', 'template', 'style'],
41
+ },
42
+ ],
43
+ 'vue/comma-dangle': ['error', 'always-multiline'],
44
+ 'vue/html-self-closing': [
45
+ 'warn',
46
+ {
47
+ html: {
48
+ void: 'always',
49
+ normal: 'always',
50
+ component: 'always',
51
+ },
52
+ svg: 'always',
53
+ },
54
+ ],
55
+ 'vue/max-attributes-per-line': [
56
+ 'error',
57
+ {
58
+ singleline: 2,
59
+ multiline: 1,
60
+ },
61
+ ],
62
+ 'vue/multi-word-component-names': 'off',
63
+ 'vue/mustache-interpolation-spacing': ['error', 'always'],
64
+ 'vue/no-dupe-keys': 'off',
65
+ 'vue/no-multiple-template-root': 'off',
66
+ 'vue/no-root-v-if': 'error',
67
+ 'vue/no-v-html': 'off',
68
+ 'vue/object-curly-spacing': ['error', 'always'],
69
+ 'vue/padding-line-between-tags': 'error',
70
+ 'vue/require-default-prop': 'off',
71
+ 'vue/return-in-computed-property': 'off',
72
+ 'vue/space-in-parens': ['error', 'never'],
73
+ },
74
+ },
75
+ {
76
+ files: ['**/*.{ts,tsx,vue}'],
77
+ languageOptions: {
78
+ parserOptions: {
79
+ project: true,
80
+ extraFileExtensions: ['.vue'],
81
+ },
82
+ },
83
+ rules: typeAwareTsRules,
84
+ },
85
+ ])
@@ -0,0 +1,16 @@
1
+ # Oxlint track (experimental)
2
+
3
+ Shared portable rules for [Oxlint](https://oxc.rs/docs/guide/usage/linter). Vue/Nuxt projects should keep using `@maprox/lint-config/vue` until Oxlint Vue support is solid.
4
+
5
+ ## Usage
6
+
7
+ ```ts
8
+ import { defineConfig } from 'oxlint'
9
+ import base from '@maprox/lint-config/oxlint'
10
+
11
+ export default defineConfig({
12
+ extends: [base],
13
+ })
14
+ ```
15
+
16
+ Oxlint shares configs via `extends` (imported objects in `oxlint.config.ts`), not ESLint flat-config arrays.
@@ -0,0 +1,15 @@
1
+ /** @type {Record<string, unknown>} */
2
+ const base = {
3
+ plugins: ['typescript', 'unicorn', 'oxc'],
4
+ categories: {
5
+ correctness: 'error',
6
+ },
7
+ rules: {
8
+ 'typescript/no-explicit-any': 'error',
9
+ 'eslint/no-console': 'error',
10
+ 'eslint/curly': 'error',
11
+ },
12
+ ignorePatterns: ['**/dist/**', '**/node_modules/**'],
13
+ }
14
+
15
+ export default base
@@ -0,0 +1 @@
1
+ export { default } from './base.js'