@mastermunj/oxc-config
Advanced tools
| import { OxfmtConfig } from "oxfmt"; | ||
| //#region oxfmt.config.d.ts | ||
| declare const _default: OxfmtConfig; | ||
| //#endregion | ||
| export { _default as default }; |
| import { defineConfig } from "oxfmt"; | ||
| //#region oxfmt.config.ts | ||
| var oxfmt_config_default = defineConfig({ | ||
| singleQuote: true, | ||
| printWidth: 120, | ||
| sortPackageJson: { sortScripts: true }, | ||
| ignorePatterns: [ | ||
| "**/dist/**", | ||
| "**/build/**", | ||
| "coverage/**", | ||
| "*.min.js" | ||
| ] | ||
| }); | ||
| //#endregion | ||
| export { oxfmt_config_default as default }; |
| import { OxlintConfig } from "oxlint"; | ||
| //#region oxlint.config.d.ts | ||
| declare const _default: OxlintConfig; | ||
| //#endregion | ||
| export { _default as default }; |
| import { defineConfig } from "oxlint"; | ||
| //#region oxlint.config.ts | ||
| var oxlint_config_default = defineConfig({ | ||
| plugins: [ | ||
| "eslint", | ||
| "typescript", | ||
| "unicorn", | ||
| "import", | ||
| "oxc", | ||
| "vitest" | ||
| ], | ||
| env: { | ||
| node: true, | ||
| es2022: true | ||
| }, | ||
| options: { | ||
| typeAware: true, | ||
| typeCheck: true | ||
| }, | ||
| ignorePatterns: [ | ||
| "*.min.*", | ||
| "**/node_modules/**", | ||
| "**/dist/**", | ||
| "**/build/**", | ||
| "**/*.d.ts", | ||
| "coverage/**", | ||
| "output/**", | ||
| "temp/**", | ||
| "package-lock.json" | ||
| ], | ||
| rules: { | ||
| curly: ["error", "all"], | ||
| eqeqeq: ["error", "always"], | ||
| "no-array-constructor": "error", | ||
| "no-await-in-loop": "off", | ||
| "unicorn/no-array-sort": "off", | ||
| "no-caller": "error", | ||
| "no-cond-assign": ["error", "except-parens"], | ||
| "no-constant-condition": "error", | ||
| "no-console": "off", | ||
| "no-control-regex": "error", | ||
| "no-debugger": "error", | ||
| "no-duplicate-case": "error", | ||
| "no-eval": "error", | ||
| "no-ex-assign": "error", | ||
| "no-extra-boolean-cast": "error", | ||
| "no-fallthrough": "error", | ||
| "no-inner-declarations": "error", | ||
| "no-invalid-regexp": ["error", { allowConstructorFlags: ["u", "y"] }], | ||
| "no-irregular-whitespace": "error", | ||
| "no-new-wrappers": "error", | ||
| "no-self-assign": "error", | ||
| "no-self-compare": "error", | ||
| "no-shadow": "off", | ||
| "no-sparse-arrays": "error", | ||
| "no-this-before-super": "error", | ||
| "no-unreachable": "error", | ||
| "no-unsafe-finally": "error", | ||
| "no-unsafe-negation": "error", | ||
| "no-with": "error", | ||
| "use-isnan": "error", | ||
| "valid-typeof": ["error", { requireStringLiterals: true }], | ||
| "typescript/consistent-type-imports": ["error", { | ||
| fixStyle: "inline-type-imports", | ||
| disallowTypeAnnotations: false | ||
| }], | ||
| "typescript/switch-exhaustiveness-check": "off", | ||
| "unicorn/prefer-node-protocol": "error", | ||
| "unicorn/filename-case": ["error", { | ||
| cases: { | ||
| camelCase: true, | ||
| pascalCase: true, | ||
| kebabCase: true, | ||
| snakeCase: true | ||
| }, | ||
| ignore: ["^[a-z]{2,3}-[A-Z]{2,3}(.test)?\\.(ts|js)$"] | ||
| }], | ||
| "unicorn/no-await-expression-member": "error", | ||
| "unicorn/no-instanceof-builtins": "error", | ||
| "unicorn/prefer-number-properties": "error", | ||
| "typescript/no-unused-vars": ["error", { | ||
| vars: "all", | ||
| args: "after-used", | ||
| argsIgnorePattern: "^_", | ||
| varsIgnorePattern: "^_" | ||
| }] | ||
| }, | ||
| overrides: [{ | ||
| files: [ | ||
| "**/*.{spec,test}.{ts,js}", | ||
| "**/test/**", | ||
| "**/__tests__/**" | ||
| ], | ||
| rules: { "typescript/no-explicit-any": "off" } | ||
| }] | ||
| }); | ||
| //#endregion | ||
| export { oxlint_config_default as default }; |
+2
-2
@@ -1,2 +0,2 @@ | ||
| import { defineConfig } from 'oxfmt'; | ||
| import { defineConfig, type OxfmtConfig } from 'oxfmt'; | ||
@@ -10,2 +10,2 @@ export default defineConfig({ | ||
| ignorePatterns: ['**/dist/**', '**/build/**', 'coverage/**', '*.min.js'], | ||
| }); | ||
| }) as OxfmtConfig; |
+2
-2
@@ -1,2 +0,2 @@ | ||
| import { defineConfig } from 'oxlint'; | ||
| import { defineConfig, type OxlintConfig } from 'oxlint'; | ||
@@ -98,2 +98,2 @@ export default defineConfig({ | ||
| ], | ||
| }); | ||
| }) as OxlintConfig; |
+15
-5
| { | ||
| "name": "@mastermunj/oxc-config", | ||
| "version": "0.0.6", | ||
| "version": "0.0.7", | ||
| "description": "Shared oxlint + oxfmt configuration for TypeScript packages", | ||
@@ -25,8 +25,15 @@ "keywords": [ | ||
| "oxlint.config.ts", | ||
| "oxfmt.config.ts" | ||
| "oxfmt.config.ts", | ||
| "dist/" | ||
| ], | ||
| "type": "module", | ||
| "exports": { | ||
| "./oxlint": "./oxlint.config.ts", | ||
| "./oxfmt": "./oxfmt.config.ts" | ||
| "./oxlint": { | ||
| "types": "./dist/oxlint.config.d.ts", | ||
| "default": "./dist/oxlint.config.js" | ||
| }, | ||
| "./oxfmt": { | ||
| "types": "./dist/oxfmt.config.d.ts", | ||
| "default": "./dist/oxfmt.config.js" | ||
| } | ||
| }, | ||
@@ -37,2 +44,3 @@ "publishConfig": { | ||
| "scripts": { | ||
| "build": "tsdown", | ||
| "format": "oxfmt --check .", | ||
@@ -43,2 +51,3 @@ "format:fix": "oxfmt --write .", | ||
| "lint:fix": "npm run lint -- --fix", | ||
| "prepublishOnly": "npm run build", | ||
| "release": "commit-and-tag-version", | ||
@@ -51,4 +60,5 @@ "release:mock": "npm run release -- --dry-run" | ||
| "oxlint": "^1.75.0", | ||
| "oxlint-tsgolint": "^7.0.2001" | ||
| "oxlint-tsgolint": "^7.0.2001", | ||
| "tsdown": "^0.22.14" | ||
| } | ||
| } |
+2
-2
@@ -102,4 +102,4 @@ # @mastermunj/oxc-config | ||
| - `@mastermunj/oxc-config/oxlint` → `oxlint.config.ts` | ||
| - `@mastermunj/oxc-config/oxfmt` → `oxfmt.config.ts` | ||
| - `@mastermunj/oxc-config/oxlint` → `oxlint.config.js` (ESM, compiled from `oxlint.config.ts`) | ||
| - `@mastermunj/oxc-config/oxfmt` → `oxfmt.config.js` (ESM, compiled from `oxfmt.config.ts`) | ||
@@ -106,0 +106,0 @@ ## License |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
10722
47.3%9
80%227
114.15%0
-100%5
25%