Skip to content

Commit

Permalink
fix: code formatted & basic tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
siandreev committed Sep 12, 2023
1 parent 4d2575c commit e98a6fa
Show file tree
Hide file tree
Showing 17 changed files with 3,159 additions and 603 deletions.
91 changes: 91 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
module.exports = {
root: true,
ignorePatterns: ['**/*.js'],
overrides: [
{
files: ['tests/**/*.ts', 'wrappers/**/*.ts', 'scripts/**/*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
createDefaultProgram: true
},
plugins: [
'@typescript-eslint',
'unused-imports',
'import'
],
extends: [
'airbnb-typescript/base',
'plugin:prettier/recommended',
'prettier'
],
rules: {
'import/extensions': [
'error',
'ignorePackages',
{
js: "never",
jsx: "never",
ts: "never",
tsx: "never"
}
],
'import/prefer-default-export': 'off',
'@typescript-eslint/no-useless-constructor': 'off',
'no-plusplus': 'off',
'class-method-use-this': 'off',
'no-underscore-dangle': 'off',
'no-inferrable-types': 'off',
'@typescript-eslint/no-explicit-any': 2,
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
args: 'all',
ignoreRestSiblings: false,
argsIgnorePattern: '^_'
}
],
'@typescript-eslint/no-inferrable-types': 'off',
'class-methods-use-this': 'off',
complexity: ['error', 20],
eqeqeq: ['error', 'smart'],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'enumMember',
format: ['UPPER_CASE']
}
],
'no-empty': ['error', { 'allowEmptyCatch': true }],

'array-bracket-spacing': ['error', 'never'],
'object-curly-spacing': ['error', 'always'],
indent: 'off',
'comma-dangle': 'off',
'@typescript-eslint/comma-dangle': ['error', 'never'],
'import/no-extraneous-dependencies': 'off',
'@typescript-eslint/dot-notation': 'off',
'no-restricted-globals': 'off',
'@typescript-eslint/no-empty-function': 'off',
'no-param-reassign': 'off',
'max-classes-per-file': 'off',
radix: ['warn', 'as-needed'],
'no-prototype-builtins': 'off',
'no-return-assign': 'off',
'no-restricted-syntax': [
'error',
'LabeledStatement',
'WithStatement'
],
'no-console': 'off',
'import/export': 0,
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/return-await': 'off'
}
}
]
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
temp
build
.idea
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build
contracts
7 changes: 0 additions & 7 deletions .prettierrc

This file was deleted.

13 changes: 13 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"arrowParens": "avoid",
"bracketSpacing": true,
"printWidth": 100,
"proseWrap": "always",
"quoteProps": "as-needed",
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none",
"useTabs": false
}
Loading

0 comments on commit e98a6fa

Please sign in to comment.