A set of rules for JS applications, considering Yooga recommendations.
Please prefer to give feedbacks or update rules in our monorepo instead of using
eslint-disable
.
└── src/
├── 📦eslint-config-base
├── 📦eslint-config-angular
└── 📦eslint-config-vue # WIP
Base config for JS files, inspired by Airbnb's eslint plugin.
Recommended for:
- Simple projects, without frameworks (like this one)
A plugin recommended for Angular projects, also inspired by Airbnb's eslint plugin, which encapsulates rules from angular-eslint.
✅ Can be used for: Projects which contain Angular framework
⛔ Should not be used for: Vue, React, and other front-end frameworks which is not related to Angular.
A WIP project. Will be available soon. ;)
Using GitHub Packages to manage app packages? Make sure to follow the official guide.
-
Replace
PACKAGE-NAME
bybase
||angular
||vue
-
Add the package to your project
npm i --save-dev @yooga/eslint-config-PACKAGE-NAME
- Create config file (
.eslintrc.js
) at project root:
module.exports = {
"ignorePatterns": [
// Add ignored files and folders here
],
"extends": [
"@yooga/eslint-config-PACKAGE-NAME/.eslintrc.js"
]
}
- Add scripts to your project
{
"scripts": {
"lint:js": "npx eslint",
"lint:cache": "npx eslint --cache-strategy content",
}
}