Skip to content

Commit

Permalink
Add graphql and apollo configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
shreeyash07 committed Oct 22, 2024
1 parent ed7f156 commit cf09b4b
Show file tree
Hide file tree
Showing 8 changed files with 250 additions and 24 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ const config = {
'@typescript-eslint',
'react-refresh',
'simple-import-sort',
'import-newlines'
'import-newlines',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx']
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
Expand Down Expand Up @@ -66,7 +66,7 @@ const config = {
'import/no-cycle': ['error', { allowUnsafeDynamicCyclicDependency: true }],

'react/react-in-jsx-scope': 'off',
'camelcase': 'off',
camelcase: 'off',

'react/jsx-indent': ['error', 4],
'react/jsx-indent-props': ['error', 4],
Expand All @@ -80,7 +80,7 @@ const config = {
'react/require-default-props': ['warn', { ignoreFunctionalComponents: true }],
'simple-import-sort/imports': 'warn',
'simple-import-sort/exports': 'warn',
'import-newlines/enforce': ['warn', 1]
'import-newlines/enforce': ['warn', 1],
},
overrides: [
{
Expand All @@ -89,7 +89,7 @@ const config = {
'simple-import-sort/imports': [
'error',
{
'groups': [
groups: [
// side effect imports
['^\\u0000'],
// packages `react` related packages come first
Expand All @@ -101,12 +101,12 @@ const config = {
['^\\.\\.(?!/?$)', '^\\.\\./?$', '^\\./(?=.*/)(?!/?$)', '^\\.(?!/?$)', '^\\./?$'],
// style imports
['^.+\\.json$', '^.+\\.module.css$'],
]
}
]
}
}
]
],
},
],
},
},
],
};

module.exports = config;
8 changes: 6 additions & 2 deletions env.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { defineConfig, Schema } from '@julr/vite-plugin-validate-env';
import {
defineConfig,
Schema,
} from '@julr/vite-plugin-validate-env';

export default defineConfig({
APP_TITLE: Schema.string.optional(),
})
GRAPHQL_ENDPOINT: Schema.string.optional(),
});
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@
"postinstall": "patch-package"
},
"dependencies": {
"@apollo/client": "^3.11.8",
"@togglecorp/fujs": "^2.0.0",
"@julr/vite-plugin-validate-env": "^1.1.1",
"graphql": "^16.9.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.11.1"
},
"devDependencies": {
"@julr/vite-plugin-validate-env": "^1.1.1",
"@types/node": "^20.1.3",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
Expand Down
Loading

0 comments on commit cf09b4b

Please sign in to comment.