Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tsconfig-base): copy package from @alwatr/tsconfig-base #7

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "3.3.3-sdk",
"version": "3.4.2-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"description": "Necessary library for all ECMAScript (JavaScript/TypeScript) projects.",
"repository": "https://github.com/the-nexim/nanolib",
"author": "S. Amir Mohammad Najafi <njfamirm@gmail.com> (www.njfamirm.ir)",
"contributors": [
"Arash Ghardashpoor <arash.qardashpoor@gmail.com> (https://www.agpagp.ir)"
],
"license": "AGPL-3.0-only",
"type": "module",
"private": true,
Expand Down Expand Up @@ -47,6 +50,7 @@
"@lerna-lite/publish": "^3.10.1",
"@lerna-lite/run": "^3.10.1",
"@lerna-lite/version": "^3.10.1",
"@nexim/tsconfig-base": "workspace:^",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"ava": "^6.2.0",
Expand All @@ -56,10 +60,11 @@
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-require-extensions": "^0.1.3",
"prettier": "^3.4.2",
"prettier-plugin-packagejson": "^2.5.6",
"prettier-plugin-tailwindcss": "^0.6.9",
"typescript": "^5.6.3"
},
"packageManager": "yarn@4.5.1",
"packageManager": "yarn@4.5.3",
"dependenciesMeta": {
"prettier-plugin-tailwindcss@0.6.9": {
"unplugged": true
Expand Down
2 changes: 1 addition & 1 deletion packages/element/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@
"devDependencies": {
"@alwatr/nano-build": "^5.0.0",
"@alwatr/prettier-config": "^5.0.0",
"@alwatr/tsconfig-base": "^5.0.0",
"@alwatr/type-helper": "^5.0.0",
"@nexim/tsconfig-base": "workspace:^",
"ava": "^6.2.0",
"typescript": "^5.6.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/element/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "@alwatr/tsconfig-base/tsconfig.json",
"extends": "@nexim/tsconfig-base",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
Expand Down
661 changes: 661 additions & 0 deletions packages/tsconfig-base/LICENSE

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions packages/tsconfig-base/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Nexim TypeScript Config

This is a base TypeScript configuration for Nexim projects.

## installation
Copy link
Preview

Copilot AI Dec 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word 'installation' should be capitalized to 'Installation'.

Suggested change
## installation
## Installation

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options

```bash
yarn add -D @nexim/tsconfig-base
```

## Usage

Create a `tsconfig.json` file in the root of your project:

```json
{
"extends": "@nexim/tsconfig-base",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist"
},
"include": ["src/**/*.ts"]
}
```
37 changes: 37 additions & 0 deletions packages/tsconfig-base/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "@nexim/tsconfig-base",
"version": "0.0.1",
"description": "This is a base TypeScript configuration for Nexim projects.",
"keywords": [
"typescript",
"tsconfig",
"tsconfig.json",
"tsconfig-base",
"nanolib",
"nexim"
],
"homepage": "https://github.com/the-nexim/nanolib/tree/next/packages/tsconfig-base#readme",
"bugs": {
"url": "https://github.com/the-nexim/nanolib/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/the-nexim/nanolib",
"directory": "packages/tsconfig-base"
},
"license": "AGPL-3.0-only",
"author": "S. Amir Mohammad Najafi <njfamirm@gmail.com> (www.njfamirm.ir)",
"contributors": [
"Arash Ghardashpoor <arash.qardashpoor@gmail.com> (https://www.agpagp.ir)"
],
"main": "tsconfig.json",
"files": [
"**/*.{js,mjs,cjs,map,d.ts,html,md,LEGAL.txt}",
"tsconfig.json",
"LICENSE",
"!demo/**/*"
],
"publishConfig": {
"access": "public"
}
}
84 changes: 84 additions & 0 deletions packages/tsconfig-base/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
// https://www.typescriptlang.org/tsconfig
"compilerOptions": {
/* Basic Options */
"incremental": true,
"target": "ES2020",
"module": "ESNext",
"moduleResolution": "Bundler",
"lib": ["ESNext", "DOM"],
"verbatimModuleSyntax": true,
"moduleDetection": "force",
// "allowJs": true,
"checkJs": true,
// "jsx": "preserve",
"declaration": true,
// "outFile": "./",
// "outDir": "./",
// "rootDir": "./src",
"composite": true,
// "tsBuildInfoFile": ".tsbuildinfo",
// "removeComments": true,
// "noEmit": true,
// "emitDeclarationOnly": true,
// "importHelpers": true,
// "noEmitHelpers": true,
// "downlevelIteration": true,
"isolatedModules": true, // need for esbuild
"pretty": true,
"newLine": "lf",
// "stripInternal": true,

/* Strict Type-Checking Options */
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"strictBindCallApply": true,
"strictPropertyInitialization": true,
"noImplicitThis": true,
"alwaysStrict": true,

/* Additional Checks */
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": false,
"noEmitOnError": true,
"allowUnusedLabels": true,
// "noUncheckedIndexedAccess": true,

/* Module Resolution Options */
// "paths": {},
// "rootDirs": [],
// "typeRoots": [],
// "types": [],
"allowSyntheticDefaultImports": true,
// "esModuleInterop": true,
// "preserveSymlinks": true,
// "allowUmdGlobalAccess": true,

/* Source Map Options */
"sourceMap": true,
"declarationMap": true,
"inlineSources": true,
// "inlineSourceMap": true,
// "sourceRoot": "",
// "mapRoot": "",

/* Experimental Options */
"experimentalDecorators": true,
"emitDecoratorMetadata": true,

/* Advanced Options */
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"useDefineForClassFields": false,
// "resolveJsonModule": true, // temporary for fix import json issue

"listEmittedFiles": true
// "diagnostics": true,
}
}
10 changes: 10 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "@nexim/tsconfig-base/tsconfig.json",
"compilerOptions": {
"noEmit": true,
"types": ["node"]
},
"files": [],
"exclude": [],
"references": [{"path": "./packages/element"}, {"path": "./packages/tsconfig-base"}]
}
Loading
Loading