Skip to content

Commit

Permalink
Use node: import prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinigami92 committed May 2, 2023
1 parent 192812c commit 85f6b47
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 24 deletions.
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
3 changes: 1 addition & 2 deletions tests/options/semi/semi.test.ts
@@ -1,5 +1,4 @@
import path from 'path';

import path from 'node:path';
import type { CompareFilesOptions } from 'tests/common';
import { compareFiles } from 'tests/common';
import { describe, expect, it } from 'vitest';
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

0 comments on commit 85f6b47

Please sign in to comment.