-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #240 from WatchItDev/migrate/webpack/to/vite
refactor: migrate from webpack to vitejs bundler
- Loading branch information
Showing
470 changed files
with
19,921 additions
and
38,385 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,27 @@ | ||
# Include env file | ||
ifneq (,$(wildcard ./.env)) | ||
include .env | ||
export | ||
endif | ||
|
||
.DEFAULT_GOAL := all | ||
MAKEFLAGS += --no-print-directory | ||
|
||
# When --ci option is provided, Jest will assume it is running in a CI environment. | ||
# This changes the behavior when a new snapshot is encountered. Instead of the regular behavior of storing a new snapshot automatically, | ||
# it will fail the test and require Jest to be run with --updateSnapshot. | ||
.PHONY: test ## run tests | ||
test: | ||
npx jest --ci --verbose --coverage=false --passWithNoTests | ||
|
||
.PHONY: testcov ## run test coverage | ||
testcov: | ||
npx jest --ci --coverage --passWithNoTests | tee ./coverage.txt | ||
|
||
.PHONY: install ## install dependencies | ||
install: | ||
npm ci | ||
|
||
.PHONY: lint ## lint standard js | ||
lint: | ||
npx eslint "src/**/*.{js,jsx,ts,tsx}" |
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,28 @@ | ||
import js from '@eslint/js' | ||
import globals from 'globals' | ||
import reactHooks from 'eslint-plugin-react-hooks' | ||
import reactRefresh from 'eslint-plugin-react-refresh' | ||
import tseslint from 'typescript-eslint' | ||
|
||
export default tseslint.config( | ||
{ ignores: ['dist'] }, | ||
{ | ||
extends: [js.configs.recommended, ...tseslint.configs.recommended], | ||
files: ['**/*.{ts,tsx}'], | ||
languageOptions: { | ||
ecmaVersion: 2020, | ||
globals: globals.browser, | ||
}, | ||
plugins: { | ||
'react-hooks': reactHooks, | ||
'react-refresh': reactRefresh, | ||
}, | ||
rules: { | ||
...reactHooks.configs.recommended.rules, | ||
'react-refresh/only-export-components': [ | ||
'warn', | ||
{ allowConstantExport: true }, | ||
], | ||
}, | ||
}, | ||
) |
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
Oops, something went wrong.