Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@rushstack/rig-package
Advanced tools
The @rushstack/rig-package is part of the Rush Stack family of projects and is designed to help manage and share configurations across multiple projects in a monorepo. It allows developers to define a 'rig' package that contains shared configurations (like ESLint rules, TypeScript configs, etc.) and then easily consume those configurations in other projects within the monorepo. This approach helps in maintaining consistency and reducing duplication of configuration across projects.
Sharing ESLint configurations
This feature allows a project to extend ESLint configurations defined in a rig package. By specifying the path to the ESLint configuration in the rig package, the project can inherit and use those rules without having to duplicate the configuration.
{
"extends": "./node_modules/@example/my-rig-package/profiles/default/eslint"
}
Sharing TypeScript configurations
This feature enables projects to extend TypeScript configurations from a rig package. It allows for a base tsconfig.json to be defined in the rig, which projects can then extend and override as necessary, promoting consistency across the codebase.
{
"extends": "./node_modules/@example/my-rig-package/profiles/default/tsconfig.json",
"compilerOptions": {
/* Override specific compiler options here */
}
}
Using shared scripts
Projects can utilize shared scripts defined in a rig package for common tasks like building or testing. This reduces the need for each project to maintain its own versions of these scripts, streamlining development workflows.
"scripts": {
"build": "node ./node_modules/@example/my-rig-package/scripts/build.js"
}
Similar to how @rushstack/rig-package can share ESLint configurations, eslint-config-airbnb is a widely used npm package that provides a set of ESLint rules following Airbnb's JavaScript style guide. While eslint-config-airbnb focuses specifically on ESLint rules, @rushstack/rig-package offers a broader range of configuration sharing capabilities.
tsconfig-paths is a package that helps with the management of TypeScript paths and base configurations. It's similar to @rushstack/rig-package in that it aims to simplify TypeScript configuration management, but @rushstack/rig-package provides a more holistic approach to sharing configurations across various tools and not just TypeScript.
Lerna is a tool for managing JavaScript projects with multiple packages, making it easier to handle versioning and dependencies across a monorepo. While Lerna focuses on package management and publishing, @rushstack/rig-package focuses on sharing configurations across projects. Both tools are often used in monorepo setups but serve different purposes.
FAQs
A system for sharing tool configurations between projects without duplicating config files.
The npm package @rushstack/rig-package receives a total of 1,463,821 weekly downloads. As such, @rushstack/rig-package popularity was classified as popular.
We found that @rushstack/rig-package demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.