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
This package provides MAQE's .eslintrc as an extensible shared config.
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!
If you don't use MAQE Boilerplate, you'll need to do the following:
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]
npm install --save-dev eslint-config-maqe
{
"extends": "maqe"
}
See ESLint Documentation for more information.
You can modify your .eslintrc in your project as you want. Some common overrides are:
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.
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.
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.