Skip to content

Commit 4703162

Browse files
committed
feat: refactor eslint (#884)
BREAKING-CHANGE: updated eslint from v8 to v9
1 parent 7b269ed commit 4703162

File tree

217 files changed

+13474
-8950
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

217 files changed

+13474
-8950
lines changed

.github/semantic.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/allo-allo.yaml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,3 @@ jobs:
1616
uses: "anolilab/workflows/.github/workflows/allo-allo.yml@main"
1717
with:
1818
target-repo: "anolilab/javascript-style-guide"
19-
issue-welcome: >
20-
It looks like this is your first issue. Welcome! 👋
21-
One of the project maintainers will be with you as soon as possible. We
22-
appreciate your patience. To safeguard the health of the project, please
23-
take a moment to read our [code of conduct](https://github.com/anolilab/javascript-style-guide/blob/main/.github/CODE_OF_CONDUCT.md).
24-
pr-welcome: >
25-
It looks like this is your first pull request. 🎉
26-
Thank you for your contribution! One of the project maintainers will triage
27-
and assign the pull request for review. We appreciate your patience. To
28-
safeguard the health of the project, please take a moment to read our
29-
[code of conduct](https://github.com/anolilab/javascript-style-guide/blob/main/.github/CODE_OF_CONDUCT.md).
30-
pr-merged: >
31-
Congratulations on your first merged pull request! 🎉
32-
Thank you for your contribution!
33-
We appreciate your patience.
34-
We look forward to your next contribution.

.github/workflows/cache-clear.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ on: # yamllint disable-line rule:truthy
77

88
jobs:
99
cleanup-branch-cache:
10-
uses: "anolilab/workflows/.github/workflows/cleanup-branch-cache.yml@main"
10+
uses: "anolilab/workflows/.github/workflows/cleanup-branch-cache.yaml@main"
1111
with:
1212
target-repo: "anolilab/javascript-style-guide"

.github/workflows/comment-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
We do this because:
4848
4949
- There are plenty of frameworks/tools out there and we would like to ensure that every method can cover all or almost all of them.
50-
- Every feature we add to Visulima has "costs" associated to it:
50+
- Every feature we add to "javascript-style-guide" has "costs" associated to it:
5151
- initial costs: design, implementation, reviews, documentation
5252
- running costs: awareness of the feature itself, more complex module structure, increased bundle size, more work during refactors
5353

.github/workflows/test.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
matrix:
6060
os:
6161
- "ubuntu-latest"
62-
node_version: ["18", "20", "21", "22"]
62+
node_version: ["22", "23", "24"]
6363
# On the other platforms, we only test the lts node version
6464
include:
6565
- os: "macos-latest"
@@ -87,27 +87,42 @@ jobs:
8787
# Pulls all commits (needed for NX)
8888
fetch-depth: 0
8989

90+
- name: "Derive appropriate SHAs for base and head for `nx affected` commands"
91+
id: "setSHAs"
92+
uses: "nrwl/nx-set-shas@76907e7e5d3cd17ddb5e2b123389f054bffcdd03" # v4
93+
9094
- name: "Setup resources and environment"
9195
id: "setup"
9296
uses: "anolilab/workflows/step/setup@main"
9397
with:
9498
node-version: "${{ matrix.node_version }}"
9599
install-bun: false
96100

97-
- name: "Build"
98-
run: "pnpm run build:packages"
99-
100-
- name: "Run test for browserslist-config-anolilab"
101-
run: "pnpm run test:coverage:browserslist-config-anolilab"
101+
# Temporary solution until Nx solve this https://github.com/nrwl/nx/issues/22259
102+
- name: "Get changed files"
103+
id: "files"
104+
uses: "tj-actions/changed-files@c65cd883420fd2eb864698a825fc4162dd94482c" # v44.5.7
105+
with:
106+
files_ignore_from_source_file: ".github/ignore-files-for-nx-affected.yml"
107+
base_sha: "${{ steps.setSHAs.outputs.base }}"
108+
separator: ","
102109

103-
- name: "Run test for stylelint-config"
104-
run: "pnpm run test:coverage:stylelint-config"
110+
- name: "Build"
111+
shell: "bash"
112+
run: |
113+
files="${{ steps.files.outputs.all_changed_files }}";
114+
pnpm run build:affected:packages --files=${files//\\/\/}
105115
106-
- name: "Run stylelint config test"
107-
run: "pnpm run test:stylelint"
116+
- name: "Run tests"
117+
shell: "bash"
118+
run: |
119+
files="${{ steps.files.outputs.all_changed_files }}";
108120
109-
- name: "Run babel config test"
110-
run: "pnpm run test:babel"
121+
if [[ ${{ matrix.os }} == "ubuntu-latest" && ${{ matrix.node_version }} == 22 ]]; then
122+
pnpm run test:affected:coverage --files=${files//\\/\/}
123+
else
124+
pnpm run test:affected --files=${files//\\/\/}
125+
fi
111126
112127
- name: "Prepare nx cache"
113128
shell: "bash"

.husky/post-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/sh
22

3-
. "$(dirname "$0")/_/husky.sh"
43
. "$(dirname "$0")/common.sh"
54

65
# The hook should exit with non-zero status after issuing

.husky/pre-commit

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/sh
22

3-
. "$(dirname "$0")/_/husky.sh"
43
. "$(dirname "$0")/common.sh"
54

65
# The hook should exit with non-zero status after issuing

.husky/prepare-commit-msg

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/sh
22

3-
. "$(dirname "$0")/_/husky.sh"
43
. "$(dirname "$0")/common.sh"
54

65
echo --------------------------------------------

packages/eslint-config/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/typegen.d.ts
2+
src/utils/vitest-globals.ts
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.gitkeep
2+
.env*
3+
*.ico
4+
*.lock
5+
dist
6+
CHANGELOG.md
7+
coverage
8+
node_modules
9+
.eslintcache
10+
__fixtures__

packages/eslint-config/.prettierrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// eslint-disable-next-line import/no-extraneous-dependencies
2+
import config from "@anolilab/prettier-config";
3+
4+
export default {
5+
...config,
6+
};

0 commit comments

Comments
 (0)