Skip to content

Commit

Permalink
feat: Next.js app 디렉토리 기반 @tanstack/react-query 설정 (#7)
Browse files Browse the repository at this point in the history
* chore: @tanstack/react-query 관련 라이브러리 설치

* feat: @tanstack/react-quer 설정 및 Provider들 분리y

* chore: eslint 룰 추가 및 preitter 버전 변경

* chore: eslintignore 파일 추가

* feat: react-query 관련 폴더 설정 추가

* chore: dev, develop 명령어 start에서 dev로 변경
  • Loading branch information
alstn2468 authored Jul 18, 2023
1 parent 6d9d29f commit 1455579
Show file tree
Hide file tree
Showing 28 changed files with 1,431 additions and 318 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.*
29 changes: 17 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,29 @@ module.exports = {
plugins: ['import', 'eslint-plugin-simple-import-sort', 'unused-imports'],
ignorePatterns: ['.pnp.*', '.yarn/**/*'],
extends: [
'eslint:recommended',
'next/core-web-vitals',
'next',
'prettier',
'plugin:import/recommended',
'plugin:@typescript-eslint/recommended',
],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './',
},
},
},
rules: {
'import/no-cycle': [
'error',
{ allowUnsafeDynamicCyclicDependency: true },
],
'import/no-unresolved': 'error',
'react/jsx-key': 'off',
'react/no-unescaped-entities': 'off',
Expand All @@ -22,6 +38,7 @@ module.exports = {
],
'react/jsx-first-prop-new-line': 'error',
'comma-dangle': ['error', 'always-multiline'],
eqeqeq: ['warn', 'smart'],
indent: ['error', 2],
quotes: ['error', 'single'],
'eol-last': 'error',
Expand All @@ -40,22 +57,10 @@ module.exports = {
'error',
{ count: 1, considerComments: true },
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn'],
'@typescript-eslint/ban-types': 'warn',
'import/named': 'off',
'react/display-name': 'off',
'@typescript-eslint/no-empty-function': 'off',
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': {
typescript: {
alwaysTryTypes: true,
project: './',
},
},
},
};
692 changes: 687 additions & 5 deletions .pnp.cjs

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"typescript.enablePromptUseWorkspaceTsdk": true
"typescript.enablePromptUseWorkspaceTsdk": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
8 changes: 4 additions & 4 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

const { existsSync } = require(`fs`);
const { createRequire } = require(`module`);
const { resolve } = require(`path`);
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = '../../../../.pnp.cjs';
const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
Expand Down
8 changes: 4 additions & 4 deletions .yarn/sdks/eslint/lib/api.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

const { existsSync } = require(`fs`);
const { createRequire } = require(`module`);
const { resolve } = require(`path`);
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = '../../../../.pnp.cjs';
const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
Expand Down
8 changes: 4 additions & 4 deletions .yarn/sdks/prettier/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

const { existsSync } = require(`fs`);
const { createRequire } = require(`module`);
const { resolve } = require(`path`);
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = '../../../.pnp.cjs';
const relPnpApiPath = "../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
Expand Down
2 changes: 1 addition & 1 deletion .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "prettier",
"version": "3.0.0-sdk",
"version": "2.8.8-sdk",
"main": "./index.js",
"type": "commonjs"
}
8 changes: 4 additions & 4 deletions .yarn/sdks/typescript/lib/tsc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/usr/bin/env node

const { existsSync } = require(`fs`);
const { createRequire } = require(`module`);
const { resolve } = require(`path`);
const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = '../../../../.pnp.cjs';
const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);
Expand Down
Loading

0 comments on commit 1455579

Please sign in to comment.