From c0496a3cf060734b97cdec13fdc29beba7cfaf0b Mon Sep 17 00:00:00 2001 From: Lachlan Collins <1667261+lachlancollins@users.noreply.github.com> Date: Sat, 10 Aug 2024 10:07:46 +1000 Subject: [PATCH] ci: fix automated NPM release (#131) Fixes #130 This PR ensures that eslint-plugin-oxlint's version in package.json gets updated to match oxlint's version. It does not automatically generate PRs for new oxlint versions, but it should automatically release (without needing to manually create a tag) once a manually generated `bump_oxlint.yml` PR is merged. I've changed the package versions to reflect oxlint v0.6.1, so this can correctly release v0.7.0. Here's how it should work: 1. A `bump_oxlint.yml` workflow is dispatched with the new oxlint version (needs to be prefixed with `v`, i.e. `v0.7.0`) 2. The generate script bumps the version in the local `package.json` to match oxlint 3. Prettier now runs _after_ the generate script rather than during, as the API version was generating invalid json outputs 4. The update PR is generated, with the title `release: v0.7.0` 5. When this is merged, the `release.yml` workflow will start, and run if the latest commit contains `release: v` 6. This workflow will extract the version from the commit and create a corresponding tag 7. Everything else should work the same as before If this gets merged, could a maintainer please delete the existing GitHub release v0.7.0 (which did not generate an NPM release), and then trigger a new `bump_oxlint.yml` workflow? --- .github/workflows/bump_oxlint.yml | 6 +- .github/workflows/release.yml | 14 +++- package.json | 6 +- pnpm-lock.yaml | 74 +++++++++---------- .../rules-generator.test.ts.snap | 28 ++++--- scripts/generate.ts | 26 ++++++- scripts/rules-generator.test.ts | 1 + scripts/rules-generator.ts | 30 ++------ src/rules-by-category.ts | 54 ++++++++------ tsconfig.json | 2 +- 10 files changed, 135 insertions(+), 106 deletions(-) diff --git a/.github/workflows/bump_oxlint.yml b/.github/workflows/bump_oxlint.yml index d5c6946..959e484 100644 --- a/.github/workflows/bump_oxlint.yml +++ b/.github/workflows/bump_oxlint.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: inputs: version: - required: false + required: true type: string env: @@ -35,11 +35,11 @@ jobs: - uses: peter-evans/create-pull-request@v6 with: token: ${{ secrets.GITHUB_TOKEN }} - commit-message: Release ${{ inputs.version }} + commit-message: 'release: ${{ inputs.version }}' committer: Boshen author: Boshen branch: release branch-suffix: timestamp - title: Release ${{ inputs.version }} + title: 'release: ${{ inputs.version }}' assignees: Boshen base: main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 81bc199..2356a20 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,14 +2,14 @@ name: Release on: push: - tags: - - 'v*' + branches: [main] permissions: contents: write jobs: release: + if: "contains(github.event.head_commit.message, 'release: v')" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -25,6 +25,16 @@ jobs: node-version-file: .node-version cache: pnpm + - name: Extract version from commit message + run: | + VERSION=$(echo "${{ github.event.head_commit.message }}" | grep -oP 'release: \Kv[0-9]+\.[0-9]+\.[0-9]+') + echo "VERSION=$VERSION" >> $GITHUB_ENV + + - name: Create and push tag + run: | + git tag ${{ env.VERSION }} + git push origin ${{ env.VERSION }} + - run: npx changelogithub continue-on-error: true env: diff --git a/package.json b/package.json index 0410746..9e624e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "eslint-plugin-oxlint", - "version": "0.5.0", + "version": "0.6.1", "description": "Turn off all rules already supported by oxlint", "type": "module", "packageManager": "pnpm@9.6.0", @@ -36,7 +36,7 @@ }, "license": "MIT", "scripts": { - "generate": "node --import @oxc-node/core/register ./scripts/generate.ts", + "generate": "node --import @oxc-node/core/register ./scripts/generate.ts && pnpm format", "clone": "node --import @oxc-node/core/register ./scripts/sparse-clone.ts", "build": "vite build", "lint": "npx oxlint && npx eslint", @@ -68,7 +68,7 @@ "husky": "^9.0.11", "lint-staged": "^15.2.5", "memfs": "^4.9.2", - "oxlint": "^0.7.0", + "oxlint": "^0.6.1", "prettier": "^3.3.1", "shelljs": "^0.8.5", "typescript": "^5.4.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b6f923e..bc8b0c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -61,8 +61,8 @@ importers: specifier: ^4.9.2 version: 4.9.3 oxlint: - specifier: ^0.7.0 - version: 0.7.0 + specifier: ^0.6.1 + version: 0.6.1 prettier: specifier: ^3.3.1 version: 3.3.3 @@ -457,43 +457,43 @@ packages: '@oxc-node/core@0.0.11': resolution: {integrity: sha512-gXsjoQli+rNOiZlTLBi52uWJMzvldUt3yPIjyLUaybYyPRprTpT4gVsjuUzhNW8GAgVeKw/07aNozxLuZQDdfA==} - '@oxlint/darwin-arm64@0.7.0': - resolution: {integrity: sha512-BlKKozOOJb5q37mqAyTQhFHMEh8KBUsQvynrO0aBKOzHqkhVQ62eTtd064XsDym+qZCNlKeNR4363wBPRZWgZw==} + '@oxlint/darwin-arm64@0.6.1': + resolution: {integrity: sha512-qnPtdpX4a2wZJYHo/7pO5oHGFfA1t47M+gN9d/ds2+C7UzfZyp1kgE6cjeBidnkpSnFWUPfOmuoOOrFs8Ig+Sw==} cpu: [arm64] os: [darwin] - '@oxlint/darwin-x64@0.7.0': - resolution: {integrity: sha512-GSBgglTBEecG0ri9YbQcxxu62/FxnhFScbbx6tgT9qjzKNAtpogrgx5uvi22yq0XjyD8XT3SY7oVOz8wg6GZxQ==} + '@oxlint/darwin-x64@0.6.1': + resolution: {integrity: sha512-/M126TTjEfzNRwYgopJ1qMxbJMUzzrMY64PjbXTID7ig7nLyxcMSAp454Znf8Sh/3uulPODynmkCdkReiGqPvw==} cpu: [x64] os: [darwin] - '@oxlint/linux-arm64-gnu@0.7.0': - resolution: {integrity: sha512-xrX1qpnQvFbCnyfD0OvapoqR3S7kWHbCUb7PfGI8q2n5lB1CBf55FcFapcqwbxBzzC7/JaafRJu8qEiEdRH8oA==} + '@oxlint/linux-arm64-gnu@0.6.1': + resolution: {integrity: sha512-120Qbek2yJz59iIzS0bwoM2717UTd6MRggDBgRw70rN0zdzkAZhORSywuC+EPq8U6ltIqYeMfcl+sGq7ZyhPyg==} cpu: [arm64] os: [linux] - '@oxlint/linux-arm64-musl@0.7.0': - resolution: {integrity: sha512-W3NBZiJ50Y+pPeB/qFTsspjvlRrzbq+ZiwWmNJfIDJD3eJWjICS4ehUm9qd+ZNUOtgakcG8xa69xoOg9NFE3Lg==} + '@oxlint/linux-arm64-musl@0.6.1': + resolution: {integrity: sha512-wT0T+YOW8Ng2WGcLnWCylEpHwUDRun2HomTNslRed4RQzTWOisyp6hNB8sS6JZlRGYoCGUePgwBy7GM2P0IQYw==} cpu: [arm64] os: [linux] - '@oxlint/linux-x64-gnu@0.7.0': - resolution: {integrity: sha512-gHQusonVYFwlhgWKgismXRGlAVynDIk4G2lNRKXt+sQOauIEDJTH/Kgk7xlKJmu8J1Ztrb4xjR5meDeeIgyxRg==} + '@oxlint/linux-x64-gnu@0.6.1': + resolution: {integrity: sha512-4qUcfTDXGOrm3/ohiCG09ZvjpCZImg1yI/IaOo25ij9VXLoaWUYJ6vbxY1GqPQegqZhli7fbFXQ5FP6AwjhBtQ==} cpu: [x64] os: [linux] - '@oxlint/linux-x64-musl@0.7.0': - resolution: {integrity: sha512-tT5VivFnhDS2vov8h1Hmn+Rv4vWoIQuS3I+HMaQbItMkDeh6mLanE7faeg+h9p5RqV2KLjRRDm49sdRvF05s4Q==} + '@oxlint/linux-x64-musl@0.6.1': + resolution: {integrity: sha512-v0O46xwi0EW+J3QxIZAU1h+2voIsq+BZc6/mPKzkSlnyYSPECBDFOG6IJF/rf7qzsjvIeFqdYB+sGGCxoxM5mg==} cpu: [x64] os: [linux] - '@oxlint/win32-arm64@0.7.0': - resolution: {integrity: sha512-Bt6D5eOC0Gb6TB4USXIAgZKXwuA1RVv96Und6z7GGryfDM53KpLrgAaeNXytx+u2yq74QuAtkkdsHh9wRosFFA==} + '@oxlint/win32-arm64@0.6.1': + resolution: {integrity: sha512-51NQgkd/XDQzAvFHKanjhFyKoPXvomNBHJnQF3iEYKmAGT2+VOOF9N6ism/FTLn+xGdzLBVU51xwRlmpCXt3kQ==} cpu: [arm64] os: [win32] - '@oxlint/win32-x64@0.7.0': - resolution: {integrity: sha512-Mjmw9fTpuW1iBFt1BxacM1WK4CVzHY15esx8RKOGCJD09kcxMpMvYE0ILtlXEQkTB62iJegtHav2uwkZoazkmg==} + '@oxlint/win32-x64@0.6.1': + resolution: {integrity: sha512-T8uLmIxbs1X2wbiZzIjxHJgtYEOGl7d+wZTzj701JsKHsY8DWtOCvMMgmd3EoO0XX8PPxpJYdZDWupdiIlYQ4Q==} cpu: [x64] os: [win32] @@ -1571,8 +1571,8 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} - oxlint@0.7.0: - resolution: {integrity: sha512-oZI76dyBPW+cETjci4Rm56nfumbNsUcjJoPXomaC+FBzCi2fB5gV6ibnwRnVilt9yJXWGNvloB7c8/Mmmc9B5w==} + oxlint@0.6.1: + resolution: {integrity: sha512-V66/akd9Gu2+KE6zP/QNTqlmBChL2Q9tPYR9CguKML1SaR/URXmgpvx+0ZfFIA+pDz/VzOOM0w79ozfakbW82w==} engines: {node: '>=14.*'} hasBin: true @@ -2465,28 +2465,28 @@ snapshots: '@oxc-node/core-win32-ia32-msvc': 0.0.11 '@oxc-node/core-win32-x64-msvc': 0.0.11 - '@oxlint/darwin-arm64@0.7.0': + '@oxlint/darwin-arm64@0.6.1': optional: true - '@oxlint/darwin-x64@0.7.0': + '@oxlint/darwin-x64@0.6.1': optional: true - '@oxlint/linux-arm64-gnu@0.7.0': + '@oxlint/linux-arm64-gnu@0.6.1': optional: true - '@oxlint/linux-arm64-musl@0.7.0': + '@oxlint/linux-arm64-musl@0.6.1': optional: true - '@oxlint/linux-x64-gnu@0.7.0': + '@oxlint/linux-x64-gnu@0.6.1': optional: true - '@oxlint/linux-x64-musl@0.7.0': + '@oxlint/linux-x64-musl@0.6.1': optional: true - '@oxlint/win32-arm64@0.7.0': + '@oxlint/win32-arm64@0.6.1': optional: true - '@oxlint/win32-x64@0.7.0': + '@oxlint/win32-x64@0.6.1': optional: true '@pkgjs/parseargs@0.11.0': @@ -3643,16 +3643,16 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 - oxlint@0.7.0: + oxlint@0.6.1: optionalDependencies: - '@oxlint/darwin-arm64': 0.7.0 - '@oxlint/darwin-x64': 0.7.0 - '@oxlint/linux-arm64-gnu': 0.7.0 - '@oxlint/linux-arm64-musl': 0.7.0 - '@oxlint/linux-x64-gnu': 0.7.0 - '@oxlint/linux-x64-musl': 0.7.0 - '@oxlint/win32-arm64': 0.7.0 - '@oxlint/win32-x64': 0.7.0 + '@oxlint/darwin-arm64': 0.6.1 + '@oxlint/darwin-x64': 0.6.1 + '@oxlint/linux-arm64-gnu': 0.6.1 + '@oxlint/linux-arm64-musl': 0.6.1 + '@oxlint/linux-x64-gnu': 0.6.1 + '@oxlint/linux-x64-musl': 0.6.1 + '@oxlint/win32-arm64': 0.6.1 + '@oxlint/win32-x64': 0.6.1 p-limit@2.3.0: dependencies: diff --git a/scripts/__snapshots__/rules-generator.test.ts.snap b/scripts/__snapshots__/rules-generator.test.ts.snap index 76f8d2a..315e0a9 100644 --- a/scripts/__snapshots__/rules-generator.test.ts.snap +++ b/scripts/__snapshots__/rules-generator.test.ts.snap @@ -4,28 +4,32 @@ exports[`RulesGenerator > RulesGenerator generates rules correctly > byCategory "// These rules are automatically generated by scripts/generate-rules.ts const styleRules = { - 'rulename-with-mod': 'off', -}; + 'rulename-with-mod': "off" +} const correctnessRules = { - '@typescript-eslint/rulename-without-mod': 'off', -}; + '@typescript-eslint/rulename-without-mod': "off" +} -export { styleRules, correctnessRules }; -" +export { + styleRules, + correctnessRules +}" `; exports[`RulesGenerator > RulesGenerator generates rules correctly > byScope 1`] = ` "// These rules are automatically generated by scripts/generate-rules.ts const eslintRules = { - 'rulename-with-mod': 'off', -}; + 'rulename-with-mod': "off" +} const typescriptRules = { - '@typescript-eslint/rulename-without-mod': 'off', -}; + '@typescript-eslint/rulename-without-mod': "off" +} -export { eslintRules, typescriptRules }; -" +export { + eslintRules, + typescriptRules +}" `; diff --git a/scripts/generate.ts b/scripts/generate.ts index 68b5922..d8f4ddc 100644 --- a/scripts/generate.ts +++ b/scripts/generate.ts @@ -1,5 +1,9 @@ +import { writeFileSync } from 'node:fs'; import { RulesGenerator, RulesGrouping } from './rules-generator.js'; import { traverseRules } from './traverse-rules.js'; +import { getLatestVersionFromClonedRepo } from './oxlint-version.js'; +import { TARGET_DIRECTORY, VERSION_PREFIX } from './constants.js'; +import packageJson from '../package.json' with { type: 'json' }; const { successResultArray, failureResultArray } = await traverseRules(); @@ -9,9 +13,29 @@ if (failureResultArray.length > 0) { ); } -const generator = new RulesGenerator(successResultArray); +const oxlintVersion = getLatestVersionFromClonedRepo( + TARGET_DIRECTORY, + VERSION_PREFIX +); + +if (!oxlintVersion) { + throw new Error( + 'Failed to get the latest version of oxlint, did you forget to run `pnpm clone`?' + ); +} + +const generator = new RulesGenerator(oxlintVersion, successResultArray); generator.setRulesGrouping(RulesGrouping.SCOPE); await generator.generateRules(); generator.setRulesGrouping(RulesGrouping.CATEGORY); await generator.generateRules(); + +// Update package.json version +writeFileSync( + '../package.json', + JSON.stringify({ + ...packageJson, + version: oxlintVersion.replace(VERSION_PREFIX, '').split('-')[0], + }) +); diff --git a/scripts/rules-generator.test.ts b/scripts/rules-generator.test.ts index ddf3ef9..7c60134 100644 --- a/scripts/rules-generator.test.ts +++ b/scripts/rules-generator.test.ts @@ -29,6 +29,7 @@ suite('RulesGenerator', () => { // Create an instance of RulesGenerator const generator = new RulesGenerator( + '1.0.0', successResultArray, RulesGrouping.SCOPE ); diff --git a/scripts/rules-generator.ts b/scripts/rules-generator.ts index f694e5e..d7db683 100644 --- a/scripts/rules-generator.ts +++ b/scripts/rules-generator.ts @@ -1,9 +1,6 @@ import { writeFileSync } from 'node:fs'; import path from 'node:path'; -import { getLatestVersionFromClonedRepo } from './oxlint-version.js'; -import { TARGET_DIRECTORY, VERSION_PREFIX } from './constants.js'; import type { Rule } from './traverse-rules.js'; -import prettier from 'prettier'; const __dirname = new URL('.', import.meta.url).pathname; @@ -15,14 +12,17 @@ export enum RulesGrouping { export type ResultMap = Map; export class RulesGenerator { + private oxlintVersion: string; private rulesGrouping: RulesGrouping; private rulesArray: Rule[]; constructor( + oxlintVersion: string, rulesArray: Rule[] = [], rulesGrouping: RulesGrouping = RulesGrouping.SCOPE ) { - this.rulesGrouping = rulesGrouping; + this.oxlintVersion = oxlintVersion; this.rulesArray = rulesArray; + this.rulesGrouping = rulesGrouping; } public setRulesGrouping(rulesGrouping: RulesGrouping) { @@ -45,19 +45,8 @@ export class RulesGenerator { } public async generateRulesCode() { - const oxlintVersion = getLatestVersionFromClonedRepo( - TARGET_DIRECTORY, - VERSION_PREFIX - ); - - if (!oxlintVersion) { - throw new Error( - 'Failed to get the latest version of oxlint, did you forget to run `pnpm clone`?' - ); - } - console.log( - `Generating rules for ${oxlintVersion}, grouped by ${this.rulesGrouping}` + `Generating rules for ${this.oxlintVersion}, grouped by ${this.rulesGrouping}` ); const rulesGrouping = this.rulesGrouping; @@ -93,14 +82,7 @@ export class RulesGenerator { .join(',\n'); code += '\n}'; - const prettierConfig = await prettier.resolveConfig('.', { - config: path.resolve(__dirname, '..', 'prettier.config.js'), - }); - - return await prettier.format(code, { - ...prettierConfig, - parser: 'typescript', - }); + return code; } public async generateRules() { diff --git a/src/rules-by-category.ts b/src/rules-by-category.ts index 86d58c3..c270a3a 100644 --- a/src/rules-by-category.ts +++ b/src/rules-by-category.ts @@ -7,7 +7,6 @@ const pedanticRules = { 'no-array-constructor': 'off', 'no-case-declarations': 'off', 'no-constructor-return': 'off', - 'no-fallthrough': 'off', 'no-inner-declarations': 'off', 'no-new-wrappers': 'off', 'no-prototype-builtins': 'off', @@ -41,19 +40,12 @@ const pedanticRules = { 'unicorn/no-typeof-undefined': 'off', 'unicorn/no-unreadable-iife': 'off', 'unicorn/no-useless-switch-case': 'off', - 'unicorn/prefer-array-flat': 'off', - 'unicorn/prefer-array-some': 'off', 'unicorn/prefer-blob-reading-methods': 'off', - 'unicorn/prefer-date-now': 'off', 'unicorn/prefer-dom-node-dataset': 'off', 'unicorn/prefer-dom-node-remove': 'off', 'unicorn/prefer-event-target': 'off', 'unicorn/prefer-math-trunc': 'off', - 'unicorn/prefer-native-coercion-functions': 'off', - 'unicorn/prefer-regexp-test': 'off', 'unicorn/prefer-string-replace-all': 'off', - 'unicorn/prefer-string-slice': 'off', - 'unicorn/prefer-type-error': 'off', }; const nurseryRules = { @@ -74,7 +66,6 @@ const restrictionRules = { 'default-case': 'off', 'no-bitwise': 'off', 'no-console': 'off', - 'no-empty': 'off', 'no-empty-function': 'off', 'no-eq-null': 'off', 'no-eval': 'off', @@ -84,7 +75,6 @@ const restrictionRules = { 'no-restricted-globals': 'off', 'no-undefined': 'off', 'no-unsafe-optional-chaining': 'off', - 'no-var': 'off', 'no-void': 'off', 'import/no-amd': 'off', 'import/no-cycle': 'off', @@ -110,7 +100,6 @@ const restrictionRules = { 'unicorn/no-length-as-slice-end': 'off', 'unicorn/no-magic-array-flat-depth': 'off', 'unicorn/no-process-exit': 'off', - 'unicorn/prefer-modern-math-apis': 'off', 'unicorn/prefer-number-properties': 'off', }; @@ -162,11 +151,7 @@ const styleRules = { 'unicorn/prefer-includes': 'off', 'unicorn/prefer-logical-operator-over-ternary': 'off', 'unicorn/prefer-modern-dom-apis': 'off', - 'unicorn/prefer-optional-catch-binding': 'off', 'unicorn/prefer-reflect-apply': 'off', - 'unicorn/require-array-join-separator': 'off', - 'unicorn/text-encoding-identifier-case': 'off', - 'unicorn/throw-new-error': 'off', }; const conditionalFixRules = { @@ -196,8 +181,15 @@ const conditionalFixRules = { 'unicorn/prefer-spread': 'off', }; -const correctnessRules = { +const dangerousFixRules = { 'for-direction': 'off', +}; + +const conditionalFixSuggestionRules = { + 'func-names': 'off', +}; + +const correctnessRules = { 'no-async-promise-executor': 'off', 'no-caller': 'off', 'no-class-assign': 'off', @@ -216,7 +208,6 @@ const correctnessRules = { 'no-empty-pattern': 'off', 'no-empty-static-block': 'off', 'no-ex-assign': 'off', - 'no-extra-boolean-cast': 'off', 'no-func-assign': 'off', 'no-global-assign': 'off', 'no-import-assign': 'off', @@ -325,11 +316,6 @@ const correctnessRules = { 'unicorn/no-new-array': 'off', 'unicorn/no-thenable': 'off', 'unicorn/no-useless-length-check': 'off', - 'unicorn/prefer-set-size': 'off', -}; - -const pendingRules = { - 'func-names': 'off', }; const perfRules = { @@ -394,6 +380,26 @@ const fixRules = { 'vitest/no-import-node-test': 'off', }; +const pendingRules = { + 'no-empty': 'off', + 'no-extra-boolean-cast': 'off', + 'no-fallthrough': 'off', + 'no-var': 'off', + 'unicorn/prefer-array-flat': 'off', + 'unicorn/prefer-array-some': 'off', + 'unicorn/prefer-date-now': 'off', + 'unicorn/prefer-modern-math-apis': 'off', + 'unicorn/prefer-native-coercion-functions': 'off', + 'unicorn/prefer-optional-catch-binding': 'off', + 'unicorn/prefer-regexp-test': 'off', + 'unicorn/prefer-set-size': 'off', + 'unicorn/prefer-string-slice': 'off', + 'unicorn/prefer-type-error': 'off', + 'unicorn/require-array-join-separator': 'off', + 'unicorn/text-encoding-identifier-case': 'off', + 'unicorn/throw-new-error': 'off', +}; + const suspiciousRules = { 'no-new': 'off', 'no-useless-concat': 'off', @@ -416,9 +422,11 @@ export { restrictionRules, styleRules, conditionalFixRules, + dangerousFixRules, + conditionalFixSuggestionRules, correctnessRules, - pendingRules, perfRules, fixRules, + pendingRules, suspiciousRules, }; diff --git a/tsconfig.json b/tsconfig.json index f6aa334..4c1d018 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -36,7 +36,7 @@ // "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. */ + "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 */