@3angletech/eslint-config
v24.0.0
Published
Shareable Flat ESLint configuration library
Downloads
1,189
Readme
@3angletech/eslint-config
3angleTech's internal ESLint Configuration. Supports ESLint 9+, Node 24+.
🚀 Installation
Install the package as a dev dependency:
npm install --save-dev @3angletech/eslint-configCore dependencies (Stylistic, SonarJS, JSDoc, Security, etc.) are managed as direct dependencies of this package to ensure version consistency across all 3angletech projects.
🛠 Usage
This package uses the Flat Config format. Create an eslint.config.mjs in your project root.
import { nodeConfig } from '@3angletech/eslint-config';
export default [
...nodeConfig,
{
rules: {
// Custom overrides
}
}
];For NestJS or Angular, import nestjsConfig or angularConfig respectively. Similarly, create a stylelint.config.mjs with:
import { styleConfig } from '@3angletech/eslint-config/style';
export default {
...styleConfig,
{
rules: {
// Custom overrides
}
}
};💻 VS Code Integration
To ensure ESLint and Stylelint handle both linting and formatting (Stylistic) correctly within VS Code, add the following to your .vscode/settings.json:
{
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"eslint.useFlatConfig": true,
"eslint.run": "onType",
"eslint.workingDirectories": [{ "mode": "auto" }],
"eslint.format.enable": true,
"eslint.validate": [
"javascript",
"typescript",
"html",
"typescriptreact"
],
"[typescript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"editor.formatOnSave": true
},
"[javascript]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"[html]": {
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
},
"typescript.format.enable": false,
"javascript.format.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"stylelint.validate": ["css", "scss", "html"],
"stylelint.snippet": ["css", "scss"],
"stylelint.configFile": "stylelint.config.mjs"
}🤝 Contributing
All commits by contributors outside the 3angleTech team must sign off on their changes:
git commit --signoffFor more information see:
🧪 Development & Testing
Structure
src/rules/: Atomic rule definitions (core, sonar, security, stylistic).src/configs/: Environment composition logic (Node, Angular).
Testing local changes
To test changes to the library, use npm link in the root directory:
# Inside this repository
npm link
# Inside your target project
npm link @3angletech/eslint-configValidation
Verify configuration integrity:
npm run test📦 Publishing
- Update version in
package.json. - Update
CHANGELOG.md. - Commit and tag:
git commit -am "chore: release v24.x.x" --signoff
git tag v24.x.x && git push origin --tags- Publish:
npm publish