A TypeScript ESLint ruleset designed for large teams and projects
—
Profile configurations provide the foundational ESLint rule sets optimized for different runtime environments and security requirements. Each profile is designed to be used as the primary configuration with optional mixins layered on top.
ESLint configuration for general Node.js projects, typically web services. Enables security rules assuming the service could receive malicious inputs from untrusted users.
// Legacy format
module.exports = {
extends: ["@rushstack/eslint-config/profile/node"],
parserOptions: { tsconfigRootDir: __dirname }
};
// Flat format
import nodeProfile from "@rushstack/eslint-config/flat/profile/node";
export default [...nodeProfile];Path: @rushstack/eslint-config/profile/node
Flat Path: @rushstack/eslint-config/flat/profile/node
Security Level: High - assumes untrusted inputs
Use Cases: Web services, APIs, general Node.js applications
ESLint configuration for Node.js projects whose inputs always come from developers or trusted sources. Relaxes certain security rules that would otherwise prohibit resource-intensive operations or unsafe filesystem interactions.
// Legacy format
module.exports = {
extends: ["@rushstack/eslint-config/profile/node-trusted-tool"],
parserOptions: { tsconfigRootDir: __dirname }
};
// Flat format
import trustedToolProfile from "@rushstack/eslint-config/flat/profile/node-trusted-tool";
export default [...trustedToolProfile];Path: @rushstack/eslint-config/profile/node-trusted-tool
Flat Path: @rushstack/eslint-config/flat/profile/node-trusted-tool
Security Level: Relaxed - assumes trusted inputs
Use Cases: Build tools, CLI applications, development utilities
Warning: Do not use for libraries that might be loaded by Node.js services
ESLint configuration for web applications running in browser environments. Enables security rules relevant to web browser APIs such as DOM manipulation and includes considerations for client-side security.
// Legacy format
module.exports = {
extends: ["@rushstack/eslint-config/profile/web-app"],
parserOptions: { tsconfigRootDir: __dirname }
};
// Flat format
import webAppProfile from "@rushstack/eslint-config/flat/profile/web-app";
export default [...webAppProfile];Path: @rushstack/eslint-config/profile/web-app
Flat Path: @rushstack/eslint-config/flat/profile/web-app
Security Level: High - includes browser-specific security rules
Use Cases: Web applications, browser-based libraries, universal libraries for both Node.js and browsers
Choose node when:
Choose node-trusted-tool when:
Choose web-app when:
Basic Node.js web service:
// .eslintrc.js
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: ["@rushstack/eslint-config/profile/node"],
parserOptions: { tsconfigRootDir: __dirname }
};Build tool with relaxed security:
// .eslintrc.js
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: ["@rushstack/eslint-config/profile/node-trusted-tool"],
parserOptions: { tsconfigRootDir: __dirname }
};React web application:
// .eslintrc.js
require('@rushstack/eslint-config/patch/modern-module-resolution');
module.exports = {
extends: [
"@rushstack/eslint-config/profile/web-app",
"@rushstack/eslint-config/mixins/react"
],
parserOptions: { tsconfigRootDir: __dirname },
settings: {
react: {
version: "18.0"
}
}
};Flat configuration for modern ESLint:
// eslint.config.js
import nodeProfile from "@rushstack/eslint-config/flat/profile/node";
import reactMixin from "@rushstack/eslint-config/flat/mixins/react";
export default [
...nodeProfile,
...reactMixin
];All profiles are built using a common rule builder function that accepts a profile type parameter and generates the appropriate configuration object. The flat configuration versions export arrays of configuration objects compatible with ESLint's flat config format.
// Internal structure (not directly exported)
interface ProfileConfig {
extends?: string[];
plugins: string[];
parser: string;
parserOptions: {
ecmaVersion: number;
sourceType: 'module';
project: string;
};
env: Record<string, boolean>;
rules: Record<string, RuleConfig>;
overrides: Array<{
files: string[];
rules: Record<string, RuleConfig>;
}>;
}@rushstack/eslint-config/patch/modern-module-resolutiontsconfigRootDir: __dirname must be specified for proper TypeScript integrationInstall with Tessl CLI
npx tessl i tessl/npm-rushstack--eslint-config