Skip to content

Commit

Permalink
fix eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
krzkaczor committed Jun 24, 2021
1 parent e503e9a commit 9a5fd16
Show file tree
Hide file tree
Showing 14 changed files with 200 additions and 185 deletions.
344 changes: 172 additions & 172 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,207 +1,207 @@
module.exports = {
"env": {
"es6": true
env: {
es6: true,
},
"extends": ["typestrict"],
"plugins": ["no-only-tests", "import"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"sourceType": "module"
extends: ['typestrict'],
plugins: ['no-only-tests', 'import'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
sourceType: 'module',
},
"rules": {
rules: {
//: "this gets inlined into a package eslint, so it means: use current package's package.info or the one at the project root"
// "import/no-extraneous-dependencies": ["error", { "packageDir": ["./", "../../"] }],
"@typescript-eslint/no-unused-vars": ["off"],
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-useless-constructor": "error",
"accessor-pairs": "error",
"constructor-super": "error",
"eqeqeq": [
"error",
"always",
'import/no-extraneous-dependencies': ['error', { packageDir: ['./', '../../'] }],
'@typescript-eslint/no-unused-vars': ['off'],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'accessor-pairs': 'error',
'constructor-super': 'error',
eqeqeq: [
'error',
'always',
{
"null": "ignore"
}
null: 'ignore',
},
],
"handle-callback-err": ["error", "^(err|error)$"],
"new-parens": "error",
"no-array-constructor": "error",
"no-async-promise-executor": "error",
"no-caller": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-condition": [
"error",
'handle-callback-err': ['error', '^(err|error)$'],
'new-parens': 'error',
'no-array-constructor': 'error',
'no-async-promise-executor': 'error',
'no-caller': 'error',
'no-class-assign': 'error',
'no-compare-neg-zero': 'error',
'no-cond-assign': 'error',
'no-const-assign': 'error',
'no-constant-condition': [
'error',
{
"checkLoops": false
}
checkLoops: false,
},
],
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-args": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty-character-class": "error",
"no-empty-pattern": "error",
"no-eval": "error",
"no-ex-assign": "error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-boolean-cast": "error",
"no-extra-parens": ["error", "functions"],
"no-fallthrough": "error",
"no-floating-decimal": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implied-eval": "error",
"no-inner-declarations": ["error", "functions"],
"no-invalid-regexp": "error",
"no-iterator": "error",
"no-label-var": "error",
"no-labels": [
"error",
'no-control-regex': 'error',
'no-debugger': 'error',
'no-delete-var': 'error',
'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
'no-empty-character-class': 'error',
'no-empty-pattern': 'error',
'no-eval': 'error',
'no-ex-assign': 'error',
'no-extend-native': 'error',
'no-extra-bind': 'error',
'no-extra-boolean-cast': 'error',
'no-extra-parens': ['error', 'functions'],
'no-fallthrough': 'error',
'no-floating-decimal': 'error',
'no-func-assign': 'error',
'no-global-assign': 'error',
'no-implied-eval': 'error',
'no-inner-declarations': ['error', 'functions'],
'no-invalid-regexp': 'error',
'no-iterator': 'error',
'no-label-var': 'error',
'no-labels': [
'error',
{
"allowLoop": false,
"allowSwitch": false
}
allowLoop: false,
allowSwitch: false,
},
],
"no-lone-blocks": "error",
"no-misleading-character-class": "error",
"no-mixed-operators": [
"error",
'no-lone-blocks': 'error',
'no-misleading-character-class': 'error',
'no-mixed-operators': [
'error',
{
"allowSamePrecedence": true,
"groups": [
["==", "!=", "===", "!==", ">", ">=", "<", "<="],
["&&", "||"],
["in", "instanceof"]
]
}
allowSamePrecedence: true,
groups: [
['==', '!=', '===', '!==', '>', '>=', '<', '<='],
['&&', '||'],
['in', 'instanceof'],
],
},
],
"no-multi-str": "error",
"no-multiple-empty-lines": [
"error",
'no-multi-str': 'error',
'no-multiple-empty-lines': [
'error',
{
"max": 1,
"maxEOF": 0
}
max: 1,
maxEOF: 0,
},
],
"no-negated-in-lhs": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-object": "error",
"no-new-require": "error",
"no-new-symbol": "error",
"no-new-wrappers": "error",
"no-obj-calls": "error",
"no-octal": "error",
"no-octal-escape": "error",
"no-path-concat": "error",
"no-proto": "error",
"no-prototype-builtins": "error",
"no-redeclare": [
"error",
'no-negated-in-lhs': 'error',
'no-new': 'error',
'no-new-func': 'error',
'no-new-object': 'error',
'no-new-require': 'error',
'no-new-symbol': 'error',
'no-new-wrappers': 'error',
'no-obj-calls': 'error',
'no-octal': 'error',
'no-octal-escape': 'error',
'no-path-concat': 'error',
'no-proto': 'error',
'no-prototype-builtins': 'error',
'no-redeclare': [
'error',
{
"builtinGlobals": false
}
builtinGlobals: false,
},
],
"no-regex-spaces": "error",
"no-return-assign": ["error", "except-parens"],
"no-self-assign": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-tabs": "error",
"no-this-before-super": "error",
"no-throw-literal": "error",
"no-unexpected-multiline": "error",
"no-unmodified-loop-condition": "error",
"no-unneeded-ternary": [
"error",
'no-regex-spaces': 'error',
'no-return-assign': ['error', 'except-parens'],
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-sequences': 'error',
'no-shadow-restricted-names': 'error',
'no-sparse-arrays': 'error',
'no-tabs': 'error',
'no-this-before-super': 'error',
'no-throw-literal': 'error',
'no-unexpected-multiline': 'error',
'no-unmodified-loop-condition': 'error',
'no-unneeded-ternary': [
'error',
{
"defaultAssignment": false
}
defaultAssignment: false,
},
],
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-restricted-imports": ["error"],
"no-use-before-define": ["off"],
"no-useless-call": "error",
"no-useless-catch": "error",
"no-useless-computed-key": "error",
"no-useless-escape": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"no-with": "error",
"object-curly-spacing": ["error", "always"],
"object-property-newline": [
"error",
'no-unreachable': 'error',
'no-unsafe-finally': 'error',
'no-unsafe-negation': 'error',
'no-restricted-imports': ['error'],
'no-use-before-define': ['off'],
'no-useless-call': 'error',
'no-useless-catch': 'error',
'no-useless-computed-key': 'error',
'no-useless-escape': 'error',
'no-useless-rename': 'error',
'no-useless-return': 'error',
'no-with': 'error',
'object-curly-spacing': ['error', 'always'],
'object-property-newline': [
'error',
{
"allowMultiplePropertiesPerLine": true
}
allowMultiplePropertiesPerLine: true,
},
],
"one-var": [
"error",
'one-var': [
'error',
{
"initialized": "never"
}
initialized: 'never',
},
],
"operator-linebreak": [
"error",
"after",
'operator-linebreak': [
'error',
'after',
{
"overrides": {
":": "before",
"?": "before"
}
}
overrides: {
':': 'before',
'?': 'before',
},
},
],
"padded-blocks": [
"error",
'padded-blocks': [
'error',
{
"blocks": "never",
"classes": "never",
"switches": "never"
}
blocks: 'never',
classes: 'never',
switches: 'never',
},
],
"prefer-const": [
"error",
'prefer-const': [
'error',
{
"destructuring": "all"
}
destructuring: 'all',
},
],
"prefer-promise-reject-errors": "error",
"symbol-description": "error",
"unicode-bom": ["error", "never"],
"use-isnan": "error",
"valid-typeof": [
"error",
'prefer-promise-reject-errors': 'error',
'symbol-description': 'error',
'unicode-bom': ['error', 'never'],
'use-isnan': 'error',
'valid-typeof': [
'error',
{
"requireStringLiterals": true
}
requireStringLiterals: true,
},
],
"wrap-iife": [
"error",
"any",
'wrap-iife': [
'error',
'any',
{
"functionPrototypeMethods": true
}
functionPrototypeMethods: true,
},
],
"yoda": ["error", "never"],
"no-only-tests/no-only-tests": "error"
yoda: ['error', 'never'],
'no-only-tests/no-only-tests': 'error',
},
"overrides": [
overrides: [
{
"files": ["test/**/*.{js,ts,tsx}"],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off"
}
}
]
files: ['test/**/*.{js,ts,tsx}'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
},
},
],
}
2 changes: 1 addition & 1 deletion packages/hardhat/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const baseConfig = require('../../.eslintrc.json')
const baseConfig = require('../../.eslintrc.js')

module.exports = {
...baseConfig,
Expand Down
5 changes: 4 additions & 1 deletion packages/target-ethers-v4-test/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const baseConfig = require('../../.eslintrc.json')
const baseConfig = require('../../.eslintrc.js')

module.exports = {
...baseConfig,
rules: {
'import/no-extraneous-dependencies': 'off',
},
}
Loading

0 comments on commit 9a5fd16

Please sign in to comment.