Skip to content

Commit f5e7eb0

Browse files
committed
[eslint] update linting config
1 parent e46f09b commit f5e7eb0

34 files changed

Lines changed: 577 additions & 529 deletions

.eslintrc

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,18 @@
11
{
2+
"extends": "@ljharb/eslint-config/node/0.4",
23
"rules": {
4+
"callback-return": "warn",
5+
"camelcase": "warn",
6+
"func-style": "warn",
7+
"eqeqeq": ["error", "always", { "null": "ignore" }],
8+
"id-length": "warn",
9+
"max-lines": "off",
10+
"no-invalid-this": "warn",
11+
"no-param-reassign": "warn",
12+
"no-underscore-dangle": "warn",
13+
"sort-keys": "warn",
14+
315
"indent": [2, 2, {"SwitchCase": 1}],
4-
"quotes": [2, "single"],
5-
"linebreak-style": [2, "unix"],
6-
"semi": [2, "always"],
7-
"curly": [2, "multi-line"],
8-
"handle-callback-err": [2, "^err"],
9-
"valid-jsdoc": [2, {
10-
"requireReturn": false,
11-
"requireReturnDescription": false,
12-
"prefer": {
13-
"return": "returns"
14-
}
15-
}],
16-
"require-jsdoc": [2, {
17-
"require": {
18-
"FunctionDeclaration": true
19-
}
20-
}],
21-
"no-redeclare": [2, { "builtinGlobals": true }],
22-
"no-shadow": [2, { "builtinGlobals": true, "hoist": "all" }],
23-
"no-use-before-define": [2, "nofunc"],
24-
"no-shadow-restricted-names": 2,
25-
"no-extra-semi": 2,
26-
"no-unused-vars": 2,
27-
"no-undef": 2,
28-
"no-irregular-whitespace": 2,
29-
"no-console": 2,
30-
"key-spacing": 0,
31-
"strict": 0,
32-
"dot-notation": 0,
33-
"eol-last": 0,
34-
"no-new": 0,
35-
"semi-spacing": 0,
36-
"no-multi-spaces": 0,
37-
"eqeqeq": 0,
38-
"no-mixed-requires": 0
3916
},
4017
"env": {
4118
"node": true
@@ -44,5 +21,5 @@
4421
"node_modules/*",
4522
"index.d.ts",
4623
"coverage",
47-
]
24+
],
4825
}

lib/browser.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
'use strict';
2+
13
/* eslint-env browser */
2-
module.exports = typeof self == 'object' ? self.FormData : window.FormData;
4+
module.exports = typeof self === 'object' ? self.FormData : window.FormData;

0 commit comments

Comments
 (0)