UNPKG

eslint-config-xaxa

Version:

The ultimate ESLint config - successor to Airbnb Config. Built on Anthony Fu's ESLint config, Airbnb, ESLint Stylistic, Perfectionist, React, TypeScript, Astro, JSDocs, Prettier, Node.js, Unicorns, Promises, and more.

13 lines (12 loc) 819 B
import fs from "node:fs"; import path from "node:path"; export function isPnpm(cwd = process.cwd()) { const isPnpmPackageManager = process.env.npm_package_packageManager?.includes("pnpm@"); if (isPnpmPackageManager) { return true; } return fs.existsSync(path.join(cwd, "pnpm-lock.yaml")) || fs.existsSync(path.join(cwd, "pnpm-lock.yml")); } export function isUnoCSS(cwd = process.cwd()) { return fs.existsSync(path.join(cwd, "uno.config.ts")) || fs.existsSync(path.join(cwd, "unocss.config.ts")) || fs.existsSync(path.join(cwd, "uno.config.js")) || fs.existsSync(path.join(cwd, "unocss.config.js")) || fs.existsSync(path.join(cwd, "uno.config.mts")) || fs.existsSync(path.join(cwd, "unocss.config.mts")) || fs.existsSync(path.join(cwd, "uno.config.mjs")) || fs.existsSync(path.join(cwd, "unocss.config.mjs")); }