Skip to content

Commit 690abec

Browse files
committed
test(linter/plugins): use subpath imports (#15920)
Shorten imports in test fixtures using [subpath imports](https://nodejs.org/docs/latest-v24.x/api/packages.html#subpath-imports). Before: ```ts import type { Plugin } from '../../../dist/index.js'; ``` After: ```ts import type { Plugin } from '#oxlint'; ```
1 parent ca7a6d3 commit 690abec

File tree

48 files changed

+53
-50
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+53
-50
lines changed

apps/oxlint/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,8 @@
4545
"darwin-x64",
4646
"darwin-arm64"
4747
]
48+
},
49+
"imports": {
50+
"#oxlint": "./dist/index.js"
4851
}
4952
}

apps/oxlint/test/fixtures/basic_custom_plugin/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin } from '../../../dist/index.js';
1+
import type { Plugin } from '#oxlint';
22

33
const plugin: Plugin = {
44
meta: {

apps/oxlint/test/fixtures/basic_custom_plugin_many_files/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin } from '../../../dist/index.js';
1+
import type { Plugin } from '#oxlint';
22

33
const plugin: Plugin = {
44
meta: {

apps/oxlint/test/fixtures/basic_custom_plugin_multiple_rules/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin } from '../../../dist/index.js';
1+
import type { Plugin } from '#oxlint';
22

33
const plugin: Plugin = {
44
meta: {

apps/oxlint/test/fixtures/basic_custom_plugin_warn_severity/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin } from '../../../dist/index.js';
1+
import type { Plugin } from '#oxlint';
22

33
const plugin: Plugin = {
44
meta: {

apps/oxlint/test/fixtures/comments/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import assert from 'node:assert';
22

3-
import type { Comment, Plugin, Rule } from '../../../dist/index.js';
3+
import type { Comment, Plugin, Rule } from '#oxlint';
44

55
function formatComments(comments: Comment[]): string {
66
let text = `${comments.length} comment${comments.length === 1 ? '' : 's'}`;

apps/oxlint/test/fixtures/context_properties/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Node, Plugin, Rule } from '../../../dist/index.js';
1+
import type { Node, Plugin, Rule } from '#oxlint';
22

33
const SPAN: Node = {
44
start: 0,

apps/oxlint/test/fixtures/context_wrapping/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin, Rule, Context, Diagnostic, Node } from '../../../dist/index.js';
1+
import type { Plugin, Rule, Context, Diagnostic, Node } from '#oxlint';
22

33
const SPAN: Node = {
44
start: 0,

apps/oxlint/test/fixtures/createOnce/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Node, Plugin, Rule } from '../../../dist/index.js';
1+
import type { Node, Plugin, Rule } from '#oxlint';
22

33
const SPAN: Node = {
44
start: 0,

apps/oxlint/test/fixtures/custom_plugin_disable_directives/plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Plugin } from '../../../dist/index.js';
1+
import type { Plugin } from '#oxlint';
22

33
const plugin: Plugin = {
44
meta: {

0 commit comments

Comments
 (0)