Skip to content

Commit

Permalink
fix: revert usage of node: built-in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
Desvelao committed Dec 16, 2024
1 parent 073b7ff commit 8f7a3c1
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ module.exports = {
'unicorn/prefer-module': 'off',
'unicorn/prefer-ternary': 'off',
'unicorn/numeric-separators-style': 'off',
'unicorn/prefer-node-protocol': 'off',
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/custom-error-definition.md
'unicorn/custom-error-definition': 'error',
// https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/better-regex.md
Expand Down
4 changes: 2 additions & 2 deletions plugins/main/server/controllers/wazuh-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/

// Require some libraries
import fs from 'node:fs';
import path from 'node:path';
import fs from 'fs';
import path from 'path';
import { Parser } from 'json2csv';
import jwtDecode from 'jwt-decode';
import {
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* Find more information about this on the LICENSE file.
*/
import path from 'node:path';
import path from 'path';
import { version } from '../package.json';
// import { validate as validateNodeCronInterval } from 'node-cron';
import { SettingsValidator } from '../common/services/settings-validator';
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/common/services/settings-validator.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import path from 'node:path';
import path from 'path';
import { formatBytes } from './file-size';

export const SettingsValidator = {
Expand Down
2 changes: 1 addition & 1 deletion plugins/wazuh-core/server/services/server-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Find more information about this on the LICENSE file.
*/

import https from 'node:https';
import https from 'https';
import axios, { AxiosInstance, AxiosResponse } from 'axios';
import { Logger } from 'opensearch-dashboards/server';
import { getCookieValueByName } from './cookie';
Expand Down

0 comments on commit 8f7a3c1

Please sign in to comment.