forked from decentraland/dappeteer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request decentraland#19 from NodeFactoryIo/beroburny/impro…
…vements Code improvements
- Loading branch information
Showing
20 changed files
with
649 additions
and
537 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,79 @@ | ||
module.exports = { | ||
"root": true, | ||
"env": { | ||
"mocha": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parser": "@typescript-eslint/parser", | ||
"plugins": [ | ||
"@typescript-eslint", | ||
"prettier", | ||
"eslint-plugin-import" | ||
root: true, | ||
env: { | ||
mocha: true, | ||
node: true, | ||
es6: true, | ||
}, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'eslint-plugin-import', 'prettier'], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended', | ||
], | ||
rules: { | ||
'prettier/prettier': ['error', {}, { usePrettierrc: true }], | ||
'@typescript-eslint/no-require-imports': 'error', | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ | ||
varsIgnorePattern: '^_', | ||
}, | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
'@typescript-eslint/explicit-function-return-type': [ | ||
'error', | ||
{ | ||
allowExpressions: true, | ||
}, | ||
], | ||
"rules": { | ||
"@typescript-eslint/no-require-imports": "error", | ||
"@typescript-eslint/no-unused-vars": ["error", { | ||
"varsIgnorePattern": "^_" | ||
}], | ||
"@typescript-eslint/explicit-function-return-type": ["error", { | ||
"allowExpressions": true | ||
}], | ||
"@typescript-eslint/ban-ts-comment": "error", | ||
"@typescript-eslint/no-explicit-any": "error", | ||
"@typescript-eslint/explicit-module-boundary-types": "error", | ||
"@typescript-eslint/no-use-before-define": "off", | ||
"prefer-const": "error", | ||
"no-consecutive-blank-lines": 0, | ||
"no-console": "error", | ||
"@typescript-eslint/naming-convention": ["error", | ||
{selector: "default", format: ['camelCase']}, | ||
{ | ||
selector: [ | ||
"classProperty", "parameterProperty", "objectLiteralProperty", | ||
"classMethod", "parameter" | ||
], | ||
format: ['camelCase'], leadingUnderscore: "allow" | ||
}, | ||
//variable must be in camel or upper case | ||
{selector: "variable", format: ["camelCase"], leadingUnderscore: "allow"}, | ||
{selector: "variable", modifiers: ["global"], format: ["PascalCase", "UPPER_CASE"]}, | ||
//classes and types must be in PascalCase | ||
{selector: ["typeLike", "enum"], format: ['PascalCase']}, | ||
{selector: "enumMember", format: null}, | ||
{selector: "typeProperty", format: ['PascalCase', 'camelCase']}, | ||
//ignore rules on destructured params | ||
{ | ||
selector: "variable", | ||
modifiers: ["destructured"], | ||
format: null | ||
} | ||
], | ||
"import/order": [ | ||
"error", | ||
{ | ||
"groups": ["builtin", "external", "parent", "internal", "sibling"], | ||
"newlines-between": "always", | ||
"alphabetize": { | ||
order: 'asc' | ||
} | ||
'@typescript-eslint/ban-ts-comment': 'error', | ||
'@typescript-eslint/no-explicit-any': 'error', | ||
'@typescript-eslint/explicit-module-boundary-types': 'error', | ||
'@typescript-eslint/no-use-before-define': 'off', | ||
'prefer-const': 'error', | ||
'no-consecutive-blank-lines': 0, | ||
'no-console': 'error', | ||
'@typescript-eslint/naming-convention': [ | ||
'error', | ||
{ selector: 'default', format: ['camelCase'] }, | ||
{ | ||
selector: ['classProperty', 'parameterProperty', 'objectLiteralProperty', 'classMethod', 'parameter'], | ||
format: ['camelCase'], | ||
leadingUnderscore: 'allow', | ||
}, | ||
//variable must be in camel or upper case | ||
{ selector: 'variable', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, | ||
// {selector: "variable", modifiers: ["global"], format: ["PascalCase", "UPPER_CASE"]}, | ||
//classes and types must be in PascalCase | ||
{ selector: ['typeLike', 'enum'], format: ['PascalCase'] }, | ||
{ selector: 'enumMember', format: null }, | ||
{ selector: 'typeProperty', format: ['PascalCase', 'camelCase'] }, | ||
//ignore rules on destructured params | ||
{ | ||
selector: 'variable', | ||
modifiers: ['destructured'], | ||
format: null, | ||
}, | ||
], | ||
'import/order': [ | ||
'error', | ||
{ | ||
groups: ['builtin', 'external', 'parent', 'internal', 'sibling'], | ||
'newlines-between': 'always', | ||
alphabetize: { | ||
order: 'asc', | ||
}, | ||
] | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/test/**/*.ts'], | ||
rules: { | ||
'no-console': 'off', | ||
}, | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["**/test/**/*.ts"], | ||
"rules": { | ||
"no-console": "off", | ||
} | ||
}, | ||
] | ||
} | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ test/server/data.js | |
build | ||
dist | ||
.vscode/ | ||
*metamask | ||
metamask | ||
.idea | ||
*.log | ||
test/dapp/data.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = { | ||
semi: true, | ||
trailingComma: "all", | ||
singleQuote: true, | ||
printWidth: 120, | ||
arrowParens: "always", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.