Skip to content

Commit 515484e

Browse files
committed
refactor: 🎨 完全迁移至 oxc,移除 eslint 和 prettier
1 parent 78cd693 commit 515484e

197 files changed

Lines changed: 2544 additions & 3860 deletions

File tree

Some content is hidden

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

.oxlintrc.json

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

.prettierignore

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

.prettierrc.json

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

.storybook/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { StorybookConfig } from 'storybook-solidjs-vite';
1+
import { type StorybookConfig } from 'storybook-solidjs-vite';
22

33
const config: StorybookConfig = {
44
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],

.storybook/preview.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
import type { Preview } from 'storybook-solidjs-vite';
2-
1+
import { type Preview } from 'storybook-solidjs-vite';
32
import { INITIAL_VIEWPORTS } from 'storybook/viewport';
43

54
import './global.css';

.storybook/test-runner.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
import type { TestRunnerConfig } from '@storybook/test-runner';
2-
1+
// oxlint-disable typescript/no-unsafe-argument
32
import percySnapshot from '@percy/playwright';
4-
import { waitForPageReady } from '@storybook/test-runner';
3+
import {
4+
type TestRunnerConfig,
5+
waitForPageReady,
6+
} from '@storybook/test-runner';
57

8+
// oxlint-disable-next-line promise/avoid-new no-promise-executor-return typescript/strict-void-return
69
const sleep = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
710

811
const config: TestRunnerConfig = {

.stylelintrc.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module.exports = {
1+
export default {
22
ignoreFiles: [
33
'**/node_modules/**',
44
'**/dist/**',
@@ -8,7 +8,6 @@ module.exports = {
88
],
99
extends: [
1010
'stylelint-config-standard',
11-
'stylelint-prettier/recommended',
1211
'stylelint-config-clean-order',
1312
],
1413
plugins: ['stylelint-order', 'stylelint-high-performance-animation'],

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["lokalise.i18n-ally"]
2+
"recommendations": ["lokalise.i18n-ally", "oxc.oxc-vscode"]
33
}

.vscode/settings.json

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,21 @@
44
"typescript.tsdk": "node_modules\\typescript\\lib",
55
"css.validate": false,
66

7-
"[typescript]": {
8-
"editor.codeActionsOnSave": {
9-
"source.fixAll.oxc": "explicit",
10-
"source.fixAll.eslint": "explicit"
11-
}
12-
},
137
"[typescriptreact]": {
14-
"editor.codeActionsOnSave": {
15-
"source.fixAll.oxc": "explicit",
16-
"source.fixAll.eslint": "explicit"
17-
}
8+
"editor.formatOnSave": true,
9+
"editor.defaultFormatter": "oxc.oxc-vscode"
10+
},
11+
"[typescript]": {
12+
"editor.formatOnSave": true,
13+
"editor.defaultFormatter": "oxc.oxc-vscode"
1814
},
1915
"[css]": {
2016
"editor.codeActionsOnSave": { "source.fixAll.stylelint": "explicit" }
2117
},
2218

23-
"eslint.rules.customizations": [
24-
{ "rule": "style/*", "fixable": true, "severity": "warn" },
25-
{ "rule": "perfectionist/*", "fixable": true, "severity": "warn" },
26-
{ "rule": "import/*", "fixable": true, "severity": "warn" }
27-
],
19+
"oxc.enable": true,
20+
"oxc.enable.oxlint": true,
21+
"oxc.enable.oxfmt": true,
2822

2923
"i18n-ally.localesPaths": ["locales"],
3024
// "i18n-ally.localesPaths": ["locales", "src/userscript/ehTagRules"],

0 commit comments

Comments
 (0)