eslint-config-maqe
v6.2.0
Published
MAQE's ESLint config
Downloads
3,374
Maintainers
Readme
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMmhhhhmMMMMMMNhhhhdMMMMMMMNhhhhhNMMMMMMMMMNNdhhhmNMMMMMMdhhhhhhhhhhhhhmMM
MMo.....sNMMMh-....:MMMMMMM+.....+MMMMMMMmo:......-/yNMMM:.............oMM
MMo......:hN+......:MMMMMMs.......yMMMMMs....-::-....:dMM/.....::::::::sMM
MMo....-...//--....:MMMMMh....-....hMMMy....omMMNd/...-NMNo-...oNMMMMMMMMM
MMo....h+---:yd....:MMMMd-...:d-...-mMM/...-MMMMMMd....hMMMy/.../NMMMMMMMM
MMo....mMmmmmMM....:MMMm-....dMh....:NMy....smMMNd/...-NMNs-:+:oNMMMMMMMMM
MMo....mMMMMMMM....:MMN/....-ho/.....+MMo....-/oo/:..:dMM/....:////////sMM
MMo....mMMMMMMM....:MM+....-sNNy-.....sMMdo:.....--/+dMMM:.............oMM
MMdhhhhNMMMMMMMhhhhdMNhhhhhmMMMMNhhhhhhMMMMNmy+:.....:dMMdhhhhhhhhhhhhhdMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMNNho:oNMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
eslint-config-maqe
This package provides MAQE's .eslintrc as an extensible shared config.
Usage
Prerequisites
- Make sure you upgrade to at least Node.js 12.22.0, 14.7.0, or 16.0.0 when using eslint-config-maqe v5.0.0 because eslint-config-maqe v5.0.0 depend on eslint v8.0.0 see Node.js 10, 13, and 15 are no longer supported
- If you are unable to upgrade, We recommend use eslint-config-maqe version 4 until you are able to upgrade Node.js
Using MAQE Boilerplate
If you're using MAQE Boilerplate, then you don't have to do anything! MAQE Boilerplate already has this package as its dependency. Sit back and enjoy!
Using without MAQE Boilerplate
If you don't use MAQE Boilerplate, you'll need to do the following:
- Install all dependencies
npm install --save-dev eslint
npm install --save-dev eslint-plugin-import
npm install --save-dev eslint-plugin-node
npm install --save-dev @stylistic/[email protected]
- Install the package
npm install --save-dev eslint-config-maqe
- Create your .eslintrc file and extend it from this config
{
"extends": "maqe"
}
See ESLint Documentation for more information.
Override ESLint config
You can modify your .eslintrc in your project as you want. Some common overrides are:
Globals
You can add global variables in your project by adding "globals" in your .eslintrc
{
"globals": {
"enquire": "writable",
"FontFaceObserver": "writable",
"imagesloaded": "writable",
"Modernizr": "writable"
}
}
See Specifying Globals for more information.
Rules
You can override the default rules by adding "rules" in your .eslintrc
{
"rules": {
"eqeqeq": "off",
"curly": "error",
"quotes": ["error", "double"]
}
}
See Configuring Rules for more information.
See Rules for list of ESLint rules.
Migration to version 6.1.0
Replaced Deprecated Stylistic Rules in ESLint with @stylistic/eslint-plugin Plugin
Since the ESLint v8.53.0 update, 67 stylistic rules have been deprecated.
To adhere to the updated guidelines, we have replaced the deprecated rules with the @stylistic/eslint-plugin
plugin, which now handles stylistic linting.
Install new dependency packages.
npm install --save-dev [email protected]
npm install --save-dev [email protected]
npm install --save-dev @stylistic/[email protected]
You can customize specific rules by prefixing them with @stylistic/
.
Here is an example configuration in your stylelint configuration file:
{
"extends": "eslint-config-maqe",
"rules": {
// stylistic rules from @stylistic/eslint-plugin:
"@stylistic/indent": ["error", "tab"],
}
}
Feel free to modify and extend the rules based on your project requirements. This ensures your code adheres to the latest best practices and maintains a consistent and clean code style.