Skip to content

Instantly share code, notes, and snippets.

@luizwhite
Last active February 22, 2022 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luizwhite/730608394264505bd1fedc93c1f1085c to your computer and use it in GitHub Desktop.
Save luizwhite/730608394264505bd1fedc93c1f1085c to your computer and use it in GitHub Desktop.
Node.js Eslint Config
{
"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