Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrated yalc to the project to link in-dev lib to examples #118

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
.github
.next
.yalc
build
bundles
coverage
dist
examples
lib
node_modules
out
Expand Down
68 changes: 68 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"env": {
"browser": true,
"es2022": true,
"jest": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"prettier",
"plugin:react-hooks/recommended",
"plugin:jest/recommended",
"plugin:jest-dom/recommended"
],
"parser": "@babel/eslint-parser",
"plugins": ["@babel", "jest", "react", "react-hooks", "testing-library"],
"settings": {
"react": {
"version": "detect"
}
},
"overrides": [
{
"files": ["**/*.mjs"],
"parserOptions": {
"babelOptions": {
"parserOpts": {
"plugins": ["importAssertions"]
}
}
}
},
{
"files": [
"**/__tests__/**/*.[jt]s?(x)",
"**/?(*.)+(spec|test).[jt]s?(x)"
],
"extends": ["plugin:testing-library/react"]
},
{
"files": ["**/*.ts?(x)"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"tsconfigRootDir": ".",
"project": ["./tsconfig.json"]
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"rules": {
"@typescript-eslint/no-unused-vars": [
"error",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/unbound-method": "off",
"jest/unbound-method": "error",
"react/react-in-jsx-scope": "off"
}
}
]
}
53 changes: 0 additions & 53 deletions .eslintrc.yaml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
${{ runner.os }}-

- name: Install
run: node scripts/install-all.js ci
run: npm run install:all -- ci

- name: Lint
uses: wearerequired/lint-action@v2
Expand All @@ -56,7 +56,10 @@ jobs:
prettier: true
eslint: true
eslint_args: '--max-warnings 0'
eslint_extensions: js,jsx,ts,tsx
eslint_extensions: js,jsx,mjs,cjs,ts,tsx

- name: Lint examples
run: npm run lint:examples

- name: Build
run: npm run build:all
Expand All @@ -77,4 +80,4 @@ jobs:
node-version: 20

- name: Install
run: node scripts/install-all.js
run: npm run install:all
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ yarn-error.log*
# Dependency directories
node_modules/
jspm_packages/
.yalc/
yalc.lock

# Optional npm cache directory
.npm
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.github
.next
.yalc
build
bundles
coverage
Expand Down
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/**
* @type {import('@babel/core').TransformOptions}
*/
module.exports = {
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
Expand Down
11 changes: 11 additions & 0 deletions examples/nextjs/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.github
.next
.yalc
build
bundles
coverage
dist
lib
node_modules
out
public
7 changes: 7 additions & 0 deletions examples/nextjs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"root": true,
"extends": ["next/core-web-vitals"],
"rules": {
"react/react-in-jsx-scope": "off"
}
}
4 changes: 4 additions & 0 deletions examples/nextjs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
# production
/build

# development
/.yalc
yalc.lock

# misc
.DS_Store
*.pem
Expand Down
6 changes: 0 additions & 6 deletions examples/nextjs/eslint.config.js

This file was deleted.

4 changes: 3 additions & 1 deletion examples/nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/** @type {import('next').NextConfig} */
/**
* @type {import('next').NextConfig}
*/
const nextConfig = {
reactStrictMode: true,
};
Expand Down
Loading
Loading