Skip to content

Commit

Permalink
build(ls): use nodenext for TypeScript modules (#4495)
Browse files Browse the repository at this point in the history
Refs #4385
  • Loading branch information
glowcloud authored Nov 14, 2024
1 parent 271b337 commit 65f6d92
Show file tree
Hide file tree
Showing 1,881 changed files with 5,371 additions and 5,339 deletions.
22 changes: 22 additions & 0 deletions packages/apidom-ls/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"settings": {
"import/resolver": {
"typescript": {
"project": ["./tsconfig.json"]
}
}
},
"rules": {
"import/extensions": [
"error",
"always",
{
"ts": "always",
"tsx": "always",
"js": "always",
"jsx": "never",
"ignorePackages": true
}
]
}
}
2 changes: 1 addition & 1 deletion packages/apidom-ls/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"clean": "rimraf --glob 'src/**/*.mjs' 'src/**/*.cjs' 'test/**/*.mjs' ./dist ./types",
"test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha",
"typescript:check-types": "tsc --noEmit",
"typescript:declaration": "tsc -p declaration.tsconfig.json && rollup -c config/rollup/types.dist.js",
"typescript:declaration": "tsc -p tsconfig.declaration.json && rollup -c config/rollup/types.dist.js",
"prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
"postpack": "rimraf NOTICE LICENSES"
},
Expand Down
26 changes: 13 additions & 13 deletions packages/apidom-ls/src/apidom-language-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ import {
LanguageService,
LanguageServiceContext,
LanguageSettings,
} from './apidom-language-types';
import { DefaultValidationService } from './services/validation/validation-service';
import { DefaultCompletionService } from './services/completion/completion-service';
import { DefaultSymbolsService } from './services/symbols/symbols-service';
import { DefaultSemanticTokensService } from './services/semantic-tokens/semantic-tokens-service';
import { DefaultHoverService } from './services/hover/hover-service';
import { DefaultDerefService } from './services/deref/deref-service';
import { DefaultDefinitionService } from './services/definition/definition-service';
import { getDocumentCache } from './document-cache';
import { parse } from './parser-factory';
import { config } from './config/config';
import { togglePerformanceLogs, toggleLogs, getSourceMap, debug } from './utils/utils';
import { DefaultLinksService } from './services/links/links-service';
} from './apidom-language-types.ts';
import { DefaultValidationService } from './services/validation/validation-service.ts';
import { DefaultCompletionService } from './services/completion/completion-service.ts';
import { DefaultSymbolsService } from './services/symbols/symbols-service.ts';
import { DefaultSemanticTokensService } from './services/semantic-tokens/semantic-tokens-service.ts';
import { DefaultHoverService } from './services/hover/hover-service.ts';
import { DefaultDerefService } from './services/deref/deref-service.ts';
import { DefaultDefinitionService } from './services/definition/definition-service.ts';
import { getDocumentCache } from './document-cache.ts';
import { parse } from './parser-factory.ts';
import { config } from './config/config.ts';
import { togglePerformanceLogs, toggleLogs, getSourceMap, debug } from './utils/utils.ts';
import { DefaultLinksService } from './services/links/links-service.ts';

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export default function getLanguageService(context: LanguageServiceContext): LanguageService {
Expand Down
6 changes: 3 additions & 3 deletions packages/apidom-ls/src/config/ads/config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import infoMeta from './info/meta';
import mainMeta from './main/meta';
import ApilintCodes from '../codes';
import infoMeta from './info/meta.ts';
import mainMeta from './main/meta.ts';
import ApilintCodes from '../codes.ts';

export default {
'*': {
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ls/src/config/ads/info/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ApidomCompletionItem,
CompletionFormat,
CompletionType,
} from '../../../apidom-language-types';
} from '../../../apidom-language-types.ts';

const completion: ApidomCompletionItem[] = [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ls/src/config/ads/info/lint/allowed-fields.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const allowedFieldsLint: LinterMeta = {
code: ApilintCodes.NOT_ALLOWED_FIELDS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const descriptionTypeLint: LinterMeta = {
code: ApilintCodes.ADS_INFO_FIELD_DESCRIPTION_TYPE,
Expand Down
8 changes: 4 additions & 4 deletions packages/apidom-ls/src/config/ads/info/lint/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import titleRequiredLint from './title--required';
import titleTypeLint from './title--type';
import descriptionTypeLint from './description--type';
import allowedFieldsLint from './allowed-fields';
import titleRequiredLint from './title--required.ts';
import titleTypeLint from './title--type.ts';
import descriptionTypeLint from './description--type.ts';
import allowedFieldsLint from './allowed-fields.ts';

const lints = [titleTypeLint, titleRequiredLint, descriptionTypeLint, allowedFieldsLint];

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const titleRequiredLint: LinterMeta = {
code: ApilintCodes.ADS_INFO_FIELD_TITLE_REQUIRED,
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ls/src/config/ads/info/lint/title--type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const titleTypeLint: LinterMeta = {
code: ApilintCodes.ADS_INFO_FIELD_TITLE_TYPE,
Expand Down
8 changes: 4 additions & 4 deletions packages/apidom-ls/src/config/ads/info/meta.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import lint from './lint';
import completion from './completion';
import documentation from './documentation';
import { FormatMeta } from '../../../apidom-language-types';
import lint from './lint/index.ts';
import completion from './completion.ts';
import documentation from './documentation.ts';
import { FormatMeta } from '../../../apidom-language-types.ts';

const meta: FormatMeta = {
lint,
Expand Down
2 changes: 1 addition & 1 deletion packages/apidom-ls/src/config/ads/main/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ApidomCompletionItem,
CompletionFormat,
CompletionType,
} from '../../../apidom-language-types';
} from '../../../apidom-language-types.ts';

const completion: ApidomCompletionItem[] = [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ls/src/config/ads/main/lint/allowed-fields.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const allowedFieldsLint: LinterMeta = {
code: ApilintCodes.NOT_ALLOWED_FIELDS,
Expand Down
10 changes: 5 additions & 5 deletions packages/apidom-ls/src/config/ads/main/lint/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import allowedFieldsLint from './allowed-fields';
import infoTypeLint from './info--type';
import infoRequiredLint from './info--required';
import versionPatternLint from './version--pattern';
import versionRequiredLint from './version--required';
import allowedFieldsLint from './allowed-fields.ts';
import infoTypeLint from './info--type.ts';
import infoRequiredLint from './info--required.ts';
import versionPatternLint from './version--pattern.ts';
import versionRequiredLint from './version--required.ts';

const lints = [
infoTypeLint,
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ls/src/config/ads/main/lint/info--required.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const infoRequiredLint: LinterMeta = {
code: ApilintCodes.ADS_MAIN_FIELD_INFO_REQUIRED,
Expand Down
4 changes: 2 additions & 2 deletions packages/apidom-ls/src/config/ads/main/lint/info--type.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const infoTypeLint: LinterMeta = {
code: ApilintCodes.ADS_MAIN_FIELD_INFO_TYPE,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const versionPatternLint: LinterMeta = {
code: ApilintCodes.ADS_MAIN_FIELD_VERSION_PATTERN,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const versionRequiredLint: LinterMeta = {
code: ApilintCodes.ADS_MAIN_FIELD_VERSION_REQUIRED,
Expand Down
8 changes: 4 additions & 4 deletions packages/apidom-ls/src/config/ads/main/meta.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import lint from './lint';
import completion from './completion';
import documentation from './documentation';
import { FormatMeta } from '../../../apidom-language-types';
import lint from './lint/index.ts';
import completion from './completion.ts';
import documentation from './documentation.ts';
import { FormatMeta } from '../../../apidom-language-types.ts';

const meta: FormatMeta = {
lint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ApidomCompletionItem,
CompletionFormat,
CompletionType,
} from '../../../apidom-language-types';
} from '../../../apidom-language-types.ts';

const completion: ApidomCompletionItem[] = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import valuePattern2_0_0Lint from './value--pattern-2-0-0';
import valuePattern2_1_0Lint from './value--pattern-2-1-0';
import valuePattern2_2_0Lint from './value--pattern-2-2-0';
import valuePattern2_3_0Lint from './value--pattern-2-3-0';
import valuePattern2_4_0Lint from './value--pattern-2-4-0';
import valuePattern2_5_0Lint from './value--pattern-2-5-0';
import valuePattern2_6_0Lint from './value--pattern-2-6-0';
import valuePattern2_0_0Lint from './value--pattern-2-0-0.ts';
import valuePattern2_1_0Lint from './value--pattern-2-1-0.ts';
import valuePattern2_2_0Lint from './value--pattern-2-2-0.ts';
import valuePattern2_3_0Lint from './value--pattern-2-3-0.ts';
import valuePattern2_4_0Lint from './value--pattern-2-4-0.ts';
import valuePattern2_5_0Lint from './value--pattern-2-5-0.ts';
import valuePattern2_6_0Lint from './value--pattern-2-6-0.ts';

const lints = [
valuePattern2_0_0Lint,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_0_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_1_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_2_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_3_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_4_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_5_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

// eslint-disable-next-line @typescript-eslint/naming-convention
const valuePattern2_6_0Lint: LinterMeta = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import lint from './lint';
import completion from './completion';
import documentation from './documentation';
import { FormatMeta } from '../../../apidom-language-types';
import lint from './lint/index.ts';
import completion from './completion.ts';
import documentation from './documentation.ts';
import { FormatMeta } from '../../../apidom-language-types.ts';

const meta: FormatMeta = {
lint,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
ApidomCompletionItem,
CompletionFormat,
CompletionType,
} from '../../../apidom-language-types';
} from '../../../apidom-language-types.ts';

const completion: ApidomCompletionItem[] = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const allowedFieldsLint: LinterMeta = {
code: ApilintCodes.NOT_ALLOWED_FIELDS,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const asyncapiRequiredLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_ASYNC_API_FIELD_ASYNCAPI_REQUIRED,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const channelsRequiredLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_ASYNC_API_FIELD_CHANNELS_REQUIRED,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DiagnosticSeverity } from 'vscode-languageserver-types';

import ApilintCodes from '../../../codes';
import { LinterMeta } from '../../../../apidom-language-types';
import ApilintCodes from '../../../codes.ts';
import { LinterMeta } from '../../../../apidom-language-types.ts';

const channelsTypeLint: LinterMeta = {
code: ApilintCodes.ASYNCAPI2_ASYNC_API_FIELD_CHANNELS_TYPE,
Expand Down
Loading

0 comments on commit 65f6d92

Please sign in to comment.