Last active
February 22, 2022 23:37
-
-
Save luizwhite/730608394264505bd1fedc93c1f1085c to your computer and use it in GitHub Desktop.
Node.js Eslint Config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"env": { | |
"es2021": true, | |
"node": true, | |
"jest": true | |
}, | |
"extends": [ | |
"airbnb-base", | |
"plugin:@typescript-eslint/recommended", | |
"plugin:prettier/recommended" | |
], | |
"parserOptions": { | |
"ecmaVersion": "latest", | |
"sourceType": "module" | |
}, | |
"plugins": ["eslint-plugin-import-helpers"], | |
"rules": { | |
"camelcase": "off", | |
"class-methods-use-this": "off", | |
"lines-between-class-members": "warn", | |
"no-shadow": "off", | |
"no-console": "off", | |
"no-useless-constructor": "off", | |
"no-empty-function": "off", | |
"@typescript-eslint/no-unused-vars": [ | |
"error", | |
{ | |
"argsIgnorePattern": "^_.+[^_]$" | |
} | |
], | |
"@typescript-eslint/naming-convention": [ | |
"error", | |
{ | |
"selector": "interface", | |
"format": ["PascalCase"], | |
"custom": { | |
"regex": "^I[A-Z]", | |
"match": true | |
} | |
} | |
], | |
"@typescript-eslint/no-shadow": ["error"], | |
"import/no-unresolved": "error", | |
"import/prefer-default-export": "off", | |
"import/extensions": [ | |
"error", | |
"ignorePackages", | |
{ | |
"ts": "never" | |
} | |
], | |
"import-helpers/order-imports": [ | |
"warn", | |
{ | |
"newlinesBetween": "always", | |
"groups": [ | |
"module", | |
"absolute", | |
"/^@/", | |
["parent", "sibling", "index"] | |
], | |
"alphabetize": { "order": "asc", "ignoreCase": true } | |
} | |
], | |
"import/no-extraneous-dependencies": [ | |
"error", | |
{ "devDependencies": ["**/*.spec.ts", "jest.config.ts"] } | |
] | |
}, | |
"settings": { | |
"import/resolver": "typescript" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment