@mulekick/eslint-config-muleslint
v2.3.2
Published
Mulekicks's base JS / TS / React / Node ESLint config, following my personal standards π
Maintainers
Readme
My ESLint config for Javascript, Typescript, React and Node π
I use the ESLint extension on Visual Studio code in my day-to day coding activities. I find ESLint to be of a great help to write some proper, clean-cut ES6 code, avoid errors and enforce best practices. Here is the configuration I use to lint my *.js, *.ts, *.jsx and *.tsx files, available as a shareable config.
How I use ESLint in my dev environment
- Windows 10 x64, Hyper-V enabled.
- Debian Bookworm running in a Hyper-V VM.
- Node.js v22.15.0 LTS on Debian.
- VSCode targeting Debian through SSH.
- VSCode ESLint extension enabled.
- ESLint v9.29.0 installed as a project dev dependency.
@mulekick/eslint-config-muleslintinstalled as a project dev dependency.- A minimal
eslint.config.jsfile included in the project's root folder :
/* eslint-disable import/no-unresolved */
import muleslint from "@mulekick/eslint-config-muleslint";
import {defineConfig} from 'eslint/config';
// .eslintignore doesn't work with flat configs
export default defineConfig(...muleslint, {
ignores: [ `**/node_modules/**`, `**/dist/**`, `**/build/**` ]
});Use it in your own project
- Install with
npx install-peerdeps --dev @mulekick/eslint-config-muleslint. - Be sure to add the above
eslint.config.jsfile in your project's root folder.
Configuration details
- This configuration uses the new eslint flat config format.
- It extends the following configurations :
| configuration | description |
| ---------------------------------------| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| eslint.configs.recommended | core eslint recommended configuration |
| stylistic.configs.recommended | recommended configuration for stylistic-related eslint rules |
| typescript.configs.strictTypeChecked | typescript-eslint strict configuration with type-checked linting enabled π€ |
| import.flatConfigs.recommended | recommended configuration from the eslint import plugin |
| n.configs['flat/recommended'] | recommended configuration from the eslint node plugin |
| react.configs.flat.recommended | recommended configuration from the eslint react plugin |
| security.configs.recommended | recommended configuration from the eslint security plugin |
- It also uses the html plugin to lint JS code in HTML pages
<script>tags. - Quite a few of the
eslint.configs.recommendedandstylistic.configs.recommendedoptions are overriden π - The use of modern ECMA features (ES6 and beyond) is enforced whenever possible.
- The use of Crockford indentation (4 spaces) and unix-style line breaks is enforced as well.
- ESM modules use is enforced too, therefore making strict mode mandatory everywhere π
