Skip to content

Commit

Permalink
Module-first setup
Browse files Browse the repository at this point in the history
  • Loading branch information
dai-shi committed May 22, 2024
1 parent b0fb286 commit f7b5050
Show file tree
Hide file tree
Showing 30 changed files with 2,698 additions and 7,898 deletions.
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"buildCommand": "compile",
"sandboxes": ["new", "react-typescript-react-ts"],
"node": "14"
"node": "18"
}
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

39 changes: 39 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* eslint-env node */
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'prettier',
],
ignorePatterns: ['dist/'],
settings: {
'import/resolver': {
typescript: true,
},
react: { version: 'detect' },
},
rules: {
'import/no-unresolved': ['error', { ignore: ['jotai-redux'] }],
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
};
128 changes: 0 additions & 128 deletions .eslintrc.json

This file was deleted.

14 changes: 10 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: DerYeger/pnpm-setup-action@master
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.2.0
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: npm test
- run: npm run compile
- run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc
npm publish
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: DerYeger/pnpm-setup-action@master
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.2.0
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- run: pnpm install --frozen-lockfile
- run: npm test
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/pnpm-lock.yaml
/dist
8 changes: 0 additions & 8 deletions .prettierrc

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
## [Unreleased]

## [0.2.1] - 2023-03-25

### Changed

- Return action from dispatch function #2

## [0.2.0] - 2023-01-31

### Added

- Migrate to Jotai v2 API #1

## [0.1.0] - 2022-11-15

### Added

- Initial release
55 changes: 0 additions & 55 deletions __tests__/atomWithStore.test.tsx

This file was deleted.

9 changes: 9 additions & 0 deletions examples/01_typescript/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<html>
<head>
<title>example</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
33 changes: 13 additions & 20 deletions examples/01_typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
{
"name": "jotai-redux-example",
"version": "0.1.0",
"name": "example",
"version": "0.0.0",
"private": true,
"type": "module",
"dependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"jotai": "latest",
"immer": "latest",
"jotai-redux": "latest",
"react": "latest",
"react-dom": "latest",
"react-scripts": "latest",
"redux": "latest",
"typescript": "latest"
"react-dom": "latest"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
"devDependencies": {
"@types/react": "latest",
"@types/react-dom": "latest",
"typescript": "latest",
"vite": "latest"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
"scripts": {
"dev": "vite"
}
}
8 changes: 0 additions & 8 deletions examples/01_typescript/public/index.html

This file was deleted.

Loading

0 comments on commit f7b5050

Please sign in to comment.