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
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import js from '@eslint/js';
import globals from 'globals';
import { defineConfig } from 'eslint/config';
import stylistic from '@stylistic/eslint-plugin';
import importPlugin from 'eslint-plugin-import';

export default defineConfig([
{
files: ['**/*.{js,mjs,cjs}'],
plugins: {
import: importPlugin,
js,
'@stylistic': stylistic
},
Expand All @@ -17,6 +19,9 @@ export default defineConfig([
...globals.node,
...globals.mocha
}
},
rules: {
'import/enforce-node-protocol-usage': ['error', 'always']
}
}
]);
2 changes: 1 addition & 1 deletion lib/poparser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import encoding from 'encoding';
import { formatCharset, parseNPluralFromHeadersSafely, parseHeader } from './shared.js';
import { Transform } from 'node:stream';
import util from 'util';
import util from 'node:util';

/**
* Parses a PO object into translation table
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@eslint/js": "^9.39.2",
"@stylistic/eslint-plugin": "^5.6.1",
"eslint": "^9.39.2",
"eslint-plugin-import": "^2.32.0",
"globals": "^16.5.0"
},
"keywords": [
Expand Down
8 changes: 4 additions & 4 deletions test/mo-compiler-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { promisify } from 'util';
import path from 'path';
import { promisify } from 'node:util';
import path from 'node:path';
import { mo } from '../index.js';
import { readFile as fsReadFile } from 'fs';
import { fileURLToPath } from 'url';
import { readFile as fsReadFile } from 'node:fs';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down
8 changes: 4 additions & 4 deletions test/mo-parser-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { promisify } from 'util';
import path from 'path';
import { promisify } from 'node:util';
import path from 'node:path';
import { mo } from '../index.js';
import { readFile as fsReadFile } from 'fs';
import { fileURLToPath } from 'url';
import { readFile as fsReadFile } from 'node:fs';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down
10 changes: 5 additions & 5 deletions test/po-compiler-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { EOL } from 'os';
import { promisify } from 'util';
import path from 'path';
import { readFile as fsReadFile } from 'fs';
import { EOL } from 'node:os';
import { promisify } from 'node:util';
import path from 'node:path';
import { readFile as fsReadFile } from 'node:fs';
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { po } from '../index.js';
import { fileURLToPath } from 'url';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down
10 changes: 5 additions & 5 deletions test/po-obsolete-test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { EOL } from 'os';
import { EOL } from 'node:os';
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { promisify } from 'util';
import path from 'path';
import fs from 'fs';
import { promisify } from 'node:util';
import path from 'node:path';
import fs from 'node:fs';
import * as gettextParser from '../index.js';
import { fileURLToPath } from 'url';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down
8 changes: 4 additions & 4 deletions test/po-parser-test.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { describe, it } from 'node:test';
import assert from 'node:assert';
import { promisify } from 'util';
import path from 'path';
import fs from 'fs';
import { promisify } from 'node:util';
import path from 'node:path';
import fs from 'node:fs';
import * as gettextParser from '../index.js';
import { fileURLToPath } from 'url';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down
8 changes: 4 additions & 4 deletions test/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import { describe, it } from 'node:test';
import assert from 'node:assert';
import { promisify } from 'util';
import path from 'path';
import { promisify } from 'node:util';
import path from 'node:path';
import { formatCharset, parseHeader, generateHeader, foldLine, parseNPluralFromHeadersSafely } from '../lib/shared.js';
import { readFile as fsReadFile } from 'fs';
import { fileURLToPath } from 'url';
import { readFile as fsReadFile } from 'node:fs';
import { fileURLToPath } from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
Expand Down