-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.js
More file actions
34 lines (32 loc) · 1.17 KB
/
.eslintrc.js
File metadata and controls
34 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* This configuration is mostly useful with editor integration & plugins. (ex: VSCode ESLint & Prettier plugins).
* But if you want to manually lint run "npm run lint".
* Also when git commiting "using husky + git hooks" code automaticlly get linted and only get commited if no errors occured.
*/
module.exports = {
extends: ["airbnb-base", "plugin:prettier/recommended"],
rules: {
"no-console": "off",
"no-unused-vars": "off", // Since express error middleware need "next" whether its used or not. TODO: Should find proper solution.
"consistent-return": "off",
camelcase: "off"
},
// Making "**/*.test.js files" has both es6 and jest env values like "describe, it, ..."
overrides: [
{
files: ["**/*.test.js"],
env: {
jest: true
},
plugins: ["jest"],
rules: {
"jest/no-disabled-tests": "warn",
"jest/no-focused-tests": "error",
"jest/no-identical-title": "error",
"jest/prefer-to-have-length": "warn",
"jest/valid-expect": "error",
"no-underscore-dangle": "off", // Because "node-mocks-http" module use underscore methods.
"global-require": "off"
}
}
]
};