npm-zone
Version:
some useful description
117 lines (116 loc) • 6.18 kB
JavaScript
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.prettierIgnore = exports.prettier = exports.gitIgnore = exports.readme = exports.tsconfig = exports.pkg = void 0;
var pkg = function (name) { return ({
name: name,
version: '0.0.0',
scripts: {
build: 'tsc -b',
dev: 'tsx --watch src/main.ts',
formate: 'prettier ./{src,tests}/**/* --check',
'formate:fix': 'prettier ./{src,tests}/**/* -w',
lint: 'eslint ./src',
'lint:fix': 'eslint --fix ./src',
start: 'node dist/main.js',
},
devDependencies: {
'@eslint/js': '^9.23.0',
'@trivago/prettier-plugin-sort-imports': '5.2.2',
'@types/node': '^24.0.1',
eslint: '^9.23.0',
'eslint-config-prettier': '10.1.1',
globals: '^16.0.0',
prettier: '3.5.3',
tsx: '^4.20.3',
typescript: '^5.8.3',
'typescript-eslint': '^8.28.0',
},
}); };
exports.pkg = pkg;
var tsconfig = {
compilerOptions: {
target: 'ES6',
module: 'commonjs',
rootDir: './src',
resolveJsonModule: true,
declaration: true,
sourceMap: true,
outDir: './dist',
removeComments: true,
noEmitOnError: true,
isolatedModules: true,
esModuleInterop: true,
forceConsistentCasingInFileNames: true,
strict: true,
noImplicitAny: true,
strictNullChecks: true,
noImplicitThis: true,
useUnknownInCatchVariables: true,
noImplicitReturns: true,
noUncheckedIndexedAccess: true,
noImplicitOverride: true,
skipLibCheck: true,
},
include: ['src/**/*.ts'],
exclude: ['node_modules', 'dist'],
};
exports.tsconfig = tsconfig;
var readme = function (name) { return "# ".concat(name); };
exports.readme = readme;
var gitIgnore = "# Logs\nlogs\n*.log\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\nlerna-debug.log*\n.pnpm-debug.log*\n\n# Diagnostic reports (https://nodejs.org/api/report.html)\nreport.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json\n\n# Runtime data\npids\n*.pid\n*.seed\n*.pid.lock\n\n# Directory for instrumented libs generated by jscoverage/JSCover\nlib-cov\n\n# Coverage directory used by tools like istanbul\ncoverage\n*.lcov\n\n# nyc test coverage\n.nyc_output\n\n# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)\n.grunt\n\n# Bower dependency directory (https://bower.io/)\nbower_components\n\n# node-waf configuration\n.lock-wscript\n\n# Compiled binary addons (https://nodejs.org/api/addons.html)\nbuild/Release\n\n# Dependency directories\nnode_modules/\njspm_packages/\n\n# Snowpack dependency directory (https://snowpack.dev/)\nweb_modules/\n\n# TypeScript cache\n*.tsbuildinfo\n\n# Optional npm cache directory\n.npm\n\n# Optional eslint cache\n.eslintcache\n\n# Optional stylelint cache\n.stylelintcache\n\n# Microbundle cache\n.rpt2_cache/\n.rts2_cache_cjs/\n.rts2_cache_es/\n.rts2_cache_umd/\n\n# Optional REPL history\n.node_repl_history\n\n# Output of 'npm pack'\n*.tgz\n\n# Yarn Integrity file\n.yarn-integrity\n\n# dotenv environment variable files\n.env\n.env.development.local\n.env.test.local\n.env.production.local\n.env.local\n\n# parcel-bundler cache (https://parceljs.org/)\n.cache\n.parcel-cache\n\n# Next.js build output\n.next\nout\n\n# Nuxt.js build / generate output\n.nuxt\ndist\n\n# Gatsby files\n.cache/\n# Comment in the public line in if your project uses Gatsby and not Next.js\n# https://nextjs.org/blog/next-9-1#public-directory-support\n# public\n\n# vuepress build output\n.vuepress/dist\n\n# vuepress v2.x temp and cache directory\n.temp\n.cache\n\n# Docusaurus cache and generated files\n.docusaurus\n\n# Serverless directories\n.serverless/\n\n# FuseBox cache\n.fusebox/\n\n# DynamoDB Local files\n.dynamodb/\n\n# TernJS port file\n.tern-port\n\n# Stores VSCode versions used for testing VSCode extensions\n.vscode-test\n\n# yarn v2\n.yarn/cache\n.yarn/unplugged\n.yarn/build-state.yml\n.yarn/install-state.gz\n.pnp.*\n\n# lock files\n*lock*\n\n# output files\nlib\ndist\nbuild\nbin\n\n# extra files\npnpm*\nyarn*\n.vscode*\n";
exports.gitIgnore = gitIgnore;
var prettierIgnore = "# Ignore artifacts:\nbuild\ncoverage\n\nnode_modules\n*lock*\npackage.json\n*.ico\n.prettier*\n*ignore*\n.husky\n\nlib\ndist\nbuild\nbin\n\n*.ejs\n";
exports.prettierIgnore = prettierIgnore;
var prettier = function (type) {
if (type === void 0) { type = 'ts'; }
return (__assign(__assign({ singleQuote: true, arrowParens: 'always', bracketSpacing: true, semi: true, trailingComma: 'es5', singleAttributePerLine: true, importOrder: [
'node$',
'^(node:$)|^(node$)',
'^react',
'^next',
'^[a-zA-Z]',
'^@(.*)$',
'^&(.*)$',
'^%(.*)$',
'^\\$(.*)$',
'^#(.*)$',
'<THIRD_PARTY_MODULES>',
], importOrderSeparation: true, importOrderSortSpecifiers: true }, (type === 'ts' ? { parser: 'typescript' } : {})), { filepath: './src/*', plugins: ['@trivago/prettier-plugin-sort-imports'], overrides: [
{
files: ['**/*.json'],
options: {
parser: 'json',
},
},
{
files: ['**/*.html'],
options: {
parser: 'html',
},
},
{
files: ['**/*.css'],
options: {
parser: 'css',
},
},
{
files: ['**/*.md'],
options: {
parser: 'markdown',
},
},
] }));
};
exports.prettier = prettier;