import { withDefaultOption, type EslintNRules } from '../types/index.mjs'; export const eslintNRules = { 'n/callback-return': 'off', 'n/exports-style': 'off', 'n/file-extension-in-import': 'off', 'n/global-require': 'off', 'n/handle-callback-err': 'off', 'n/hashbang': 'off', 'n/no-callback-literal': 'off', 'n/no-deprecated-api': withDefaultOption('error'), 'n/no-exports-assign': 'error', 'n/no-extraneous-import': 'off', 'n/no-extraneous-require': 'off', 'n/no-missing-import': 'off', 'n/no-missing-require': 'off', 'n/no-mixed-requires': 'off', 'n/no-new-require': 'error', 'n/no-path-concat': 'error', 'n/no-process-env': 'off', 'n/no-process-exit': 'error', 'n/no-restricted-import': 'off', 'n/no-restricted-require': 'off', 'n/no-sync': 'off', 'n/no-top-level-await': 'off', 'n/no-unpublished-bin': withDefaultOption('error'), 'n/no-unpublished-import': 'off', 'n/no-unpublished-require': 'off', 'n/no-unsupported-features/es-builtins': 'off', 'n/no-unsupported-features/es-syntax': 'off', 'n/no-unsupported-features/node-builtins': 'off', 'n/prefer-global/buffer': 'off', 'n/prefer-global/console': 'off', 'n/prefer-global/process': 'off', 'n/prefer-global/text-decoder': 'off', 'n/prefer-global/text-encoder': 'off', 'n/prefer-global/url-search-params': 'off', 'n/prefer-global/url': 'off', // Nothing here imports `node:assert`, and the strict entry point is the // one worth landing on, so this costs nothing to keep on. 'n/prefer-import/assert-strict': 'error', 'n/prefer-node-protocol': ['error', { version: '>=18.0.0' }], // `process.getBuiltinModule()` only earns its keep where a builtin may be // absent at runtime; the convention here is a static `node:` import. 'n/prefer-process-get-builtin-module': 'off', 'n/prefer-promises/dns': 'off', 'n/prefer-promises/fs': 'off', 'n/process-exit-as-throw': 'off', 'n/prefer-global/crypto': ['error', 'always'], 'n/prefer-global/timers': ['error', 'always'], // deprecated 'n/no-hide-core-modules': 0, 'n/shebang': 0, } as const satisfies EslintNRules;