Skip to content

Commit 5e68ede

Browse files
committed
style: 🚨 消除 eslint 弃用 .eslintignore 的警告
1 parent 7bc48d1 commit 5e68ede

8 files changed

Lines changed: 32 additions & 30 deletions

File tree

.eslintignore

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

.oxlintrc.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
"worker": true,
2222
"es2024": true
2323
},
24-
// 有 bug,只能使用 .eslintignore 来禁用,暂时注释
25-
// "ignorePatterns": [
26-
// "**/dist/**",
27-
// "**/public/**",
28-
// "**/dev-dist/**",
29-
// "*.user.js"
30-
// ],
24+
"ignorePatterns": [
25+
"**/dist/**",
26+
"**/public/**",
27+
"**/dev-dist/**",
28+
"**/assets/**",
29+
"**/**.js"
30+
],
3131
"rules": {
3232
// 目前不支持跳过 return new Promise 的,只能暂时关掉
3333
"require-await": "off",

.postcssrc.cjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module.exports = {
22
plugins: {
3-
'postcss-import': {} || null,
4-
'postcss-nesting': {} || null,
5-
autoprefixer: {} || null,
6-
cssnano: {} || null,
3+
'postcss-import': {},
4+
'postcss-nesting': {},
5+
autoprefixer: {},
6+
cssnano: {},
77
},
88
};

.stylelintrc.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
module.exports = {
2-
ignoreFiles: ['**/node_modules/**/*.css', '**/dist/**/*.css'],
2+
ignoreFiles: [
3+
'**/node_modules/**',
4+
'**/dist/**',
5+
'**/public/**',
6+
'**/dev-dist/**',
7+
'**/assets/**',
8+
],
39
extends: [
410
'stylelint-config-standard',
511
'stylelint-prettier/recommended',

eslint.config.mjs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ export default antfu(
2424
imports: false,
2525
unicorn: false,
2626

27-
ignores: ['**/dist/**', '**/public/**', '**/dev-dist/**', '*.user.js'],
27+
ignores: [
28+
'**/dist/**',
29+
'**/public/**',
30+
'**/dev-dist/**',
31+
'**/assets/**',
32+
'**/**.js',
33+
],
2834
},
2935
{
3036
rules: {

src/userscript/main/version.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,11 @@ export const handleVersionUpdate = async () => {
2121
<>
2222
<h2>🥳 ComicRead 已更新到 v{GM.info.script.version}</h2>
2323
inject@LatestChange
24-
<Show when={versionLt(version, '10.8.0')}>
25-
<h3>改动</h3>
24+
<Show when={versionLt(version, '12')}>
25+
<h3>新增</h3>
2626
<ul>
27-
<li>
28-
ehentai 悬浮标签列表的透明度调节
29-
<br />
30-
由「鼠标滚轮」改为「Shift + 鼠标滚轮」
31-
</li>
27+
<li>实现图片放大功能(需要打开「图像识别」功能)</li>
28+
<li>增加 ehentai 在缩略图列表页里展开标签列表功能</li>
3229
</ul>
3330
</Show>
3431
</>

src/worker/ImageUpscale/model.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { wait } from 'helper';
88
import { base64ToArrayBuffer, mainFn } from './workHelper';
99

1010
// 引用一下,避免被 rullup treeshake 掉
11-
console.log(webgpu_util); // oxlint-disable-line no-console
11+
console.debug(webgpu_util); // oxlint-disable-line no-console
1212

1313
let model: GraphModel | undefined;
1414

test/site.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,9 @@ const getSiteTestInfo = () => {
9696
/(\n\s+\/\/ #.+?)(case.+?break;\n {4}\})/gs,
9797
)) {
9898
const codeRes = code.match(
99-
/inject\('site\/(\w+)'\)| options = \{.+?name: '(\w+)'/s,
99+
/inject\('site\/(\w+)'\)| options = \{.+?name: '(.+?)'/s,
100100
);
101-
if (!codeRes) {
102-
throw new Error('index.ts 注释解析出错');
103-
}
101+
if (!codeRes) throw new Error('index.ts 注释解析出错');
104102
const name = codeRes[1] || codeRes[2];
105103

106104
const commentRes = [...comment.matchAll(/\/\/ test: (.+)(?=\n)/g)];

0 commit comments

Comments
 (0)