Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

eslint-define-config

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eslint-define-config - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

src/rules/node/callback-return.d.ts

3

package.json
{
"name": "eslint-define-config",
"version": "1.1.0",
"version": "1.1.1",
"description": "Provide a defineConfig function for .eslintrc.js files",

@@ -52,2 +52,3 @@ "main": "src/index.js",

"eslint-plugin-jsdoc": "~36.1.0",
"eslint-plugin-node": "~11.1.0",
"eslint-plugin-prettier": "~4.0.0",

@@ -54,0 +55,0 @@ "eslint-plugin-spellcheck": "~0.0.19",

@@ -0,2 +1,9 @@

import type { CallbackReturnRule } from './callback-return';
import type { ExportsStyleRule } from './exports-style';
import type { FileExtensionInImportRule } from './file-extension-in-import';
import type { GlobalRequireRule } from './global-require';
import type { HandleCallbackErrRule } from './handle-callback-err';
import type { NoCallbackLiteralRule } from './no-callback-literal';
import type { NoDeprecatedApiRule } from './no-deprecated-api';
import type { NoExportsAssignRule } from './no-exports-assign';
import type { NoExtraneousImportRule } from './no-extraneous-import';

@@ -6,12 +13,32 @@ import type { NoExtraneousRequireRule } from './no-extraneous-require';

import type { NoMissingRequireRule } from './no-missing-require';
import type { NoProcessExitRuleConfig } from './no-process-exit';
import type { NoMixedRequiresRule } from './no-mixed-requires';
import type { NoNewRequireRule } from './no-new-require';
import type { NoPathConcatRule } from './no-path-concat';
import type { NoProcessEnvRule } from './no-process-env';
import type { NoProcessExitRule } from './no-process-exit';
import type { NoRestrictedImportRule } from './no-restricted-import';
import type { NoRestrictedRequireRule } from './no-restricted-require';
import type { NoSyncRule } from './no-sync';
import type { NoUnpublishedBinRule } from './no-unpublished-bin';
import type { NoUnpublishedImportRule } from './no-unpublished-import';
import type { NoUnpublishedRequireRule } from './no-unpublished-require';
import type { NoUnsupportedFeaturesEsBuiltinsRule } from './no-unsupported-features/es-builtins';
import type { NoUnsupportedFeaturesEsSyntaxRule } from './no-unsupported-features/es-syntax';
import type { NoUnsupportedFeaturesNodeBuiltinsRule } from './no-unsupported-features/node-builtins';
import type { ProcessExitAsThrowRule } from './process-exit-as-throw';
import type { ShebangRule } from './shebang';
import type { NoHideCoreModulesRule } from './no-hide-core-modules';
import type { NoUnsupportedFeaturesRule } from './no-unsupported-features';
/**
* All node rules.
* All Node rules.
*/
export type NodeRules = NoDeprecatedApiRule &
export type NodeRules = CallbackReturnRule &
ExportsStyleRule &
FileExtensionInImportRule &
GlobalRequireRule &
HandleCallbackErrRule &
NoCallbackLiteralRule &
NoDeprecatedApiRule &
NoExportsAssignRule &
NoExtraneousImportRule &

@@ -21,6 +48,19 @@ NoExtraneousRequireRule &

NoMissingRequireRule &
NoProcessExitRuleConfig &
NoMixedRequiresRule &
NoNewRequireRule &
NoPathConcatRule &
NoProcessEnvRule &
NoProcessExitRule &
NoRestrictedImportRule &
NoRestrictedRequireRule &
NoSyncRule &
NoUnpublishedBinRule &
NoUnpublishedImportRule &
NoUnpublishedRequireRule &
NoUnsupportedFeaturesEsSyntaxRule;
NoUnsupportedFeaturesEsBuiltinsRule &
NoUnsupportedFeaturesEsSyntaxRule &
NoUnsupportedFeaturesNodeBuiltinsRule &
ProcessExitAsThrowRule &
ShebangRule &
NoHideCoreModulesRule &
NoUnsupportedFeaturesRule;

@@ -1,109 +0,7 @@

import { LiteralUnion } from '../../utility-types';
import type { RuleConfig } from '../rule-config';
/** NoDeprecatedApiModuleItem. */
export type NoDeprecatedApiModuleItem =
| '_linklist'
| '_stream_wrap'
| 'async_hooks.currentId'
| 'async_hooks.triggerId'
| 'buffer.Buffer()'
| 'new buffer.Buffer()'
| 'buffer.SlowBuffer'
| 'constants'
| 'crypto._toBuf'
| 'crypto.Credentials'
| 'crypto.DEFAULT_ENCODING'
| 'crypto.createCipher'
| 'crypto.createCredentials'
| 'crypto.createDecipher'
| 'crypto.fips'
| 'crypto.prng'
| 'crypto.pseudoRandomBytes'
| 'crypto.rng'
| 'domain'
| 'events.EventEmitter.listenerCount'
| 'events.listenerCount'
| 'freelist'
| 'fs.SyncWriteStream'
| 'fs.exists'
| 'fs.lchmod'
| 'fs.lchmodSync'
| 'http.createClient'
| 'module.Module.createRequireFromPath'
| 'module.createRequireFromPath'
| 'module.Module.requireRepl'
| 'module.requireRepl'
| 'module.Module._debug'
| 'module._debug'
| 'net._setSimultaneousAccepts'
| 'os.tmpDir'
| 'path._makeLong'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
| 'punycode'
| 'readline.codePointAt'
| 'readline.getStringWidth'
| 'readline.isFullWidthCodePoint'
| 'readline.stripVTControlCharacters'
| 'sys'
| 'timers.enroll'
| 'timers.unenroll'
| 'tls.CleartextStream'
| 'tls.CryptoStream'
| 'tls.SecurePair'
| 'tls.convertNPNProtocols'
| 'tls.createSecurePair'
| 'tls.parseCertString'
| 'tty.setRawMode'
| 'url.parse'
| 'url.resolve'
| 'util.debug'
| 'util.error'
| 'util.isArray'
| 'util.isBoolean'
| 'util.isBuffer'
| 'util.isDate'
| 'util.isError'
| 'util.isFunction'
| 'util.isNull'
| 'util.isNullOrUndefined'
| 'util.isNumber'
| 'util.isObject'
| 'util.isPrimitive'
| 'util.isRegExp'
| 'util.isString'
| 'util.isSymbol'
| 'util.isUndefined'
| 'util.log'
| 'util.print'
| 'util.pump'
| 'util.puts'
| 'util._extend'
| 'vm.runInDebugContext';
/** NoDeprecatedApiGlobalItem. */
export type NoDeprecatedApiGlobalItem =
| 'Buffer()'
| 'new Buffer()'
| 'COUNTER_NET_SERVER_CONNECTION'
| 'COUNTER_NET_SERVER_CONNECTION_CLOSE'
| 'COUNTER_HTTP_SERVER_REQUEST'
| 'COUNTER_HTTP_SERVER_RESPONSE'
| 'COUNTER_HTTP_CLIENT_REQUEST'
| 'COUNTER_HTTP_CLIENT_RESPONSE'
| 'Intl.v8BreakIterator'
| 'require.extensions'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE';
/**
* Option.
*/
export type NoDeprecatedApiOption = {
export interface NoDeprecatedApiOption {
/**

@@ -124,3 +22,89 @@ * As mentioned above, this rule reads the [engines] field of `package.json`. But, you can overwrite the version by `version` option.

*/
ignoreModuleItems?: Array<LiteralUnion<NoDeprecatedApiModuleItem>>;
ignoreModuleItems?: (
| '_linklist'
| '_stream_wrap'
| 'async_hooks.currentId'
| 'async_hooks.triggerId'
| 'buffer.Buffer()'
| 'new buffer.Buffer()'
| 'buffer.SlowBuffer'
| 'constants'
| 'crypto._toBuf'
| 'crypto.Credentials'
| 'crypto.DEFAULT_ENCODING'
| 'crypto.createCipher'
| 'crypto.createCredentials'
| 'crypto.createDecipher'
| 'crypto.fips'
| 'crypto.prng'
| 'crypto.pseudoRandomBytes'
| 'crypto.rng'
| 'domain'
| 'events.EventEmitter.listenerCount'
| 'events.listenerCount'
| 'freelist'
| 'fs.SyncWriteStream'
| 'fs.exists'
| 'fs.lchmod'
| 'fs.lchmodSync'
| 'http.createClient'
| 'module.Module.createRequireFromPath'
| 'module.Module.requireRepl'
| 'module.Module._debug'
| 'module.createRequireFromPath'
| 'module.requireRepl'
| 'module._debug'
| 'net._setSimultaneousAccepts'
| 'os.getNetworkInterfaces'
| 'os.tmpDir'
| 'path._makeLong'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
| 'punycode'
| 'readline.codePointAt'
| 'readline.getStringWidth'
| 'readline.isFullWidthCodePoint'
| 'readline.stripVTControlCharacters'
| 'safe-buffer.Buffer()'
| 'new safe-buffer.Buffer()'
| 'safe-buffer.SlowBuffer'
| 'sys'
| 'timers.enroll'
| 'timers.unenroll'
| 'tls.CleartextStream'
| 'tls.CryptoStream'
| 'tls.SecurePair'
| 'tls.convertNPNProtocols'
| 'tls.createSecurePair'
| 'tls.parseCertString'
| 'tty.setRawMode'
| 'url.parse'
| 'url.resolve'
| 'util.debug'
| 'util.error'
| 'util.isArray'
| 'util.isBoolean'
| 'util.isBuffer'
| 'util.isDate'
| 'util.isError'
| 'util.isFunction'
| 'util.isNull'
| 'util.isNullOrUndefined'
| 'util.isNumber'
| 'util.isObject'
| 'util.isPrimitive'
| 'util.isRegExp'
| 'util.isString'
| 'util.isSymbol'
| 'util.isUndefined'
| 'util.log'
| 'util.print'
| 'util.pump'
| 'util.puts'
| 'util._extend'
| 'vm.runInDebugContext'
)[];
/**

@@ -133,4 +117,23 @@ * This is the array of global variable names and global variable's member names.

*/
ignoreGlobalItems?: Array<LiteralUnion<NoDeprecatedApiGlobalItem>>;
};
ignoreGlobalItems?: (
| 'Buffer()'
| 'new Buffer()'
| 'COUNTER_NET_SERVER_CONNECTION'
| 'COUNTER_NET_SERVER_CONNECTION_CLOSE'
| 'COUNTER_HTTP_SERVER_REQUEST'
| 'COUNTER_HTTP_SERVER_RESPONSE'
| 'COUNTER_HTTP_CLIENT_REQUEST'
| 'COUNTER_HTTP_CLIENT_RESPONSE'
| 'GLOBAL'
| 'Intl.v8BreakIterator'
| 'require.extensions'
| 'root'
| 'process.EventEmitter'
| 'process.assert'
| 'process.binding'
| 'process.env.NODE_REPL_HISTORY_FILE'
| 'process.report.triggerReport'
)[];
ignoreIndirectDependencies?: boolean;
}

@@ -143,5 +146,5 @@ /**

/**
* Node has many deprecated API. The community is going to remove those API from Node in future, so we should not use those.
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md)
*/

@@ -151,13 +154,13 @@ export type NoDeprecatedApiRuleConfig = RuleConfig<NoDeprecatedApiOptions>;

/**
* Node has many deprecated API. The community is going to remove those API from Node in future, so we should not use those.
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md)
*/
export interface NoDeprecatedApiRule {
/**
* Node has many deprecated API. The community is going to remove those API from Node in future, so we should not use those.
* Disallow deprecated APIs.
*
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md)
* @see [no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-deprecated-api.md)
*/
'node/no-deprecated-api': NoDeprecatedApiRuleConfig;
}

@@ -6,3 +6,3 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoExtraneousImportOption = {
export interface NoExtraneousImportOption {
/**

@@ -16,2 +16,18 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

allowModules?: string[];
convertPath?:
| {
[k: string]: [string, string];
}
| [
{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
},
...{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
}[]
];
/**

@@ -37,3 +53,3 @@ * Adds additional paths to try for when resolving imports.

tryExtensions?: string[];
};
}

@@ -46,5 +62,5 @@ /**

/**
* This rule warns `import` declarations of extraneous modules..
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md)
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md)
*/

@@ -54,13 +70,13 @@ export type NoExtraneousImportRuleConfig = RuleConfig<NoExtraneousImportOptions>;

/**
* This rule warns `import` declarations of extraneous modules..
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md)
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md)
*/
export interface NoExtraneousImportRule {
/**
* This rule warns `import` declarations of extraneous modules..
* Disallow `import` declarations which import extraneous modules.
*
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-import.md)
* @see [no-extraneous-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-import.md)
*/
'node/no-extraneous-import': NoExtraneousImportRuleConfig;
}

@@ -6,3 +6,3 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoExtraneousRequireOption = {
export interface NoExtraneousRequireOption {
/**

@@ -16,2 +16,18 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

allowModules?: string[];
convertPath?:
| {
[k: string]: [string, string];
}
| [
{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
},
...{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
}[]
];
/**

@@ -37,3 +53,3 @@ * Adds additional paths to try for when resolving a require.

tryExtensions?: string[];
};
}

@@ -46,5 +62,5 @@ /**

/**
* This rule warns `require()` of extraneous modules.
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-require.md)
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md)
*/

@@ -54,13 +70,13 @@ export type NoExtraneousRequireRuleConfig = RuleConfig<NoExtraneousRequireOptions>;

/**
* This rule warns `require()` of extraneous modules.
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-require.md)
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md)
*/
export interface NoExtraneousRequireRule {
/**
* This rule warns `require()` of extraneous modules.
* Disallow `require()` expressions which import extraneous modules.
*
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-extraneous-require.md)
* @see [no-extraneous-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-extraneous-require.md)
*/
'node/no-extraneous-require': NoExtraneousRequireRuleConfig;
}

@@ -6,3 +6,3 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoMissingImportOption = {
export interface NoMissingImportOption {
/**

@@ -17,2 +17,12 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

/**
* When an import path does not exist, this rule checks whether or not any of `path.js`, `path.json`, and `path.node` exists.
*
* `tryExtensions` option is the extension list this rule uses at the time.
*
* @default ['.js', '.json', '.node']
*
* @see [tryExtensions](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md#tryextensions)
*/
tryExtensions?: string[];
/**
* Adds additional paths to try for when resolving imports.

@@ -27,13 +37,3 @@ *

resolvePaths?: string[];
/**
* When an import path does not exist, this rule checks whether or not any of `path.js`, `path.json`, and `path.node` exists.
*
* `tryExtensions` option is the extension list this rule uses at the time.
*
* @default ['.js', '.json', '.node']
*
* @see [tryExtensions](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md#tryextensions)
*/
tryExtensions?: string[];
};
}

@@ -46,5 +46,5 @@ /**

/**
* This is similar to [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md), but this rule handles import and export declarations.
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md)
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md)
*/

@@ -54,13 +54,13 @@ export type NoMissingImportRuleConfig = RuleConfig<NoMissingImportOptions>;

/**
* This is similar to [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md), but this rule handles import and export declarations.
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md)
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md)
*/
export interface NoMissingImportRule {
/**
* This is similar to [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md), but this rule handles import and export declarations.
* Disallow `import` declarations which import non-existence modules.
*
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-import.md)
* @see [no-missing-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-import.md)
*/
'node/no-missing-import': NoMissingImportRuleConfig;
}

@@ -6,3 +6,3 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoMissingRequireOption = {
export interface NoMissingRequireOption {
/**

@@ -17,2 +17,12 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

/**
* When an import path does not exist, this rule checks whether or not any of `path.js`, `path.json`, and `path.node` exists.
*
* `tryExtensions` option is the extension list this rule uses at the time.
*
* @default ['.js', '.json', '.node']
*
* @see [tryExtensions](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md#tryextensions)
*/
tryExtensions?: string[];
/**
* Adds additional paths to try for when resolving a require.

@@ -27,13 +37,3 @@ *

resolvePaths?: string[];
/**
* When an import path does not exist, this rule checks whether or not any of `path.js`, `path.json`, and `path.node` exists.
*
* `tryExtensions` option is the extension list this rule uses at the time.
*
* @default ['.js', '.json', '.node']
*
* @see [tryExtensions](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md#tryextensions)
*/
tryExtensions?: string[];
};
}

@@ -46,5 +46,5 @@ /**

/**
* This rule checks the file paths of `require()`s, then reports the path of files which don't exist..
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md)
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md)
*/

@@ -54,13 +54,13 @@ export type NoMissingRequireRuleConfig = RuleConfig<NoMissingRequireOptions>;

/**
* This rule checks the file paths of `require()`s, then reports the path of files which don't exist..
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md)
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md)
*/
export interface NoMissingRequireRule {
/**
* This rule checks the file paths of `require()`s, then reports the path of files which don't exist..
* Disallow `require()` expressions which import non-existence modules.
*
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-missing-require.md)
* @see [no-missing-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-missing-require.md)
*/
'node/no-missing-require': NoMissingRequireRuleConfig;
}
import type { RuleConfig } from '../rule-config';
/**
* Options.
*/
export type NoProcessExitRuleOptions = [];
/**
* Disallow the use of `process.exit()`.
*
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-exit.md)
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md)
*/
export type NoProcessExitRuleConfig = RuleConfig<NoProcessExitRuleOptions>;
export type NoProcessExitRuleConfig = RuleConfig<[]>;

@@ -18,3 +13,3 @@ /**

*
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-exit.md)
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md)
*/

@@ -25,5 +20,5 @@ export interface NoProcessExitRule {

*
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-process-exit.md)
* @see [no-process-exit](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-process-exit.md)
*/
'node/no-process-exit': NoProcessExitRuleConfig;
}

@@ -6,3 +6,9 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoRestrictedRequireOption = Array<string | { name: string | string[]; message?: string }>;
export type NoRestrictedRequireOption = (
| string
| {
name: string | string[];
message?: string;
}
)[];

@@ -15,5 +21,5 @@ /**

/**
* This rule allows you to specify modules that you don’t want to use in your application..
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-require.md)
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-require.md)
*/

@@ -23,13 +29,13 @@ export type NoRestrictedRequireRuleConfig = RuleConfig<NoRestrictedRequireOptions>;

/**
* This rule allows you to specify modules that you don’t want to use in your application..
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-require.md)
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-require.md)
*/
export interface NoRestrictedRequireRule {
/**
* This rule allows you to specify modules that you don’t want to use in your application..
* Disallow specified modules when loaded by `require`.
*
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-restricted-require.md)
* @see [no-restricted-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-restricted-require.md)
*/
'node/no-restricted-require': NoRestrictedRequireRuleConfig;
}

@@ -6,3 +6,3 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoUnpublishedImportOption = {
export interface NoUnpublishedImportOption {
/**

@@ -13,3 +13,3 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

*/
allowModules?: [];
allowModules?: string[];
/**

@@ -21,4 +21,18 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

convertPath?:
| Record<string, [fromRegExp: string, toString: string]>
| { include: string[]; exclude: string[]; replace: [fromRegExp: string, toString: string] };
| {
[k: string]: [string, string];
}
| [
{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
},
...{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
}[]
];
resolvePaths?: string[];
/**

@@ -34,3 +48,3 @@ * When an import path does not exist, this rule checks whether or not any of `path.js`, `path.json`, and `path.node` exists.

tryExtensions?: string[];
};
}

@@ -50,3 +64,3 @@ /**

*
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md)
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-import.md)
*/

@@ -63,3 +77,3 @@ export type NoUnpublishedImportRuleConfig = RuleConfig<NoUnpublishedImportOptions>;

*
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md)
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-import.md)
*/

@@ -75,5 +89,5 @@ export interface NoUnpublishedImportRule {

*
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-import.md)
* @see [no-unpublished-import](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-import.md)
*/
'node/no-unpublished-import': NoUnpublishedImportRuleConfig;
}

@@ -6,3 +6,3 @@ import type { RuleConfig } from '../rule-config';

*/
export type NoUnpublishedRequireOption = {
export interface NoUnpublishedRequireOption {
/**

@@ -13,3 +13,3 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

*/
allowModules?: [];
allowModules?: string[];
/**

@@ -21,4 +21,18 @@ * Some platforms have additional embedded modules. For example, Electron has `electron` module.

convertPath?:
| Record<string, [fromRegExp: string, toString: string]>
| { include: string[]; exclude: string[]; replace: [fromRegExp: string, toString: string] };
| {
[k: string]: [string, string];
}
| [
{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
},
...{
include: [string, ...string[]];
exclude?: string[];
replace: [string, string];
}[]
];
resolvePaths?: string[];
/**

@@ -34,3 +48,3 @@ * When an import path does not exist, this rule checks whether or not any of `path.js`, `path.json`, and `path.node` exists.

tryExtensions?: string[];
};
}

@@ -50,3 +64,3 @@ /**

*
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-require.md)
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-require.md)
*/

@@ -63,3 +77,3 @@ export type NoUnpublishedRequireRuleConfig = RuleConfig<NoUnpublishedRequireOptions>;

*
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-require.md)
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-require.md)
*/

@@ -75,5 +89,5 @@ export interface NoUnpublishedRequireRule {

*
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unpublished-require.md)
* @see [no-unpublished-require](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unpublished-require.md)
*/
'node/no-unpublished-require': NoUnpublishedRequireRuleConfig;
}
import type { LiteralUnion } from '../../../utility-types';
import type { RuleConfig } from '../../rule-config';
/** IgnoreValue. */
export type IgnoreValue =
// ES2020:
| 'bigint'
| 'dynamicImport'
// ES2019:
| 'jsonSuperset'
| 'optionalCatchBinding'
// ES2018:
| 'asyncIteration'
| 'malformedTemplateLiterals'
| 'regexpLookbehind'
| 'regexpNamedCaptureGroups'
| 'regexpS'
| 'regexpUnicodeProperties'
| 'restSpreadProperties'
// ES2017:
| 'asyncFunctions'
| 'trailingCommasInFunctions'
// ES2016:
| 'exponentialOperators'
// ES2015:
| 'arrowFunctions'
| 'binaryNumericLiterals'
| 'blockScopedFunctions'
| 'blockScopedVariables'
| 'classes'
| 'computedProperties'
| 'defaultParameters'
| 'destructuring'
| 'forOfLoops'
| 'generators'
| 'modules'
| 'new.target'
| 'objectSuperProperties'
| 'octalNumericLiterals'
| 'propertyShorthands'
| 'regexpU'
| 'regexpY'
| 'restParameters'
| 'spreadElements'
| 'templateLiterals'
| 'unicodeCodePointEscapes';
/**
* Option.
*/
export type NoUnsupportedFeaturesEsSyntaxRuleOption = {
export interface NoUnsupportedFeaturesEsSyntaxOption {
/**

@@ -65,4 +21,40 @@ * As mentioned above, this rule reads the [engines](https://docs.npmjs.com/cli/v7/configuring-npm/package-json) field of `package.json`. But, you can overwrite the version by `version` option.

*/
ignores?: Array<LiteralUnion<IgnoreValue>>;
};
ignores?: LiteralUnion<
| 'arrowFunctions'
| 'binaryNumericLiterals'
| 'blockScopedFunctions'
| 'blockScopedVariables'
| 'classes'
| 'computedProperties'
| 'defaultParameters'
| 'destructuring'
| 'forOfLoops'
| 'generators'
| 'modules'
| 'new.target'
| 'objectSuperProperties'
| 'octalNumericLiterals'
| 'propertyShorthands'
| 'regexpU'
| 'regexpY'
| 'restParameters'
| 'spreadElements'
| 'templateLiterals'
| 'unicodeCodePointEscapes'
| 'exponentialOperators'
| 'asyncFunctions'
| 'trailingCommasInFunctions'
| 'asyncIteration'
| 'malformedTemplateLiterals'
| 'regexpLookbehind'
| 'regexpNamedCaptureGroups'
| 'regexpS'
| 'regexpUnicodeProperties'
| 'restSpreadProperties'
| 'jsonSuperset'
| 'optionalCatchBinding'
| 'bigint'
| 'dynamicImport'
>[];
}

@@ -72,17 +64,23 @@ /**

*/
export type NoUnsupportedFeaturesEsSyntaxRuleOptions = [NoUnsupportedFeaturesEsSyntaxRuleOption?];
export type NoUnsupportedFeaturesEsSyntaxOptions = [NoUnsupportedFeaturesEsSyntaxOption?];
/**
* @see [node/no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-syntax.md)
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-syntax.md)
*/
export type NoUnsupportedFeaturesEsSyntaxRuleConfig = RuleConfig<NoUnsupportedFeaturesEsSyntaxRuleOptions>;
export type NoUnsupportedFeaturesEsSyntaxRuleConfig = RuleConfig<NoUnsupportedFeaturesEsSyntaxOptions>;
/**
* @see [node/no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-syntax.md)
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-syntax.md)
*/
export interface NoUnsupportedFeaturesEsSyntaxRule {
/**
* @see [node/no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-unsupported-features/es-syntax.md)
* Disallow unsupported ECMAScript syntax on the specified version.
*
* @see [no-unsupported-features/es-syntax](https://github.com/mysticatea/eslint-plugin-node/blob/v11.1.0/docs/rules/no-unsupported-features/es-syntax.md)
*/
'node/no-unsupported-features/es-syntax': NoUnsupportedFeaturesEsSyntaxRuleConfig;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc