From 6ffc305ef4bcb0ba3b5cee654dbd75ee5ccf2e7d Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Tue, 17 Sep 2024 22:15:42 -0500 Subject: [PATCH 1/4] Fix issues with type definitions --- lib/unsupported-api.js | 3 ++- package.json | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/unsupported-api.js b/lib/unsupported-api.js index 50e7f5bd6d22..1feb18f42693 100644 --- a/lib/unsupported-api.js +++ b/lib/unsupported-api.js @@ -14,13 +14,14 @@ const { FileEnumerator } = require("./cli-engine/file-enumerator"); const { ESLint: FlatESLint, shouldUseFlatConfig } = require("./eslint/eslint"); const { LegacyESLint } = require("./eslint/legacy-eslint"); +const builtinRules = require("./rules"); //----------------------------------------------------------------------------- // Exports //----------------------------------------------------------------------------- module.exports = { - builtinRules: require("./rules"), + builtinRules, FlatESLint, shouldUseFlatConfig, FileEnumerator, diff --git a/package.json b/package.json index 2f861be4ac6a..e415cbc4258d 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,19 @@ "default": "./lib/universal.js" } }, + "typesVersions": { + "*": { + "use-at-your-own-risk": [ + "./lib/types/use-at-your-own-risk.d.ts" + ], + "rules": [ + "./lib/types/rules/index.d.ts" + ], + "universal": [ + "./lib/types/universal.d.ts" + ] + } + }, "scripts": { "build:docs:update-links": "node tools/fetch-docs-links.js", "build:site": "node Makefile.js gensite", From 1347aa13e094ad63626933aca772386b1cea38fb Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 26 Sep 2024 05:28:28 -0500 Subject: [PATCH 2/4] Add `@arethetypeswrong/cli` to `devDependencies` --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e415cbc4258d..c4c22140d00c 100644 --- a/package.json +++ b/package.json @@ -133,6 +133,7 @@ "text-table": "^0.2.0" }, "devDependencies": { + "@arethetypeswrong/cli": "^0.16.4", "@babel/core": "^7.4.3", "@babel/preset-env": "^7.4.3", "@eslint/json": "^0.4.0", From b0b999818932f30dc32da421468b750c436c1b24 Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Thu, 26 Sep 2024 05:29:04 -0500 Subject: [PATCH 3/4] Add `lint:types` command --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index c4c22140d00c..3c8ff460d255 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "lint:unused": "knip", "lint:fix": "trunk check -y --ignore=docs/**/*.js -a --filter=eslint && trunk check -y --ignore=docs/**/*.js", "lint:fix:docs:js": "trunk check -y --ignore=** --ignore=!docs/**/*.js -a --flter=eslint && trunk check -y --ignore=** --ignore=!docs/**/*.js", + "lint:types": "attw --pack", "release:generate:alpha": "node Makefile.js generatePrerelease -- alpha", "release:generate:beta": "node Makefile.js generatePrerelease -- beta", "release:generate:latest": "node Makefile.js generateRelease -- latest", From b4193f28087f35e304c2903f9b97810c8e65798a Mon Sep 17 00:00:00 2001 From: Arya Emami Date: Wed, 25 Sep 2024 12:51:02 -0500 Subject: [PATCH 4/4] Add `are-the-types-wrong` CI job --- .github/workflows/types-integration.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/types-integration.yml b/.github/workflows/types-integration.yml index fde75db8c813..babeeb9f98a5 100644 --- a/.github/workflows/types-integration.yml +++ b/.github/workflows/types-integration.yml @@ -130,7 +130,7 @@ jobs: - name: Install Packages (eslint) working-directory: eslint run: npm install - + - name: Update package.json eslint-visitor-keys uses: restackio/update-json-file-action@2.1 with: @@ -146,3 +146,24 @@ jobs: - name: Run TSC working-directory: eslint-js run: npm run build:types --workspace eslint-visitor-keys + + are-the-types-wrong: + name: Are the types wrong? + runs-on: ubuntu-latest + steps: + - name: Checkout eslint + uses: actions/checkout@v4 + with: + path: eslint + + - uses: actions/setup-node@v4 + with: + node-version: "lts/*" + + - name: Install Packages + working-directory: eslint + run: npm install + + - name: Check validity of type definitions + working-directory: eslint + run: npm run lint:types \ No newline at end of file pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy