Skip to content

Commit

Permalink
fix: [#4204] Fix remaining eslint warnings - enable ESLint config (#4241
Browse files Browse the repository at this point in the history
)

* Update eslint config

* Update lint script to fail if there is a warning

Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com>
Co-authored-by: CeciliaAvila <cecilia.avila@southworks.com>
  • Loading branch information
3 people authored Jul 19, 2022
1 parent b4a2a5e commit 57e2642
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 3 deletions.
35 changes: 33 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"env": {
"es6": true
"es6": true,
"node": true
},
"ignorePatterns": [
"_ts3.4/",
Expand Down Expand Up @@ -44,7 +45,16 @@
},
"rules": {
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/ban-types": [
"off",
{
"types": {
"object": ""
}
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
Expand Down Expand Up @@ -129,6 +139,27 @@
"security/detect-non-literal-fs-filename": "off"
}
},
{
"files": [
"src/**/*.ts"
],
"plugins": ["jsdoc"],
"rules": {
"jsdoc/require-jsdoc": ["warn", {
"require": {
"FunctionDeclaration": true,
"MethodDefinition": false,
"ClassDeclaration": true,
"ArrowFunctionExpression": false,
"FunctionExpression": false
},
"publicOnly": true,
"contexts": [
"MethodDefinition:not([accessibility=/(private|protected)/]) > FunctionExpression"
]
}]
}
},
{
"files": [
"*.config.js"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"dev:link": "wsrun --if is-not-private --bin=yarn link",
"dev:unlink": "wsrun --if is-not-private --bin=yarn unlink",
"functional-test": "yarn build && yarn workspace functional-tests test",
"lint": "wsrun -m -l lint --quiet",
"lint": "wsrun -m -l lint --max-warnings=0",
"package": "wsrun -e -t -l --if is-not-private --bin yarn pack",
"test": "npm-run-all build test:mocha test:runtime test:runtime test:nyc:report",
"test:compat": "wsrun -e -m -t test:compat",
Expand Down

0 comments on commit 57e2642

Please sign in to comment.