Files
pezkuwi-dev/packages/dev-ts/src/common.ts
T
Kurdistan Tech Ministry cb6801a3cc Fix lint errors: Update copyright years to 2026 and ignore build outputs
- Updated all copyright headers from 2025 to 2026 (system date shows 2026)
- Added build output files to eslint ignore list in packages/dev/config/eslint.js
- Added build output patterns to .gitignore
- Ignored: packages/*/*.{d.ts,js,mjs,cjs}, packages/*/cjs/**, packages/*/env/**,
  packages/*/rootJs/**, packages/*/rootStatic/**
- Successfully resolved 521 lint errors by properly ignoring generated files
- Build outputs should not be linted (source files are linted instead)
- Lint and build now pass successfully
2026-01-17 21:02:45 +03:00

33 lines
1.0 KiB
TypeScript

// Copyright 2017-2026 @pezkuwi/dev-ts authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { LoaderOptions } from './types.js';
import path from 'node:path';
import process from 'node:process';
import { pathToFileURL } from 'node:url';
/** The path we are being executed from */
export const CWD_PATH = process.cwd();
/** The cwd path we are being executed from in URL form */
export const CWD_URL = pathToFileURL(`${CWD_PATH}/`);
/** The root path to node_modules (assuming it is in the root) */
export const MOD_PATH = path.join(CWD_PATH, 'node_modules');
/** List of allowed extensions for mappings */
export const EXT_TS_ARRAY = ['.ts', '.tsx'];
/** RegEx for files that we support via this loader */
export const EXT_TS_REGEX = /\.tsx?$/;
/** RegEx for matching JS files (imports map to TS) */
export const EXT_JS_REGEX = /\.jsx?$/;
/** RegEx for json files (as actually aliassed in pezkuwi-js) */
export const EXT_JSON_REGEX = /\.json$/;
/** Options for loader config */
export const loaderOptions: LoaderOptions = {};