Skip to content

Commit

Permalink
chore: Configure ESLint (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
meyfa authored Jul 7, 2024
1 parent 8318fc9 commit 3ba6f97
Show file tree
Hide file tree
Showing 7 changed files with 4,270 additions and 117 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extends: '@meyfa/eslint-config'
parserOptions:
project: './tsconfig.lint.json'
3 changes: 3 additions & 0 deletions backend/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
extends: '@meyfa/eslint-config'
parserOptions:
project: './tsconfig.lint.json'
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"scripts": {
"build": "node -e \"fs.rmSync('./dist',{force:true,recursive:true})\" && tsc",
"lint": "tsc --noEmit -p tsconfig.lint.json"
"lint": "tsc --noEmit -p tsconfig.lint.json && eslint --ignore-path .gitignore ."
},
"dependencies": {
"pino-pretty": "11.2.1",
Expand Down
38 changes: 38 additions & 0 deletions frontend/.eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
extends:
- '@meyfa/eslint-config'
- plugin:react/recommended
- plugin:react/jsx-runtime
- plugin:react-hooks/recommended
- plugin:jsx-a11y/recommended

plugins:
- react
- react-hooks
- jsx-a11y

parserOptions:
project: './tsconfig.lint.json'
ecmaFeatures:
jsx: true

settings:
react:
version: 'detect'

rules:
react/jsx-pascal-case: ['warn', { allowAllCaps: true, ignore: [] }]
react/no-typos: ['error']
react/style-prop-object: ['warn']
jsx-quotes: ['error', 'prefer-single']
react/jsx-indent: ['error', 2]
react/jsx-indent-props: ['error', 2]
react/jsx-first-prop-new-line: ['error']
react/jsx-closing-bracket-location: ['error']
react/jsx-max-props-per-line: ['error', { maximum: 1, when: 'multiline' }]
react/jsx-props-no-multi-spaces: ['error']
react/jsx-tag-spacing: ['error']
react/jsx-equals-spacing: ['error', 'never']
react/jsx-wrap-multilines: ['warn', { return: 'parens-new-line', arrow: 'parens-new-line' }]
react/void-dom-elements-no-children: ['error']
react/no-unstable-nested-components: ['error']
react/prop-types: ['error', { ignore: ['children'] }]
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"private": true,
"scripts": {
"build": "vite build",
"lint": "tsc --noEmit -p tsconfig.lint.json"
"lint": "tsc --noEmit -p tsconfig.lint.json && eslint --ignore-path .gitignore ."
},
"devDependencies": {
"@types/luxon": "3.4.2",
Expand Down
Loading

0 comments on commit 3ba6f97

Please sign in to comment.