Skip to content

Commit

Permalink
eslint 설정 수정 및 lint script 수정 (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
rieulp committed Nov 7, 2024
1 parent fc6b6d2 commit 074567b
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 21 deletions.
20 changes: 0 additions & 20 deletions .eslintrc.js

This file was deleted.

26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { defineConfig } from 'eslint-define-config';
import reactPlugin from 'eslint-plugin-react';
import typescriptPlugin from '@typescript-eslint/eslint-plugin';

export default defineConfig([
{
files: ['*.ts', '*.tsx'], // TypeScript 파일에 대한 설정
languageOptions: {
parser: '@typescript-eslint/parser', // 타입스크립트 파서
},
plugins: {
react: reactPlugin,
'@typescript-eslint': typescriptPlugin,
},
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
},
settings: {
react: {
version: 'detect',
},
},
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
},
]);
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write .",
"lint": "eslint --fix .",
"lint": "eslint .",
"dev": "cross-env NODE_ENV=development webpack serve --open",
"build:dev": "cross-env NODE_ENV=development webpack",
"build:prod": "cross-env NODE_ENV=production webpack",
Expand All @@ -32,6 +32,7 @@
"@typescript-eslint/parser": "^8.13.0",
"babel-loader": "^9.2.1",
"eslint": "^9.14.0",
"eslint-define-config": "^2.1.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"html-webpack-plugin": "^5.6.3",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 074567b

Please sign in to comment.