Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint js 文件并启用缓存 --cache #7330

Merged
merged 2 commits into from Feb 11, 2023

Conversation

kecrily
Copy link
Contributor

@kecrily kecrily commented Feb 10, 2023

No description provided.

@Soltus
Copy link
Contributor

Soltus commented Feb 10, 2023

格式化整个文件,能描述一下修改的重点部分吗

@kecrily
Copy link
Contributor Author

kecrily commented Feb 10, 2023

格式化整个文件,能描述一下修改的重点部分吗

Changed the scope of .eslintignore only, which previously did not check for all .js files, and now narrowed the scope to not check for .js files from external and auto-generated sources. Then execute eslint . --fix

I split them into two commits, the second commit is the execution of eslint . --fix.

@Soltus
Copy link
Contributor

Soltus commented Feb 10, 2023

OK, thanks

@88250 88250 changed the title chore: lint js file and use cache to speed up eslint js 文件并启用缓存 --cache Feb 11, 2023
@88250 88250 added this to the 2.7.5 milestone Feb 11, 2023
@88250 88250 added the Refactor label Feb 11, 2023
@Vanessa219
Copy link
Member

env: { node: true, browser: true, es6: true }, 这个加了具体有什么变化?

stage 下面都为编译或第三方代码,不需要 lint;可以再加一下 electron 目录。

@kecrily
Copy link
Contributor Author

kecrily commented Feb 11, 2023

env: { node: true, browser: true, es6: true }, 这个加了具体有什么变化?

默认情况下,全局变量不包括 node 中的内置变量,像是 modulerequire__direname 等,这就会导致 ESLint 的 no-undef 规则报未定义错误。browser 和 es6 也是类似的作用,目前没有实际用到,作为预防性一起加入。

stage 下面都为编译或第三方代码,不需要 lint;可以再加一下 electron 目录。

是的,stage/ 我已经忽略了。electron/ 原先的 .eslintignore 中就有了

@Vanessa219 Vanessa219 merged commit ab15c09 into siyuan-note:master Feb 11, 2023
88250 added a commit that referenced this pull request Feb 11, 2023
Vanessa219 added a commit that referenced this pull request Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants