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

fix: Issues with type definitions #18940

Merged
merged 4 commits into from
Sep 27, 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
23 changes: 22 additions & 1 deletion .github/workflows/types-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
3 changes: 2 additions & 1 deletion lib/unsupported-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -38,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",
Expand Down Expand Up @@ -120,6 +134,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",
Expand Down
Loading
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