Skip to content

Commit

Permalink
fix(ui): Vitest globals 옵션 사용 시 lint error가 발생하는 문제를 해결합니다. (#160)
Browse files Browse the repository at this point in the history
* fix(ui): vitest globals 옵션 사용 시 lint error 해결

* add changeset

---------

Co-authored-by: HyeongKyeom Kim <[email protected]>
  • Loading branch information
jungwoo3490 and Brokyeom authored Oct 6, 2024
1 parent 6ba0c95 commit 9956291
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 140 deletions.
5 changes: 5 additions & 0 deletions .changeset/many-houses-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sopt-makers/ui': patch
---

vitest globals 옵션 활성화로 인한 import문 제거
3 changes: 1 addition & 2 deletions packages/eslint-config-custom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"private": true,
"devDependencies": {
"@vercel/style-guide": "^5.0.0",
"eslint-config-turbo": "^1.10.12",
"eslint-plugin-vitest": "^0.5.4"
"eslint-config-turbo": "^1.10.12"
}
}
7 changes: 1 addition & 6 deletions packages/ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
const vitest = require('eslint-plugin-vitest');

module.exports = {
extends: ['custom/react-internal'],
plugins: ['vitest'],
rules: {
...vitest.configs.recommended.rules,
},
ignorePatterns: ['**/*.test.tsx'],
};
1 change: 0 additions & 1 deletion packages/ui/Button/test/Button.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen, fireEvent } from '@testing-library/react';
import { it, expect, vi } from 'vitest';
import Button from '../Button';

it('Button 컴포넌트가 정상적으로 렌더링됩니다.', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/ui/Control/test/Checkbox.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, expect, it, vi } from 'vitest';
import type { CheckBoxProps } from 'Control/CheckBox';
import { CheckBox } from '../index';

Expand Down
1 change: 0 additions & 1 deletion packages/ui/Control/test/Radio.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { RadioProps } from 'Control/Radio';
import { describe, expect, it, vi } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import { Radio } from '../index';

Expand Down
1 change: 0 additions & 1 deletion packages/ui/Control/test/Toggle.test.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { describe, expect, it, vi, beforeEach } from 'vitest';
import { render, screen, fireEvent } from '@testing-library/react';
import type { ToggleProps } from 'Control/Toggle';
import { Toggle } from '../index';
Expand Down
1 change: 0 additions & 1 deletion packages/ui/Tab/test/Tab.test.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { render, screen, fireEvent } from '@testing-library/react';
import { describe, it, expect, vi } from 'vitest';
import Tab from '../Tab';

describe('Tab 컴포넌트는', () => {
Expand Down
Loading

0 comments on commit 9956291

Please sign in to comment.