-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1b718fe
commit 8d2a053
Showing
5 changed files
with
90 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Purpose: This file configures ESLint, a static code analysis tool for identifying problematic patterns in JavaScript and TypeScript code. | ||
|
||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:react/recommended", | ||
"plugin:react-hooks/recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"prettier" | ||
], | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"jsx": true | ||
}, | ||
"ecmaVersion": 12, | ||
"sourceType": "module" | ||
}, | ||
"plugins": [ | ||
"react", | ||
"react-hooks", | ||
"@typescript-eslint" | ||
], | ||
"rules": { | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/no-unused-vars": ["error"] | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Purpose: This file specifies which files and directories should be ignored by Git version control. | ||
|
||
node_modules/ | ||
dist/ | ||
coverage/ | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"version": "1.0.0", | ||
"description": "A sample project for CI testing", | ||
"main": "index.js", | ||
"scripts": { | ||
"lint": "eslint .", | ||
"test": "vitest run", | ||
"build": "echo 'Build successful'" | ||
}, | ||
"author": "Your Name", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"eslint": "^8.50.0", | ||
"eslint-plugin-react": "^7.32.0", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"vitest": "^0.32.0" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Purpose: This file configures Vitest, a modern testing framework for JavaScript and TypeScript applications. | ||
|
||
import { defineConfig } from 'vitest/config'; | ||
|
||
export default defineConfig({ | ||
test: { | ||
globals: true, | ||
environment: 'jsdom', | ||
coverage: { | ||
reporter: ['text', 'json', 'html'], | ||
include: ['src/**/*.ts', 'src/**/*.tsx'], | ||
exclude: ['**/*.spec.ts', '**/*.test.ts'], | ||
}, | ||
}, | ||
}); |