Skip to content

Commit

Permalink
feat: add eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
jackstar12 committed Oct 6, 2024
1 parent c3a0baa commit 4ee5f49
Show file tree
Hide file tree
Showing 4 changed files with 1,246 additions and 6 deletions.
57 changes: 57 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
module.exports = {
"env": {
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [
{
"env": {
"node": true
},
"files": [
".eslintrc.{js,cjs}"
],
"parserOptions": {
"sourceType": "script"
},
},
{
"files": ["**/lazy/**/*", "test/**/*"],
"rules": {
"no-restricted-imports": "off"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
"no-empty": "off",
"no-useless-escape": "off",
"no-case-declarations": "off",
"no-restricted-imports": ["error", {
"patterns": [
{
"group": ["**/lazy/**"],
"message": "These modules have to be imported lazily due to big dependencies"
},
{
"group": ["boltz-core","bitcoinjs-lib", "liquidjs-lib", "bolt11", "@vulpemventures/secp256k1-zkp", "@bitcoinerlab/secp256k1"],
"message": "These modules are only allowed to be importend in the 'src/utils/app' folder"
}
]
}],
"prefer-const": "off"
}
};
Loading

0 comments on commit 4ee5f49

Please sign in to comment.