Skip to content

Commit 7509b9a

Browse files
committed
Switch from ESLint to Oxfmt and Oxlint
1 parent c0c4525 commit 7509b9a

45 files changed

Lines changed: 2252 additions & 4255 deletions

Some content is hidden

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

.editorconfig

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
# editorconfig.org
2-
1+
; top-most EditorConfig file
32
root = true
43

4+
; Unix-style newlines
55
[*]
66
charset = utf-8
7-
end_of_line = lf
8-
indent_size = 2
9-
indent_style = space
7+
end_of_line = LF
108
insert_final_newline = true
119
trim_trailing_whitespace = true
10+
11+
[*.{php,html,twig}]
12+
indent_style = space
13+
indent_size = 4
14+
15+
[*.md]
16+
max_line_length = 80
17+
18+
[COMMIT_EDITMSG]
19+
max_line_length = 0

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
/.editorconfig export-ignore
55
/.npmrc export-ignore
66
/.nvmrc export-ignore
7+
/.oxfmtrc.json export-ignore
8+
/.oxlintrc.json export-ignore
79
/.php-cs-fixer.dist.php export-ignore
810
/.symfony.bundle.yaml export-ignore
911
/AGENTS.md export-ignore
1012
/CLAUDE.md export-ignore
1113
/assets export-ignore
1214
/docs export-ignore
13-
/eslint.config.js export-ignore
1415
/package.json export-ignore
1516
/phpstan.dist.neon export-ignore
1617
/phpunit.xml.dist export-ignore

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ updates:
2424
schedule:
2525
interval: 'weekly'
2626
allow:
27-
- dependency-name: '@antfu/eslint-config'
28-
- dependency-name: 'eslint'
27+
- dependency-name: 'oxlint'
28+
- dependency-name: 'oxfmt'
2929
- dependency-name: '@rspack/core'
3030
- dependency-name: '@types/node'
3131
- dependency-name: 'jsdom'

.github/workflows/ci.yml

Lines changed: 125 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,140 @@
11
name: CI
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
push:
5+
branches:
6+
- main
77

8-
pull_request:
9-
branches:
10-
- main
8+
pull_request:
9+
branches:
10+
- main
1111

1212
# Cancel any in-progress run for the same ref (branch/PR) when a new commit is pushed.
1313
concurrency:
14-
group: ${{ github.workflow }}-${{ github.ref }}
15-
cancel-in-progress: true
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
1616

1717
permissions: {}
1818

1919
jobs:
20-
lint:
21-
runs-on: ubuntu-latest
22-
permissions:
23-
contents: read
24-
steps:
25-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26-
with:
27-
persist-credentials: false
28-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
29-
- name: Set node
30-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
31-
with:
32-
node-version-file: .nvmrc
33-
cache: pnpm
34-
cache-dependency-path: pnpm-lock.yaml
35-
- name: Install
36-
run: pnpm install --frozen-lockfile
37-
- name: Lint
38-
run: pnpm run lint
20+
lint:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
steps:
25+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26+
with:
27+
persist-credentials: false
28+
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
29+
- name: Set node
30+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
31+
with:
32+
node-version-file: .nvmrc
33+
cache: pnpm
34+
cache-dependency-path: pnpm-lock.yaml
35+
- name: Install
36+
run: pnpm install --frozen-lockfile
37+
- name: Lint
38+
run: pnpm run lint
39+
- name: Format check
40+
run: pnpm run fmt:check
3941

40-
test:
41-
runs-on: ${{ matrix.os }}
42-
permissions:
43-
contents: read
44-
strategy:
45-
fail-fast: false
46-
matrix:
47-
os: [ubuntu-latest, windows-latest, macos-latest]
48-
steps:
49-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
50-
with:
51-
persist-credentials: false
52-
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
53-
- name: Set node
54-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
55-
with:
56-
node-version-file: .nvmrc
57-
cache: pnpm
58-
cache-dependency-path: pnpm-lock.yaml
59-
- name: Install
60-
run: pnpm install --frozen-lockfile
61-
- name: Build
62-
run: pnpm build
63-
- name: Test
64-
run: pnpm test
42+
test:
43+
runs-on: ${{ matrix.os }}
44+
permissions:
45+
contents: read
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
os: [ubuntu-latest, windows-latest, macos-latest]
50+
steps:
51+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
52+
with:
53+
persist-credentials: false
54+
- uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
55+
- name: Set node
56+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
57+
with:
58+
node-version-file: .nvmrc
59+
cache: pnpm
60+
cache-dependency-path: pnpm-lock.yaml
61+
- name: Install
62+
run: pnpm install --frozen-lockfile
63+
- name: Build
64+
run: pnpm build
65+
- name: Test
66+
run: pnpm test
6567

66-
php:
67-
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
68-
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
69-
permissions:
70-
contents: read
71-
strategy:
72-
fail-fast: false
73-
matrix:
74-
include:
75-
# Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
76-
- php-version: '8.4'
77-
symfony-version: 7.4.*
78-
dependency-version: lowest
79-
- php-version: '8.4'
80-
symfony-version: 8.0.*
81-
- php-version: '8.5'
82-
symfony-version: 7.4.*
83-
- php-version: '8.5'
84-
symfony-version: 8.0.*
68+
php:
69+
name: PHP ${{ matrix.php-version }} + Symfony ${{ matrix.symfony-version }}${{ matrix.dependency-version == 'lowest' && ' lowest' || '' }} on ${{ matrix.os || 'ubuntu-latest' }}
70+
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
71+
permissions:
72+
contents: read
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
include:
77+
# Symfony 7.4 LTS on the lowest supported PHP, resolving the lowest allowed dependencies.
78+
- php-version: '8.4'
79+
symfony-version: 7.4.*
80+
dependency-version: lowest
81+
- php-version: '8.4'
82+
symfony-version: 8.0.*
83+
- php-version: '8.5'
84+
symfony-version: 7.4.*
85+
- php-version: '8.5'
86+
symfony-version: 8.0.*
8587

86-
# Windows
87-
- php-version: '8.4'
88-
symfony-version: 7.4.*
89-
os: windows-latest
90-
- php-version: '8.5'
91-
symfony-version: 8.1.*
92-
os: windows-latest
93-
env:
94-
# symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
95-
# symfony/* package to this version during the Composer resolution.
96-
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
97-
steps:
98-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
99-
with:
100-
persist-credentials: false
101-
- name: Setup PHP
102-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
103-
with:
104-
php-version: ${{ matrix.php-version }}
105-
tools: flex
106-
- name: Install dependencies
107-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
108-
with:
109-
dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
110-
composer-options: --prefer-dist
111-
custom-cache-suffix: ${{ matrix.symfony-version }}
112-
- name: PHPUnit
113-
run: vendor/bin/phpunit
88+
# Windows
89+
- php-version: '8.4'
90+
symfony-version: 7.4.*
91+
os: windows-latest
92+
- php-version: '8.5'
93+
symfony-version: 8.1.*
94+
os: windows-latest
95+
env:
96+
# symfony/flex (installed as a global tool below) reads SYMFONY_REQUIRE and forces every
97+
# symfony/* package to this version during the Composer resolution.
98+
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
99+
steps:
100+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
101+
with:
102+
persist-credentials: false
103+
- name: Setup PHP
104+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
105+
with:
106+
php-version: ${{ matrix.php-version }}
107+
tools: flex
108+
- name: Install dependencies
109+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
110+
with:
111+
dependency-versions: ${{ matrix.dependency-version == 'lowest' && 'lowest' || 'highest' }}
112+
composer-options: --prefer-dist
113+
custom-cache-suffix: ${{ matrix.symfony-version }}
114+
- name: PHPUnit
115+
run: vendor/bin/phpunit
114116

115-
php-qa:
116-
runs-on: ubuntu-latest
117-
permissions:
118-
contents: read
119-
steps:
120-
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
121-
with:
122-
persist-credentials: false
123-
- name: Setup PHP
124-
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
125-
with:
126-
php-version: '8.4'
127-
tools: composer:v2
128-
- name: Validate composer.json
129-
run: composer validate --strict
130-
- name: Install dependencies
131-
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
132-
with:
133-
dependency-versions: highest
134-
composer-options: --prefer-dist
135-
- name: PHPStan
136-
run: vendor/bin/phpstan analyse
137-
- name: PHP-CS-Fixer
138-
run: vendor/bin/php-cs-fixer fix --dry-run --diff
117+
php-qa:
118+
runs-on: ubuntu-latest
119+
permissions:
120+
contents: read
121+
steps:
122+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
123+
with:
124+
persist-credentials: false
125+
- name: Setup PHP
126+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
127+
with:
128+
php-version: '8.4'
129+
tools: composer:v2
130+
- name: Validate composer.json
131+
run: composer validate --strict
132+
- name: Install dependencies
133+
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
134+
with:
135+
dependency-versions: highest
136+
composer-options: --prefer-dist
137+
- name: PHPStan
138+
run: vendor/bin/phpstan analyse
139+
- name: PHP-CS-Fixer
140+
run: vendor/bin/php-cs-fixer fix --dry-run --diff

.github/workflows/fabbot.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
name: Fabbot
22

33
on:
4-
pull_request:
4+
pull_request:
55

66
permissions: {}
77

88
jobs:
9-
call-fabbot:
10-
name: Fabbot
11-
permissions:
12-
contents: read
13-
uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@ad55ed5ac95aaa9794c60473178a007b342a73b4 # main
14-
with:
15-
package: Reprise
16-
check_license: true
9+
call-fabbot:
10+
name: Fabbot
11+
permissions:
12+
contents: read
13+
uses: symfony-tools/fabbot/.github/workflows/fabbot.yml@ad55ed5ac95aaa9794c60473178a007b342a73b4 # main
14+
with:
15+
package: Reprise
16+
check_license: true

.oxfmtrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"ignorePatterns": [
4+
"**/composer.json",
5+
"**/vendor",
6+
"**/package.json",
7+
"**/node_modules",
8+
".agents/skills",
9+
".github/PULL_REQUEST_TEMPLATE.md",
10+
"playground/**",
11+
"assets/dist/**",
12+
"assets/test/fixtures/**",
13+
"docs/**"
14+
],
15+
"printWidth": 120,
16+
"tabWidth": 4,
17+
"trailingComma": "es5",
18+
"bracketSameLine": true,
19+
"singleQuote": true
20+
}

.oxlintrc.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"$schema": "./node_modules/oxlint/configuration_schema.json",
3+
"plugins": ["eslint", "typescript", "unicorn", "node"],
4+
"categories": {},
5+
"rules": {},
6+
"env": {
7+
"builtin": true
8+
},
9+
"globals": {},
10+
"ignorePatterns": [
11+
"**/composer.json",
12+
"**/vendor",
13+
"**/package.json",
14+
"**/node_modules",
15+
".agents/skills",
16+
".github/PULL_REQUEST_TEMPLATE.md",
17+
"playground/**",
18+
"assets/test/fixtures/**",
19+
"docs/**"
20+
]
21+
}

0 commit comments

Comments
 (0)