.eslintrc.js关闭文件名校验
时间: 2023-11-23 19:07:10
浏览: 122
可以通过在.eslintrc.js文件中添加以下配置来[关闭](https://geek.csdn.net/educolumn/495a3ac09a9c3cd4927007c45e6e3a1c?spm=1055.2569.3001.10083)文件名校验:
[module](https://geek.csdn.net/educolumn/34e60ffe14901ff5e838415c8746f124?spm=1055.2569.3001.10083).exports = {
// ...
rules: {
'unicorn/filename-case': 'off'
这里使用了eslint-plu[gin](https://geek.csdn.net/educolumn/1aef582107c22aa4d9f243890549bf39?spm=1055.2569.3001.10083)-unicorn[插件](https://geek.csdn.net/educolumn/245b0d2e7d461013e49fcfb80f940dbd?spm=1055.2569.3001.10083)提供的`filename-case`[规则](https://geek.csdn.net/educolumn/35d569c666d5ed591a11482795ce7418?spm=1055.2569.3001.10083),将其关闭即可。
相关问题
pdf.js 文件属性中的文件名乱码
这可能是由于文件名编码不正确所导致的。你可以尝试以下步骤来解决这个问题:
1. 尝试将文件名更改为英文或数字,以避免使用非 ASCII 字符。
2. 将文件名编码更改为 UTF-8 或其他本地编码,以匹配你的系统设置。
3. 在打开 PDF 文件之前,在 Acrobat 或其他 PDF 阅读器中将文件名编码更改为正确的编码。
4. 如果你使用的是 Web 浏览器,可以尝试在浏览器设置中更改字符编码,以确保浏览器正确地解释文件名。
希望这些方法能够帮助你解决问题。
window.location.href下载 自定义文件名
作为AI语言模型,我无法直接下载文件或更改文件名,但我可以为您提供一些相关的JavaScript代码,以帮助您实现此目标。以下是一个示例:
```javascript
function downloadFile(url, filename) {
var a = document.createElement('a');
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
```
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)