Skip to content
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
4 changes: 2 additions & 2 deletions .github/generated/ast_changes_watch_list.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

src:
- '.github/generated/ast_changes_watch_list.yml'
- 'apps/oxlint/src-js/generated/constants.js'
- 'apps/oxlint/src-js/generated/constants.ts'
- 'apps/oxlint/src-js/generated/deserialize.js'
- 'apps/oxlint/src-js/generated/keys.js'
- 'apps/oxlint/src-js/generated/type_ids.js'
- 'apps/oxlint/src-js/generated/type_ids.ts'
- 'apps/oxlint/src-js/generated/types.d.ts'
- 'apps/oxlint/src-js/generated/visitor.d.ts'
- 'apps/oxlint/src-js/generated/walk.js'
Expand Down
2 changes: 0 additions & 2 deletions apps/oxlint/src-js/plugins/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import { addVisitorToCompiled, compiledVisitor, finalizeCompiledVisitor, initCom

// Lazy implementation
/*
// @ts-expect-error we need to generate `.d.ts` file for this module.
import { TOKEN } from '../../dist/src-js/raw-transfer/lazy-common.js';
// @ts-expect-error we need to generate `.d.ts` file for this module.
import { walkProgram } from '../generated/walk.js';
*/

Expand Down
10 changes: 3 additions & 7 deletions apps/oxlint/src-js/plugins/source_code.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { createRequire } from 'node:module';
import {
DATA_POINTER_POS_32,
SOURCE_LEN_OFFSET,
// TODO(camc314): we need to generate `.d.ts` file for this module.
// @ts-expect-error
} from '../generated/constants.js';
// @ts-expect-error we need to generate `.d.ts` file for this module
import { DATA_POINTER_POS_32, SOURCE_LEN_OFFSET } from '../generated/constants.js';

// We use the deserializer which removes `ParenthesizedExpression`s from AST,
// and with `range`, `loc`, and `parent` properties on AST nodes, to match ESLint
// @ts-expect-error we need to generate `.d.ts` file for this module
import { deserializeProgramOnly } from '../../dist/generated/deserialize.js';

import {
Expand Down
2 changes: 0 additions & 2 deletions apps/oxlint/src-js/plugins/visitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@
// for objects created by user code in visitors. If ephemeral user-created objects all fit in new space,
// it will avoid full GC runs, which should greatly improve performance.

// TODO(camc314): we need to generate `.d.ts` file for this module.
// @ts-expect-error
import { LEAF_NODE_TYPES_COUNT, NODE_TYPE_IDS_MAP, NODE_TYPES_COUNT } from '../generated/type_ids.js';
import { assertIs } from './utils.js';

Expand Down
2 changes: 0 additions & 2 deletions apps/oxlint/test/compile-visitor.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
// TODO(camc314): we need to generate `.d.ts` file for this module
// @ts-expect-error
import { NODE_TYPE_IDS_MAP } from '../src-js/generated/type_ids.js';
import {
addVisitorToCompiled,
Expand Down
3 changes: 2 additions & 1 deletion tasks/ast_tools/src/generators/estree_visit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ impl Generator for ESTreeVisitGenerator {
code: visitor_keys,
},
Output::Javascript {
path: format!("{OXLINT_APP_PATH}/src-js/generated/type_ids.js"),
// This file is also valid as TS
path: format!("{OXLINT_APP_PATH}/src-js/generated/type_ids.ts"),
code: type_ids_map,
},
Output::Javascript {
Expand Down
3 changes: 2 additions & 1 deletion tasks/ast_tools/src/generators/raw_transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ impl Generator for RawTransferGenerator {
code: constants_js.clone(),
},
Output::Javascript {
path: format!("{OXLINT_APP_PATH}/src-js/generated/constants.js"),
// This file is also valid as TS
path: format!("{OXLINT_APP_PATH}/src-js/generated/constants.ts"),
code: constants_js,
},
Output::Rust {
Expand Down
Loading