eslint-config-yehezgun
v1.2.7
Published
This is Yehezkiel Gunawan's personal ESLint rules
Downloads
38
Maintainers
Readme
ESLint-Config-Yehezgun
This is ESLint rules that I usually use for my personal projects. I custom rules depending on my current needs now.
⚠️Before You Install This
There're maybe some rules that you have to disable if you mix JS/TS or JS only codebase. And, this ESLint rules may changes without any announcement because of personal needs.
Installation
npm i --save-dev eslint eslint-config-yehezgun
# or if you're using yarn
yarn add -D eslint eslint-config-yehezgun
Usage
In your eslintrc
file you can extend like this
module.exports = {
extends: ["yehezgun"],
};
What's in here
eslint-config-yehezgun
uses custom ESLint rules to adjust based on my current needs. But it also uses some plugins and extend the configuration from external library:
typescript-eslint/eslint-plugin
: add some new useful plugineslint-plugin-import
: auto import sorting and grouping lintereslint-plugin-unused-import
: to avoid unused import or variableeslint-plugin-sonarjs
: SonarJS rules for ESLint to detect bugs and suspicious patterns in your code.
The ESLint rules that I used here
rules: {
"no-unused-vars": "off",
"no-var": "warn",
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"warn",
{
vars: "all",
varsIgnorePattern: "^_",
args: "after-used",
argsIgnorePattern: "^_",
},
],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-inferrable-types": "off",
"import/order": [
"warn",
{
groups: [
["builtin", "external"],
"internal",
"parent",
["sibling", "index"],
"object",
],
"newlines-between": "always",
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
complexity: "warn",
"no-console": ["error"],
},
Want to Buy Me a Kofi?
Sure, I'm open to anyone who want to gives some donation, LOL. Thank you by the way :D