@evomark/oxlint-config
v1.0.0
Published
Shared oxlint and oxfmt configuration for Evomark projects
Readme
@evomark/oxlint-config
Shared oxlint and oxfmt config for Evomark projects.
oxlint
// oxlint.config.ts
import { defineEvoConfig } from '@evomark/oxlint-config';
import { autoImportGlobals, laravelIgnorePatterns } from '@evomark/oxlint-config/globals';
import AutoImportJson from './eslint-auto-import.json' with { type: 'json' };
export default defineEvoConfig({
globals: autoImportGlobals(AutoImportJson),
ignorePatterns: laravelIgnorePatterns,
});Oxlint only inherits rules, plugins and overrides through extends
(nested config docs). defineEvoConfig() therefore adds the
shared rules and plugins via extends, and applies categories, env and the Vue <script setup> macro globals directly. Anything
you pass is applied on top, and your globals are merged with the macros.
If you'd rather write the config by hand, extends: [base] (the default export) gives you only the rules and plugins. You then need
to set categories, env and the macro globals (vueMacroGlobals) yourself - see settings.
Auto-import globals and ignore patterns are project specific, so they are not part of the shared config.
oxfmt
oxfmt has no extends, so spread the shared options into your own config:
// oxfmt.config.ts
import { defineConfig } from 'oxfmt';
import evo from '@evomark/oxlint-config/oxfmt';
export default defineConfig({
...evo,
sortTailwindcss: { ...evo.sortTailwindcss, stylesheet: './resources/css/app.css' },
ignorePatterns: ['resources/js/ziggy.js'],
});