-
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.
* Create clean action.yml (#12) * Create clean.yml * Add contents:read * Update modules * fix issue --------- Co-authored-by: Viktoriia <1> * Fix tests and refactor code * Update README file * Add eslint * Fix comment * fix comments * Update README * Fix * Prettier config * Prettier format --------- Co-authored-by: Viktoriia <1>
- Loading branch information
1 parent
ef2e9e7
commit b3e395c
Showing
23 changed files
with
24,947 additions
and
24,360 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 |
---|---|---|
@@ -0,0 +1,121 @@ | ||
module.exports = { | ||
extends: ['prettier'], | ||
rules: { | ||
'prettier/prettier': ['error'], | ||
'no-process-env': 'error', | ||
'no-multiple-empty-lines': [ | ||
'error', | ||
{ | ||
max: 2, | ||
maxBOF: 0, | ||
maxEOF: 0, | ||
}, | ||
], | ||
'no-tabs': 'off', | ||
'no-restricted-syntax': 'off', | ||
'class-methods-use-this': 'off', | ||
'no-underscore-dangle': [ | ||
'error', | ||
{ | ||
allow: ['_id', '_v', '__v'], | ||
}, | ||
], | ||
'no-shadow': [ | ||
'error', | ||
{ | ||
allow: ['err', 'error'], | ||
}, | ||
], | ||
'prefer-destructuring': [ | ||
'warn', | ||
{ | ||
object: true, | ||
array: false, | ||
}, | ||
], | ||
'no-param-reassign': [ | ||
'warn', | ||
{ | ||
props: false, | ||
}, | ||
], | ||
'no-unused-vars': [ | ||
'warn', | ||
{ | ||
args: 'after-used', | ||
argsIgnorePattern: 'app|req|res|next|options|params|^_', | ||
}, | ||
], | ||
'arrow-parens': ['error', 'always'], | ||
'arrow-body-style': [ | ||
'error', | ||
'as-needed', | ||
{ requireReturnForObjectLiteral: true }, | ||
], | ||
'no-only-tests/no-only-tests': 'error', | ||
}, | ||
plugins: ['import', 'prettier', 'promise', 'no-only-tests'], | ||
env: { | ||
node: true, | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
}, | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['apps/**/*.ts'], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking', | ||
'prettier', | ||
'plugin:promise/recommended', | ||
'plugin:prettier/recommended', | ||
], | ||
parserOptions: { | ||
project: 'apps/server/tsconfig.lint.json', | ||
}, | ||
env: { | ||
node: true, | ||
es6: true, | ||
}, | ||
rules: { | ||
'import/no-unresolved': 'off', // better handled by ts resolver | ||
'import/no-extraneous-dependencies': 'off', // better handles by ts resolver | ||
'import/prefer-default-export': 'off', | ||
'no-void': ['error', { allowAsStatement: true }], | ||
'max-classes-per-file': 'off', | ||
'class-methods-use-this': 'off', | ||
'no-param-reassign': 'off', | ||
'no-underscore-dangle': 'off', | ||
'@typescript-eslint/unbound-method': 'error', | ||
'@typescript-eslint/no-unused-vars': 'error', | ||
'@typescript-eslint/no-empty-interface': [ | ||
'error', | ||
{ | ||
allowSingleExtends: true, | ||
}, | ||
], | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['**/*spec.ts'], | ||
plugins: ['jest'], | ||
env: { | ||
jest: true, | ||
}, | ||
rules: { | ||
// you should turn the original rule off *only* for test files | ||
'@typescript-eslint/unbound-method': 'off', | ||
'jest/unbound-method': 'error', | ||
}, | ||
}, | ||
], | ||
}, | ||
], | ||
}; |
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
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,7 @@ | ||
module.exports = { | ||
semi: true, | ||
singleQuote: true, | ||
printWidth: 80, | ||
useTabs: true, | ||
endOfLine: 'auto', | ||
}; |
Oops, something went wrong.