style: fix linting issues met Prettier
This commit is contained in:
parent
586f32ffa3
commit
65ebf1a083
2 changed files with 19 additions and 20 deletions
|
@ -12,7 +12,7 @@ const NEWER_TEST_SUFFIX = 'nEweR';
|
||||||
|
|
||||||
async function createTestLearningObjects(learningObjectRepo: LearningObjectRepository): Promise<{
|
async function createTestLearningObjects(learningObjectRepo: LearningObjectRepository): Promise<{
|
||||||
older: LearningObject;
|
older: LearningObject;
|
||||||
newer: LearningObject
|
newer: LearningObject;
|
||||||
}> {
|
}> {
|
||||||
const olderExample = example.createLearningObject();
|
const olderExample = example.createLearningObject();
|
||||||
await learningObjectRepo.save(olderExample);
|
await learningObjectRepo.save(olderExample);
|
||||||
|
|
|
@ -38,15 +38,12 @@ export default [
|
||||||
'@typescript-eslint/adjacent-overload-signatures': 'warn',
|
'@typescript-eslint/adjacent-overload-signatures': 'warn',
|
||||||
'@typescript-eslint/array-type': 'warn',
|
'@typescript-eslint/array-type': 'warn',
|
||||||
'@typescript-eslint/await-thenable': 'error',
|
'@typescript-eslint/await-thenable': 'error',
|
||||||
'@typescript-eslint/ban-ts-comment': [
|
'@typescript-eslint/ban-ts-comment': ['error', { minimumDescriptionLength: 10 }],
|
||||||
'error',
|
|
||||||
{ minimumDescriptionLength: 10 },
|
|
||||||
],
|
|
||||||
'@typescript-eslint/ban-tslint-comment': 'error',
|
'@typescript-eslint/ban-tslint-comment': 'error',
|
||||||
'camelcase': 'off',
|
camelcase: 'off',
|
||||||
'@typescript-eslint/class-literal-property-style': 'warn',
|
'@typescript-eslint/class-literal-property-style': 'warn',
|
||||||
'class-methods-use-this': 'off',
|
'class-methods-use-this': 'off',
|
||||||
'@typescript-eslint/class-methods-use-this': [ 'error', { ignoreOverrideMethods: true } ],
|
'@typescript-eslint/class-methods-use-this': ['error', { ignoreOverrideMethods: true }],
|
||||||
'@typescript-eslint/consistent-generic-constructors': 'warn',
|
'@typescript-eslint/consistent-generic-constructors': 'warn',
|
||||||
'@typescript-eslint/consistent-indexed-object-style': 'error',
|
'@typescript-eslint/consistent-indexed-object-style': 'error',
|
||||||
'consistent-return': 'off',
|
'consistent-return': 'off',
|
||||||
|
@ -65,28 +62,30 @@ export default [
|
||||||
'init-declarations': 'off',
|
'init-declarations': 'off',
|
||||||
'@typescript-eslint/init-declarations': 'off',
|
'@typescript-eslint/init-declarations': 'off',
|
||||||
'max-params': 'off',
|
'max-params': 'off',
|
||||||
'@typescript-eslint/max-params': ['error', { 'max': 6 }],
|
'@typescript-eslint/max-params': ['error', { max: 6 }],
|
||||||
'@typescript-eslint/member-ordering': 'warn',
|
'@typescript-eslint/member-ordering': 'warn',
|
||||||
'@typescript-eslint/method-signature-style': 'off', // Don't care about TypeScript strict mode.
|
'@typescript-eslint/method-signature-style': 'off', // Don't care about TypeScript strict mode.
|
||||||
'@typescript-eslint/naming-convention': [
|
'@typescript-eslint/naming-convention': [
|
||||||
'warn',
|
'warn',
|
||||||
{ // Enforce that all variables, functions and properties are camelCase
|
{
|
||||||
|
// Enforce that all variables, functions and properties are camelCase
|
||||||
selector: 'variableLike',
|
selector: 'variableLike',
|
||||||
format: ['camelCase'],
|
format: ['camelCase'],
|
||||||
leadingUnderscore: 'allow'
|
leadingUnderscore: 'allow',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
selector: 'variable',
|
selector: 'variable',
|
||||||
modifiers: ['const'],
|
modifiers: ['const'],
|
||||||
format: ['camelCase', 'UPPER_CASE'],
|
format: ['camelCase', 'UPPER_CASE'],
|
||||||
trailingUnderscore: 'allow'
|
trailingUnderscore: 'allow',
|
||||||
},
|
},
|
||||||
{ // Enforce that private members are prefixed with an underscore
|
{
|
||||||
|
// Enforce that private members are prefixed with an underscore
|
||||||
selector: 'memberLike',
|
selector: 'memberLike',
|
||||||
modifiers: ['private'],
|
modifiers: ['private'],
|
||||||
format: ['camelCase'],
|
format: ['camelCase'],
|
||||||
leadingUnderscore: 'allow',
|
leadingUnderscore: 'allow',
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
'no-array-constructor': 'off',
|
'no-array-constructor': 'off',
|
||||||
'@typescript-eslint/no-array-constructor': 'error',
|
'@typescript-eslint/no-array-constructor': 'error',
|
||||||
|
@ -143,13 +142,13 @@ export default [
|
||||||
'@typescript-eslint/no-unused-vars': [
|
'@typescript-eslint/no-unused-vars': [
|
||||||
'warn',
|
'warn',
|
||||||
{
|
{
|
||||||
'args': 'all',
|
args: 'all',
|
||||||
'argsIgnorePattern': '^_',
|
argsIgnorePattern: '^_',
|
||||||
'caughtErrors': 'all',
|
caughtErrors: 'all',
|
||||||
'caughtErrorsIgnorePattern': '^_',
|
caughtErrorsIgnorePattern: '^_',
|
||||||
'varsIgnorePattern': '^_',
|
varsIgnorePattern: '^_',
|
||||||
'ignoreRestSiblings': true,
|
ignoreRestSiblings: true,
|
||||||
}
|
},
|
||||||
],
|
],
|
||||||
'no-use-before-define': 'off',
|
'no-use-before-define': 'off',
|
||||||
'@typescript-eslint/no-use-before-define': 'off',
|
'@typescript-eslint/no-use-before-define': 'off',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue