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

Use node: import prefix #381

Merged
merged 1 commit into from May 2, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/options/empty-attributes/index.ts
@@ -1,6 +1,5 @@
import type { ChoiceSupportOption, PathArraySupportOption } from 'prettier';
import { CATEGORY_PUG } from '../constants';

import type { PugEmptyAttributes } from './types';

/** Pug empty attributes option. */
Expand Down
2 changes: 1 addition & 1 deletion src/printer.ts
@@ -1,3 +1,4 @@
import { types } from 'node:util';
import type { BuiltInParserName, Options, RequiredOptions } from 'prettier';
import { format } from 'prettier';
import type { parsers as AngularParsers } from 'prettier/parser-angular';
Expand Down Expand Up @@ -52,7 +53,6 @@ import type {
WhileToken,
YieldToken,
} from 'pug-lexer';
import { types } from 'util';
import type { DoctypeShortcut } from './doctype-shortcut-registry';
import { DOCTYPE_SHORTCUT_REGISTRY } from './doctype-shortcut-registry';
import { logger } from './logger';
Expand Down
4 changes: 2 additions & 2 deletions tests/common.ts
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import type { Options } from 'prettier';
import { format } from 'prettier';
import type { AttributeToken } from 'pug-lexer';
Expand Down
4 changes: 2 additions & 2 deletions tests/interpolations/interpolations.test.ts
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { format } from 'prettier';
import { plugin } from 'src/index';
import { compareFiles } from 'tests/common';
Expand Down
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { format } from 'prettier';
import { plugin } from 'src/index';
import { describe, expect, it } from 'vitest';
Expand Down
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { format } from 'prettier';
import { plugin } from 'src/index';
import { describe, expect, it } from 'vitest';
Expand Down
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { format } from 'prettier';
import { plugin } from 'src/index';
import { describe, expect, it } from 'vitest';
Expand Down
4 changes: 2 additions & 2 deletions tests/options/pugExplicitDiv/pug-explicit-div.test.ts
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import type { Options } from 'prettier';
import { format } from 'prettier';
import { plugin } from 'src/index';
Expand Down
5 changes: 2 additions & 3 deletions tests/options/semi/semi.test.ts
@@ -1,5 +1,4 @@
import path from 'path';

import { join } from 'node:path';
import type { CompareFilesOptions } from 'tests/common';
import { compareFiles } from 'tests/common';
import { describe, expect, it } from 'vitest';
Expand All @@ -13,7 +12,7 @@ describe('semi handling', () => {
] as const)(
'should format script tags with %s inline code to %s',
(from, to) => {
const fixturesPath: string = path.join(__dirname, `${from}-${to}`);
const fixturesPath: string = join(__dirname, `${from}-${to}`);
const options: CompareFilesOptions = {
formatOptions: { semi: to === 'semi' },
};
Expand Down
2 changes: 1 addition & 1 deletion tests/options/sortAttributes/sort-attributes.test.ts
Expand Up @@ -3,8 +3,8 @@ import {
compareAttributeToken,
stableSort,
} from 'src/options/attribute-sorting/utils';
import { compareFiles, createAttributeToken } from 'tests/common';
import { describe, expect, it } from 'vitest';
import { compareFiles, createAttributeToken } from '../../common';

describe('Options', () => {
describe('sortAttributes', () => {
Expand Down
4 changes: 2 additions & 2 deletions tests/pragma/detect-pragma/detect-pragma.test.ts
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import type { Parser } from 'prettier';
import { parsers } from 'src/index';
import { describe, expect, it } from 'vitest';
Expand Down
4 changes: 2 additions & 2 deletions tests/pug-tests/pug.test.ts
@@ -1,5 +1,5 @@
import { readdirSync, readFileSync } from 'fs';
import { resolve } from 'path';
import { readdirSync, readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { format } from 'prettier';
import { plugin } from 'src/index';
import { describe, expect, it } from 'vitest';
Expand Down
4 changes: 2 additions & 2 deletions tests/syntax-errors/syntax-errors.test.ts
@@ -1,5 +1,5 @@
import { readFileSync } from 'fs';
import { resolve } from 'path';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import { format } from 'prettier';
import { plugin } from 'src/index';
import { describe, expect, it } from 'vitest';
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
@@ -1,5 +1,5 @@
/// <reference types="vitest" />
import { resolve } from 'path';
import { resolve } from 'node:path';
import { defineConfig } from 'vite';

export default defineConfig({
Expand Down