UNPKG

@aleph/eslint-config

Version:

Aleph's ESLint configuration for JavaScript and TypeScript projects - ESLint 9 flat config

85 lines (58 loc) • 1.78 kB
# @aleph/eslint-config Aleph's ESLint configuration for JavaScript and TypeScript projects. ## Version 2.0 - ESLint 9 Flat Config This is a **major version update** that migrates to ESLint 9's new flat config format. This version is **not compatible** with the legacy `.eslintrc` format. ### Breaking Changes from v1.x - **ESLint 9+ Required**: This version requires ESLint 9.0.0 or higher - **Flat Config Format**: Uses the new `eslint.config.js` format instead of `.eslintrc.js` - **Import Syntax**: Configuration must be imported/spread into an array - **No FlatCompat**: Removes dependency on @eslint/eslintrc and FlatCompat ### Migration from v1.x Replace your `.eslintrc.js`: ```javascript // OLD (.eslintrc.js) module.exports = { extends: ['@aleph/eslint-config'] }; ``` With `eslint.config.js`: ```javascript // NEW (eslint.config.js) export { default } from '@aleph/eslint-config'; ``` ## Installation ```bash npm install @aleph/eslint-config --save-dev ``` ## Usage ### Basic Setup Create or update your `eslint.config.js` (ESLint 9 flat config): ```javascript export { default } from '@aleph/eslint-config'; ``` Or for more control: ```javascript import alephConfig from '@aleph/eslint-config'; export default [ ...alephConfig, // Your project-specific overrides here ]; ``` ### Package.json Script Add to your `package.json`: ```json { "scripts": { "lint": "eslint .", "lint:fix": "eslint . --fix" } } ``` ## Documentation For detailed information about our code style standards and the rationale behind these rules, visit our documentation: šŸ‘‰ **[Aleph Code Style Standards](https://docs.aleph.inc/docs/resources/4devs/standards/code-style-standards)** ## Requirements - Node.js 16+ - ESLint 9+ ## License MIT Ā© Aleph Inc.