Skip to content

Commit 57e2642

Browse files
fix: [#4204] Fix remaining eslint warnings - enable ESLint config (#4241)
* Update eslint config * Update lint script to fail if there is a warning Co-authored-by: Cecilia Avila <[email protected]> Co-authored-by: CeciliaAvila <[email protected]>
1 parent b4a2a5e commit 57e2642

File tree

2 files changed

+34
-3
lines changed

2 files changed

+34
-3
lines changed

.eslintrc.json

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"env": {
3-
"es6": true
3+
"es6": true,
4+
"node": true
45
},
56
"ignorePatterns": [
67
"_ts3.4/",
@@ -44,7 +45,16 @@
4445
},
4546
"rules": {
4647
"@typescript-eslint/no-empty-function": "off",
47-
"@typescript-eslint/no-explicit-any": "error",
48+
"@typescript-eslint/no-explicit-any": "off",
49+
"@typescript-eslint/explicit-module-boundary-types": "off",
50+
"@typescript-eslint/ban-types": [
51+
"off",
52+
{
53+
"types": {
54+
"object": ""
55+
}
56+
}
57+
],
4858
"@typescript-eslint/explicit-member-accessibility": [
4959
"error",
5060
{
@@ -129,6 +139,27 @@
129139
"security/detect-non-literal-fs-filename": "off"
130140
}
131141
},
142+
{
143+
"files": [
144+
"src/**/*.ts"
145+
],
146+
"plugins": ["jsdoc"],
147+
"rules": {
148+
"jsdoc/require-jsdoc": ["warn", {
149+
"require": {
150+
"FunctionDeclaration": true,
151+
"MethodDefinition": false,
152+
"ClassDeclaration": true,
153+
"ArrowFunctionExpression": false,
154+
"FunctionExpression": false
155+
},
156+
"publicOnly": true,
157+
"contexts": [
158+
"MethodDefinition:not([accessibility=/(private|protected)/]) > FunctionExpression"
159+
]
160+
}]
161+
}
162+
},
132163
{
133164
"files": [
134165
"*.config.js"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"dev:link": "wsrun --if is-not-private --bin=yarn link",
2020
"dev:unlink": "wsrun --if is-not-private --bin=yarn unlink",
2121
"functional-test": "yarn build && yarn workspace functional-tests test",
22-
"lint": "wsrun -m -l lint --quiet",
22+
"lint": "wsrun -m -l lint --max-warnings=0",
2323
"package": "wsrun -e -t -l --if is-not-private --bin yarn pack",
2424
"test": "npm-run-all build test:mocha test:runtime test:runtime test:nyc:report",
2525
"test:compat": "wsrun -e -m -t test:compat",

0 commit comments

Comments
 (0)