Add linter

This commit is contained in:
Maria Rushkova 2021-11-18 13:03:30 +01:00
parent ed0960ffab
commit 592630d7f8
No known key found for this signature in database
GPG Key ID: B9B5728B991FF586
2 changed files with 46 additions and 0 deletions

27
.eslintrc.json Normal file
View File

@ -0,0 +1,27 @@
{
"env": {
"es6": true,
"node": true,
"mocha": true,
"browser": true
},
"extends": [
"plugin:@typescript-eslint/recommended",
"eslint:recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-redeclare": "off",
"no-unused-vars": "off",
"prefer-const": ["error", {"destructuring": "all"}],
"semi": ["error", "never"],
"no-extra-semi": "off",
"@typescript-eslint/no-extra-semi": "off"
}
}

19
.prettierrc.json Normal file
View File

@ -0,0 +1,19 @@
{
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true,
"overrides": [
{
"files": ["*.ts","*.tsx"],
"options": {
"semi": false
}
},
{
"files": ["*.sol"],
"options": {
"semi": true
}
}
]
}