Skip to content

Commit

Permalink
eslint multiple tsconfig project 사용하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jin60641 committed Nov 20, 2022
1 parent cb6e1d8 commit 6003951
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module.exports = {
ecmaFeatures: {
jsx: true,
},
project: process.env.TARGET === 'ELECTRON' ? './tsconfig.electron.json' : './tsconfig.json',
project: [path.resolve(__dirname, './tsconfig.json'), path.resolve(__dirname, './electron/tsconfig.json')],
ecmaVersion: 2020,
sourceType: 'module',
},
Expand Down
2 changes: 2 additions & 0 deletions config-overrides.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
const {
override,
disableEsLint,
addWebpackResolve,
useBabelRc,
} = require("customize-cra");
const path = require('path');

module.exports = override(
disableEsLint(),
useBabelRc(),
addWebpackResolve({
modules: [path.join(__dirname, 'src'), 'node_modules'],
Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@
"react:build": "react-app-rewired build",
"react:test": "react-app-rewired test",
"react:eject": "react-scripts eject",
"electron:build": "ELECTRON_IS_DEV=0 yarn tsc -p ./tsconfig.electron.json",
"electron:build": "yarn tsc -p ./tsconfig.electron.json",
"electron:dev": "yarn tsc --watch -p ./tsconfig.electron.json",
"electron": "nodemon --exec \"\"electron .\"\"",
"start": "concurrently \"yarn electron:dev\" \"yarn react:start\" \"wait-on http://localhost:3000 && yarn electron\"",
"build": "yarn react:build && yarn electron:build && electron-builder",
"react:lint": "eslint -c .eslintrc.js 'src/**/*.{ts,tsx}'",
"electron:lint": "TARGET=ELECTRON eslint -c .eslintrc.js 'electron/**/*.{ts,tsx}'",
"lint": "concurrently \"yarn react:lint\" \"yarn electron:lint\"",
"lint:fix": "concurrently \"yarn react:lint --fix\" \"yarn electron:lint --fix\""
"lint": "eslint -c .eslintrc.js '{src,electron}/**/*.{ts,tsx}'"
},
"main": "build/electron.js",
"homepage": "./",
Expand Down

0 comments on commit 6003951

Please sign in to comment.