Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #38 from exortme1ster/feature/implement-eslintrc-b…
Browse files Browse the repository at this point in the history
…ackend

feat: implement eslintrc on backend
  • Loading branch information
nmashchenko committed May 3, 2023
2 parents 53de080 + a710e35 commit 0d67ba4
Show file tree
Hide file tree
Showing 89 changed files with 2,181 additions and 702 deletions.
80 changes: 49 additions & 31 deletions server/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir : __dirname,
sourceType: 'module',
},
plugins: ['@typescript-eslint/eslint-plugin'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js'],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
"prettier/prettier": [
"error",
{
"singleQuote": true,
"parser": "flow"
}
]
};
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
ecmaVersion: 'latest',
ecmaFeatures: {
jsx: false,
},
},
plugins: [
'@typescript-eslint/eslint-plugin',
'simple-import-sort',
'import',
'prettier',
],
extends: ['plugin:@typescript-eslint/recommended'],
root: true,
env: {
node: true,
jest: true,
},
ignorePatterns: ['.eslintrc.js', 'dist', 'webpack-hmr.config.js'],
rules: {
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-function': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'prettier/prettier': [
'error',
{
parser: 'typescript',
singleQuote: true,
tabWidth: 2,
tabs: false,
semicolons: true,
arrowParens: 'avoid',
trailingComma: 'all',
},
],
'@typescript-eslint/ban-ts-comment': 'off',
},
};
5 changes: 3 additions & 2 deletions server/.prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"trailingComma": "all",
"semi": true,
"bracketSpacing": true,
"arrowParens": "always",
"arrowParens": "avoid",
"endOfLine": "lf",
"tabWidth": 4,
"useTabs": true
"useTabs": true,
"parser": "typescript"
}
Loading

0 comments on commit 0d67ba4

Please sign in to comment.