Skip to content

Commit

Permalink
feat: add eslint ci, fix eslint errors (#97)
Browse files Browse the repository at this point in the history
* feat: add eslint ci

* fix: fix nano-staged config

* fix: update eslint config

* fix: fix eslint errors

* fix: ts error

---------

Co-authored-by: robhovsepyan <[email protected]>
  • Loading branch information
roberthovsepyan and robhovsepyan authored Nov 30, 2023
1 parent 47a18c2 commit 2c66e7a
Show file tree
Hide file tree
Showing 38 changed files with 21,651 additions and 15,454 deletions.
32 changes: 32 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"root": true,
"extends": [
"@gravity-ui/eslint-config",
"@gravity-ui/eslint-config/prettier"
],
// These files are generated, so they don't have to be linted
"ignorePatterns": ["**/*AutocompleteParser.js", "src/generator/dist/**/*"],
"rules": {
"array-callback-return": "off",
"consistent-return": "off",
"no-negated-condition": "off",
"@typescript-eslint/explicit-function-return-type": "error",
"object-shorthand": "error",
"no-implicit-globals": "off"
},
"overrides": [
{
"files": "*.js",
"rules": {
"@typescript-eslint/explicit-function-return-type": "off"
}
},
{
"files": ["**/parser-extension.js", "src/parsing/lib/parsing.js"],
"rules": {
// Parser is extended via reassignment, so this rule doesn't make sense
"no-param-reassign": "off"
}
}
]
}
Loading

0 comments on commit 2c66e7a

Please sign in to comment.