@ctrl/oxlint-config
v1.3.3
Published
A shareable oxlint for my projects.
Downloads
361
Readme
@ctrl/oxlint-config 
A shareable oxlint for my projects.
Getting Started
pnpm add -D oxlint @ctrl/oxlint-config prettier @trivago/prettier-plugin-sort-importsUsage
In your project's .oxlintrc.json file, add the following:
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"env": {
"node": true
},
"plugins": ["react", "unicorn", "typescript", "oxc", "import"],
"extends": ["@ctrl/oxlint-config"]
}Add a prettier config to your package.json:
{
"prettier": {
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "avoid",
"semi": true,
"printWidth": 100,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": [
"^node:.*$",
"<THIRD_PARTY_MODULES>",
"^(@ctrl)(/.*|$)",
"^\\.\\./(?!.*\\.css$)",
"^\\./(?!.*\\.css$)(?=.*/)",
"^\\./(?!.*\\.css$)(?!.*/)"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": false
}
}Current Import Order Rules
^node:.*$- Node.js built-in modules<THIRD_PARTY_MODULES>- Third-party modules^(@ctrl)(/.*|$)- @ctrl packages^\\.\\./(?!.*\\.css$)- Relative imports from parent folders^\\./(?!.*\\.css$)(?=.*/)- Relative imports from subfolders^\\./(?!.*\\.css$)(?!.*/)- Relative imports from same folder
Note: CSS files (.css extensions) are excluded from all relative import patterns and maintain their original positions
