/
githubmirror
/
gutenberg
Обзор
Документация
Войти
/
githubmirror
/
gutenberg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
trunk
packages/scripts/utils/package.js
20 строк
542 B
Marco Ciampini
ESLint: Replace strict config with bulk suppressions (#81248)
07 авг 2026, 14:34
Не верифицирован
07 авг 2026, 14:34
7f43eaf
Код
Авторство
О чём код?
const { realpathSync } = require( 'fs' ); const { sync: readPkgUp } = require( 'read-pkg-up' ); const { getCurrentWorkingDirectory } = require( './process' ); const { packageJson, path: pkgPath } = readPkgUp( { cwd: realpathSync( getCurrentWorkingDirectory() ), } ); const getPackagePath = () => pkgPath; const getPackageProp = ( prop ) => packageJson && packageJson[ prop ]; const hasPackageProp = ( prop ) => packageJson && packageJson.hasOwnProperty( prop ); module.exports = { getPackagePath, getPackageProp, hasPackageProp, };