Skip to content

Commit

Permalink
Configure linting and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
testower committed Aug 30, 2023
1 parent 5c5af9d commit 1dda251
Show file tree
Hide file tree
Showing 5 changed files with 1,759 additions and 150 deletions.
23 changes: 21 additions & 2 deletions client-next/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,35 @@ module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:import/recommended',
'plugin:jsx-a11y/recommended',
'plugin:@typescript-eslint/recommended',
'eslint-config-prettier',
],
ignorePatterns: ['dist', '.eslintrc.cjs', 'src/gql/**/*'],
ignorePatterns: ['node_modules', 'dist', '.prettierrc.js', '.eslintrc.cjs', 'src/gql/**/*'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
settings: {
react: {
// Tells eslint-plugin-react to automatically detect the version of React to use.
version: 'detect',
},
// Tells eslint how to resolve imports
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
"react/jsx-uses-react": "off",
"react/react-in-jsx-scope": "off",
},
}
3 changes: 3 additions & 0 deletions client-next/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
src/gql/
8 changes: 8 additions & 0 deletions client-next/.prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
"trailingComma": "all",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"printWidth": 120,
"bracketSpacing": true
}
Loading

0 comments on commit 1dda251

Please sign in to comment.