Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
style: Tslint replaced by eslint, code fixed to meet code style requi…
…rements
- Loading branch information
Sergii Kovalev
committed
Nov 4, 2020
1 parent
abbc8af
commit ec7e92f
Showing
10 changed files
with
1,528 additions
and
194 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
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,15 @@ | ||
# package directories | ||
node_modules | ||
#dist is only for the package | ||
dist | ||
#ignore npm pack output | ||
serverless-iam-roles-per-function-*.tgz | ||
#ignore coverage dir | ||
coverage | ||
.nyc_output | ||
npm-debug.log | ||
*.txt | ||
# JetBrains IDE | ||
.idea | ||
# serverless | ||
.serverless |
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,89 @@ | ||
// @see https://eslint.org/docs/user-guide/configuring#configuring-rules | ||
const OFF = 0; | ||
const WARN = 1; | ||
const ERROR = 2; | ||
|
||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/eslint-recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
env: { | ||
node: true, | ||
mocha: true, | ||
}, | ||
plugins: [ | ||
'import', | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': OFF, | ||
'@typescript-eslint/explicit-module-boundary-types': OFF, | ||
'arrow-body-style': [ERROR, 'as-needed'], | ||
'comma-dangle': [ERROR, 'always-multiline'], | ||
'import/imports-first': ERROR, | ||
'import/newline-after-import': ERROR, | ||
'import/no-named-as-default': ERROR, | ||
'import/no-unresolved': [ERROR, { commonjs: true, amd: true }], | ||
'import/no-cycle': ['error', { maxDepth: 9999 }], | ||
indent: [ERROR, 2, { SwitchCase: 1 }], | ||
'max-len': [ERROR, 120], | ||
'newline-per-chained-call': ERROR, | ||
'no-confusing-arrow': ERROR, | ||
'no-unused-vars': [ERROR, { argsIgnorePattern: '^_' }], | ||
'no-use-before-define': ERROR, | ||
'require-yield': ERROR, | ||
'function-call-argument-newline': [ERROR, 'consistent'], | ||
'linebreak-style': OFF, | ||
'no-trailing-spaces': ERROR, | ||
'no-cond-assign': [ERROR, 'except-parens'], | ||
'no-unused-expressions': [ERROR, { allowShortCircuit: true, allowTernary: true }], | ||
'sort-imports': [ERROR, { | ||
ignoreCase: false, | ||
ignoreDeclarationSort: true, | ||
ignoreMemberSort: false, | ||
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'], | ||
}], | ||
eqeqeq: [ERROR, 'always', { null: 'ignore' }], | ||
quotes: [ERROR, 'single'], | ||
// JSDoc Requirements | ||
'require-jsdoc': [WARN, { | ||
require: { | ||
FunctionDeclaration: true, | ||
MethodDefinition: true, | ||
ClassDeclaration: false, | ||
}, | ||
}], | ||
'valid-jsdoc': [ERROR, { | ||
requireReturn: true, | ||
requireReturnDescription: false, | ||
requireParamDescription: false, | ||
requireParamType: true, | ||
requireReturnType: false, | ||
preferType: { | ||
Boolean: 'boolean', Number: 'number', object: 'Object', String: 'string', | ||
}, | ||
}], | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
'node': { | ||
'extensions': ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.test.ts'], | ||
rules: { | ||
'@typescript-eslint/no-var-requires': 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
Oops, something went wrong.