Skip to content

Commit

Permalink
Fix workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-Cena committed Dec 2, 2023
1 parent 6e035dc commit 8058f5f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 20 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,25 @@ on:
branches:
- master

env:
# https://github.com/actions/setup-node/issues/899
SKIP_YARN_COREPACK_CHECK: 1

jobs:
deploy:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
cache: yarn

- name: Install dependencies
run: yarn install --immutable
run: |
yarn set version stable
yarn install --immutable
- name: Build website
run: yarn build
working-directory: ./website
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,25 @@ on:
branches:
- master

env:
# https://github.com/actions/setup-node/issues/899
SKIP_YARN_COREPACK_CHECK: 1

jobs:
deploy:
lint:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
node-version: "20"
cache: yarn

- name: Install dependencies
run: yarn install --immutable
run: |
yarn set version stable
yarn install --immutable
- name: Lint
run: |
yarn prettier --list-different .
Expand Down
2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,3 @@ enableGlobalCache: false
nodeLinker: node-modules

npmPublishRegistry: "https://registry.npmjs.org"

yarnPath: .yarn/releases/yarn-4.0.2.cjs
8 changes: 3 additions & 5 deletions packages/create-jc-project/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const { name, description, usingReact } = await prompts(
async validate(value) {
if (
typeof value !== "string" ||
!/^(?:@[a-z-]+\/)?[a-z-]+$/.test(value)
!/^(?:@[a-z-]+\/)?[a-z-]+$/u.test(value)
)
return "Not a valid package name.";
if (await pathExists(value)) return "The directory already exists.";
Expand Down Expand Up @@ -90,10 +90,8 @@ process.chdir(name);

const templateRoot = fileURLToPath(new URL("../template", import.meta.url));
await Promise.all(
(
await rReadDir(templateRoot)
).map(([p, c]) =>
outputFile(path.relative(templateRoot, p).replace(/^_/, "."), c),
(await rReadDir(templateRoot)).map(([p, c]) =>
outputFile(path.relative(templateRoot, p).replace(/^_/u, "."), c),
),
);

Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config/rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ module.exports = {
},
plugins: ["react", "react-hooks"],
rules: {
"react-hooks/exhaustive-deps": "error",

"react-hooks/rules-of-hooks": "error",

"react/boolean-prop-naming": "off",

"react/button-has-type": [
Expand Down Expand Up @@ -148,10 +152,6 @@ module.exports = {
"react/style-prop-object": "error",

"react/void-dom-elements-no-children": "error",

"react-hooks/exhaustive-deps": "error",

"react-hooks/rules-of-hooks": "error",
},
settings: {
react: {
Expand Down

0 comments on commit 8058f5f

Please sign in to comment.