@alleyinteractive/oxlint-config
v0.2.1
Published
Alley's custom Oxlint and Oxfmt shareable configuration with linting and formatting
Readme
Alley's Oxlint/Oxfmt Configuration(s)
Alley's shared Oxlint and Oxfmt configuration for linting and formatting JavaScript, TypeScript, React, and JSX/TSX.
Releases
This package adheres to semantic versioning and is released on https://www.npmjs.com/.
Installation
npm install --save-dev @alleyinteractive/oxlint-configUsage
Linting (Oxlint)
Create an oxlintrc.config.ts in your project root:
import { defineConfig } from 'oxlint';
import oxlintConfig from '@alleyinteractive/oxlint-config';
export default defineConfig({
extends: [oxlintConfig],
rules: {
// Example of how to override a config rule.
'import/extensions': 'off',
},
});Add a lint script to your package.json:
{
"scripts": {
"lint": "oxlint -c oxlintrc.config.ts ."
}
}Formatting (Oxfmt)
Create an oxfmt.config.ts in your project root:
import { defineConfig } from 'oxfmt';
import oxfmtConfig from '@alleyinteractive/oxlint-config/oxfmt';
export default defineConfig({
...oxfmtConfig,
// Example of how to extend the config.
ignorePatterns: ['build', 'dist'],
});Add a formatter script to your package.json:
{
"scripts": {
"format": "oxfmt -c oxfmt.config.ts .",
"format:check": "oxfmt -c oxfmt.config.ts . --check"
}
}Maintainers
Contributors
Thanks to all the contributors to this project.
License
This software is released under the terms of the GNU General Public License version 2 or any later version.
