Skip to content

Commit

Permalink
Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
cyraxred committed Aug 23, 2022
1 parent f95553d commit 0c33502
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 220 deletions.
88 changes: 88 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"ignorePatterns": [
"dist",
"node_modules",
"typechain-types"
],
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json"]
},
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier"
],
"rules": {
"no-constructor-return": "error",
"no-duplicate-imports": "error",
"no-promise-executor-return": "error",
"no-self-compare": "error",
"no-unmodified-loop-condition": "error",
"no-unreachable-loop": "error",
"no-unused-private-class-members": "error",
"require-atomic-updates": "error",

"arrow-body-style": ["error", "as-needed"],
"block-scoped-var": "error",
"camelcase": ["error",{ "properties": "always" }],
"curly": ["error","all"],
"default-case": "error",
"default-case-last": "error",
"default-param-last": "error",
"dot-notation": "error",
"eqeqeq": "error",
"max-depth": ["error", { "max": 4 }],
"multiline-comment-style": ["error", "starred-block"],
"no-array-constructor": "error",
"no-bitwise": "error",
"no-console": "error",
"no-continue": "error",
"no-else-return": "error",
"no-eq-null": "error",
"no-extra-label": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loop-func": "error",
"no-mixed-operators": "error",
"no-multi-assign": "error",
"no-negated-condition": "error",
"no-nested-ternary": "error",
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-shadow": "error",
"no-undefined": "error",
"no-useless-constructor": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-var": "error",
"one-var-declaration-per-line": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"spaced-comment": "error",
"strict" : "error",

"arrow-spacing": "error",
"comma-spacing": ["error", { "before": false, "after": true }],
"eol-last": "error",

"@typescript-eslint/no-misused-promises": [
"error",
{"checksConditionals": true,"checksVoidReturn": false}
],

"prettier/prettier": "error"
}
}
7 changes: 7 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Ignore artifacts:
.github
.husky
.eslintrc
dist
docs
node_modules
18 changes: 18 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json.schemastore.org/prettierrc",
"overrides": [
{
"files": "*.ts",
"options": {
"arrowParens": "always",
"bracketSpacing": false,
"endOfLine": "lf",
"printWidth": 80,
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "none"
}
}
]
}
Loading

0 comments on commit 0c33502

Please sign in to comment.