Magic Lint is an all-in-one configless lint tool that integrates ESLint, Stylelint, Prettier, lint-staged, and commitlint to streamline project initialization and code quality enforcement. Current stable version is 2.6.1, released with weekly or monthly cadence. It supports JavaScript, TypeScript, Vue, and React out of the box with zero configuration for linting and formatting, but requires users to provide their own config files (.eslintrc, .stylelintrc, .prettierrc, commitlint.config.js). Its key differentiator is the 'harmony' mode that resolves Prettier/ESLint conflicts by running Prettier first then ESLint. The package also provides CLI commands for staged files, commit message checking, and full directory linting. Unlike alternatives like eslint-config-prettier or prettier-eslint, magic-lint bundles everything together with a single CLI and supports commit hooks via Husky.
npm install magic-lintNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows quick setup with Husky v7+ and CLI usage for linting staged files and commit messages.
Migrate to Husky v7+ and use .husky/pre-commit and .husky/commit-msg shell scripts as shown in the documentation.
Create the required configuration files in your project root. For example, .eslintrc with extends: ['eslint:recommended'].
Remove --harmony flag; it is automatically enabled.
Use the node command: node node_modules/.bin/husky add .husky/pre-commit '...'
Update @typescript-eslint/eslint-plugin to version 5.55.0 or higher.
Create .eslintrc file with proper content or use --eslint flag without extend.
Run 'npm install magic-lint --save-dev' first, or use 'npx --package magic-lint' to force install.
Remove --harmony; harmony mode is now default.
Create commitlint.config.js in the project root or specify correct path with --commit.config.