diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..9d08a1a --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..df3ddcb --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.json linguist-language=JSON-with-Comments \ No newline at end of file diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100755 index 0000000..e874da3 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1,2 @@ +#!/bin/sh +npx --no-install lint-staged diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..491b724 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: kazupon diff --git a/.github/ISSUE_TEMPLATE/.gitkeep b/.github/ISSUE_TEMPLATE/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..c78a959 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,22 @@ + + +### Description + + + +### Linked Issues + +### Additional context + + diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 0000000..0fdc1ca --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,87 @@ +- name: feature + description: Includes new features + color: 'ffff00' +- name: bug + description: Includes new features + color: 'ee0701' +- name: improvement + description: Includes backwards-compatible fixes + color: '1d76db' +- name: breaking + description: Includes backwards-incompatible fixes + color: 'b60205' +- name: refactoring + description: A code change that neither fixes a bug nor adds a feature + color: 'fbca04' +- name: security + description: Security fixes + color: 'b60205' +- name: documentation + description: Includes documetation fixes + color: '5319e7' +- name: example + description: Includes example and demo code fixes + color: 'db0875' +- name: deprecated + description: Includes deprecate fixes + color: 'f7ffa8' +- name: performance + description: Includes performance fixes + color: 'cc317c' +- name: i18n + description: Includes internationalization fixes + color: 'ffd412' +- name: a11y + description: Inlucdes accessibility fixes + color: '0000ff' +- name: dependency + description: Includes dependency fixes + color: 'ffbce7' +- name: todo + description: todo tasks + color: 'c2e0c6' +- name: duplicate + description: This issue or Pull Request already exists + color: 'ededed' +- name: help wanted + description: Extra attention is needed + color: 'e99695' +- name: good first issue + description: Good for newcomers + color: '7057ff' +- name: 'status: abandoned' + description: The issue or Pull Request is wontfix + color: '000000' +- name: 'status: blocked' + description: Progress on the issue is Blocked + color: 'ee0701' +- name: 'status: in progress' + description: Work in Progress + color: 'cccccc' +- name: 'status: proposal' + description: Request for comments + color: 'd4c5f9' +- name: 'status: pull request welcome' + description: Welcome to Pull Request + color: '2E7733' +- name: 'status: review needed' + description: Request for review + color: 'fbca04' +- name: 'status: need more repro codes or info' + description: Lacks enough info to make progress + color: 'F9C90A' +- name: '๐Ÿงน p1-chore' + description: 'Priority 1: no change in change code behavior' + color: '#FDDFD7' +- name: '๐Ÿฐ p2-nice-to-have' + description: "Priority 2: nothing is broken but it's worth addressing" + color: '#0e8a16' +- name: '๐Ÿ”จ p3-minor-bug' + description: 'Priority 3: a bug in an edge case that only affects very specific usage' + color: '#fbca04' +- name: 'โ— p4-important' + description: 'Priority 4: bugs that violate documented behavior, or significantly impact perf' + color: '#d93f0b' +- name: '๐Ÿ”ฅ p5-urgent' + description: 'Priority 5: build-breaking bugs that affect most users and should be fixed ASAP' + color: '#ee0701' diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..6a050e8 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,45 @@ +changelog: + exclude: + labels: + - ignore-for-release + authors: + - octocat + - renovate[bot] + categories: + - title: ๐ŸŒŸ Features + labels: + - feature + - title: ๐Ÿ› Bug Fixes + labels: + - bug + - title: ๐Ÿ’ฅ Breaking Changes + labels: + - breaking + - title: โš ๏ธ Deprecated Features + labels: + - deprecated + - title: โšก Improvement Features + labels: + - improvement + - title: ๐Ÿ”’ Security Fixes + labels: + - security + - title: ๐Ÿ“ˆ Performance Fixes + labels: + - performance + - title: ๐Ÿ“๏ธ Documentations + labels: + - documentation + - title: ๐Ÿ‘• Refactoring + labels: + - refactoring + - title: ๐Ÿญ Examples + labels: + - example + - title: ๐ŸŒ โ™ฟ Internationalization or Accessibility Fixes + labels: + - a11y + - i18n + - title: ๐Ÿช„ Others + labels: + - chore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0959ee9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,150 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + lint: + name: Lint + strategy: + matrix: + os: [ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout codes + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Lint codes + run: deno lint + + build: + name: Build + strategy: + matrix: + os: [ubuntu-latest] + node: [18.x] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout codes + uses: actions/checkout@v4 + + - name: Setup deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + + - name: Enable corepack + run: corepack enable + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + + - name: Install dependencies + run: bun install + + - name: Build codes + run: npm run build + + test: + name: Test + strategy: + matrix: + os: [ubuntu-latest] + node: [18.x] + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout codes + uses: actions/checkout@v4 + + - name: Setup deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + + - name: Setup node + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + + - name: Enable corepack + run: corepack enable + + - name: Install dependencies + run: bun install + + - name: Build codes + run: npm test + + edge-release: + name: Edge Release + needs: + - lint + - build + - test + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest] + node: [18] + steps: + - name: Checkout codes + uses: actions/checkout@v4 + + - name: Setup deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + + - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node }} + + - name: Enable corepack + run: corepack enable + + - name: Install dependencies + run: bun install + + - name: Build + run: npm run build + + - name: Release Edge + if: | + github.event_name == 'push' && + !startsWith(github.event.head_commit.message, '[skip-release]') && + !startsWith(github.event.head_commit.message, 'chore') && + !startsWith(github.event.head_commit.message, 'release') && + !startsWith(github.event.head_commit.message, 'docs') + run: ./scripts/release.sh + env: + NPM_TOKEN: ${{secrets.NPM_ORG_TOKEN}} + EDGE_RELEASE: 'true' diff --git a/.github/workflows/github-label-sync.yml b/.github/workflows/github-label-sync.yml new file mode 100644 index 0000000..5dcfbe1 --- /dev/null +++ b/.github/workflows/github-label-sync.yml @@ -0,0 +1,16 @@ +name: Label sync + +on: + push: + branches: + - main + paths: + - .github/labels.yml + - .github/workflows/github-label-sync.yml + workflow_dispatch: + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - uses: r7kamura/github-label-sync-action@v0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..b71f0dd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,68 @@ +name: Release + +on: + push: + branches-ignore: + - '**' + tags: + - 'v*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout codes + uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + + - name: Setup deno + uses: denoland/setup-deno@v1 + with: + deno-version: v1.x + + - name: Setup bun + uses: oven-sh/setup-bun@v1 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18 + + - name: Enable corepack + run: corepack enable + + - name: Extract version tag + if: startsWith( github.ref, 'refs/tags/v' ) + uses: jungwinter/split@v2 + id: split + with: + msg: ${{ github.ref }} + separator: '/' + + - name: Create Github Release + run: gh release create ${{ steps.split.outputs._2 }} --generate-notes + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Generate changelog + run: | + git restore --source=HEAD --staged --worktree -- package.json bun.lockb + bun install + npm run build + npm run changelog --tag=${{ steps.split.outputs._2 }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Commit changelog + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: main + file_pattern: '*.md' + commit_message: 'chore: sync changelog' + + - name: Publish package + run: ./scripts/release.sh + env: + NPM_TOKEN: ${{secrets.NPM_ORG_TOKEN}} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..97aed75 --- /dev/null +++ b/.gitignore @@ -0,0 +1,12 @@ +dist +node_modules +coverage +.DS_Store +.idea + +*.log +*.swp +*.tgz +*.zip +*~ +.env \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..4c00c76 --- /dev/null +++ b/.npmignore @@ -0,0 +1,4 @@ +coverage +.* +*.log +*.swp \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..ba4b1a2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "deno.enable": false, + "deno.lint": true, + "editor.formatOnSave": true, + "editor.defaultFormatter": "denoland.vscode-deno" +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d14476d --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2023 kazuya kawaguchi + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 9252f9c..3a13087 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # @intilfy/utils -Common utilities for i18n +Collection of i18n utilities **NOTICE: This is a work in progress ๐Ÿ‘ท** diff --git a/build.config.ts b/build.config.ts new file mode 100644 index 0000000..d20a7a9 --- /dev/null +++ b/build.config.ts @@ -0,0 +1,9 @@ +import { defineBuildConfig } from 'unbuild' + +export default defineBuildConfig({ + declaration: true, + rollup: { + emitCJS: true, + }, + entries: ['./src/index.ts'], +}) diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000..1b0935c Binary files /dev/null and b/bun.lockb differ diff --git a/deno.jsonc b/deno.jsonc new file mode 100644 index 0000000..d281a7c --- /dev/null +++ b/deno.jsonc @@ -0,0 +1,25 @@ +{ + "fmt": { + /* + "include": [ + ], + */ + "exclude": ["node_modules", "dist"], + "semiColons": false, + "singleQuote": true + }, + "lint": { + /* + "include": [ + ], + */ + "exclude": ["node_modules", "dist"] + /* + "rules": { + "tags": ["recommended"], + "exclude": [ + ] + } + */ + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..d557500 --- /dev/null +++ b/package.json @@ -0,0 +1,70 @@ +{ + "name": "@intlify/utils", + "version": "0.0.0", + "description": "Collection of i18n utilities", + "keywords": ["i18n", "internationalization", "intlify", "utilities"], + "author": { + "name": "kazuya kawaguchi", + "email": "kawakazu80@gmail.com" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/intlify/utils/issues" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/intlify/utils.git" + }, + "homepage": "https://github.com/intlify/utils#readme", + "files": [ + "dist" + ], + "publishConfig": { + "access": "public" + }, + "engines": { + "node": ">= 18" + }, + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.cjs" + }, + "./dist/*": "./dist/*", + "./package.json": "./package.json" + }, + "scripts": { + "prepare": "git config --local core.hooksPath .githooks", + "preinstall": "node scripts/preinstall.js", + "changelog": "gh-changelogen --repo=intlify/h3", + "release": "bumpp --commit \"release: v%s\" --push --tag", + "lint": "deno lint", + "format": "deno fmt", + "build": "unbuild", + "test": "vitest run", + "test:coverage": "npm test -- --reporter verbose --coverage" + }, + "lint-staged": { + "*.{js,ts,jsx,tsx,md,json,jsonc}": [ + "deno fmt" + ], + "*.{js,ts,jsx,tsx}": [ + "deno lint" + ] + }, + "devDependencies": { + "@types/node": "^20.6.0", + "@vitest/coverage-v8": "^0.34.4", + "bumpp": "^9.2.0", + "gh-changelogen": "^0.2.8", + "lint-staged": "^14.0.0", + "typescript": "^5.2.2", + "unbuild": "^2.0.0", + "vitest": "^0.34.4" + } +} diff --git a/scripts/bump-edge.ts b/scripts/bump-edge.ts new file mode 100644 index 0000000..369e04e --- /dev/null +++ b/scripts/bump-edge.ts @@ -0,0 +1,19 @@ +import { execSync } from 'node:child_process' +import { promises as fs } from 'node:fs' +import { resolve } from 'node:path' + +async function main() { + const commit = execSync('git rev-parse --short HEAD').toString('utf-8').trim() + const date = Math.round(Date.now() / (1000 * 60)) + + const pkgPath = resolve(process.cwd(), 'package.json') + const pkg = JSON.parse(await fs.readFile(pkgPath, 'utf-8').catch(() => '{}')) + pkg.version = `${pkg.version}-${date}.${commit}` + pkg.name = pkg.name + '-edge' + await fs.writeFile(pkgPath, JSON.stringify(pkg, null, 2) + '\n') +} + +main().catch((err) => { + console.error(err) + process.exit(1) +}) diff --git a/scripts/preinstall.js b/scripts/preinstall.js new file mode 100644 index 0000000..bfa4dad --- /dev/null +++ b/scripts/preinstall.js @@ -0,0 +1,11 @@ +import { spawnSync } from 'child_process' + +const { status } = spawnSync('which', ['deno'], { stdio: 'ignore' }) + +if (status) { + console.warn( + `\u001b[33mThis repository requires using deno` + + ` for scripts to work properly.\u001b[39m\n`, + ) + process.exit(1) +} diff --git a/scripts/release.sh b/scripts/release.sh new file mode 100755 index 0000000..ab9a507 --- /dev/null +++ b/scripts/release.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -xe + +# Check edge release +if [[ ! -z ${EDGE_RELEASE} ]] ; then + bunx tsx ./scripts/bump-edge +fi + +# Update token +if [[ ! -z ${NPM_TOKEN} ]] ; then + echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc + echo "registry=https://registry.npmjs.org/" >> ~/.npmrc + echo "always-auth=true" >> ~/.npmrc + npm whoami +fi + +# Release packages +echo "Publishing" +npm publish diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..0ccdee7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,109 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + + /* Language and Environment */ + "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "ESNext", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "Bundler", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + // "types": [], /* Specify type package names to be included without being referenced in a source file. */ + // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ + // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ + "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ + // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */ + // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */ + // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */ + // "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */ + + /* JavaScript Support */ + // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + // "declarationMap": true, /* Create sourcemaps for d.ts files. */ + // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */ + // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */ + // "outDir": "./", /* Specify an output folder for all emitted files. */ + // "removeComments": true, /* Disable emitting comments. */ + // "noEmit": true, /* Disable emitting files from a compilation. */ + // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ + // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */ + // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */ + // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */ + // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */ + // "newLine": "crlf", /* Set the newline character for emitting files. */ + // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */ + // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */ + // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */ + // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */ + // "declarationDir": "./", /* Specify the output directory for generated declaration files. */ + // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */ + + /* Interop Constraints */ + // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */ + // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */ + // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ + // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ + // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */ + // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */ + // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */ + // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */ + // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */ + // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */ + // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */ + // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */ + // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */ + // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */ + // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */ + // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */ + // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */ + // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */ + // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ + + /* Completeness */ + // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */ + } +}