Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8919229

Browse files
committed
Remove eslintrc
1 parent c4cff00 commit 8919229

File tree

7 files changed

+2331
-52
lines changed

7 files changed

+2331
-52
lines changed

.editorconfig

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# Matches multiple files with brace expansion notation
12+
# Set default charset
13+
[*]
14+
charset = utf-8
15+
16+
# 4 space indentation
17+
# [*]
18+
# indent_style = space
19+
# indent_size = 4

.eslintrc.js

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

.lintmdrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"excludeFiles": [],
3+
"rules": {
4+
"no-trailing-punctuation": 0
5+
}
6+
}

.vscode/launch.json

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

basics/declaration-files.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ declare var jQuery: (selector: string) => any;
5151

5252
一般来说,ts 会解析项目中所有的 `*.ts` 文件,当然也包含以 `.d.ts` 结尾的文件。所以当我们将 `jQuery.d.ts` 放到项目中时,其他所有 `*.ts` 文件就都可以获得 `jQuery` 的类型定义了。
5353

54-
```
54+
```bash
5555
/path/to/project
5656
├── README.md
5757
├── src
@@ -99,7 +99,7 @@ npm install @types/jquery --save-dev
9999

100100
使用全局变量的声明文件时,如果是以 `npm install @types/xxx --save-dev` 安装的,则不需要任何配置。如果是将声明文件直接存放于当前项目中,则建议和其他源码一起放到 `src` 目录下(或者对应的源码目录下):
101101

102-
```
102+
```bash
103103
/path/to/project
104104
├── README.md
105105
├── src
@@ -406,7 +406,7 @@ jQuery.ajax('/api/get_something');
406406

407407
目录结构:
408408

409-
```
409+
```bash
410410
/path/to/project
411411
├── README.md
412412
├── src
@@ -643,7 +643,7 @@ declare namespace foo {
643643

644644
需要注意的是,上例中由于使用了 `export =` 之后,就不能再单个导出 `export { bar }` 了。所以我们通过声明合并,使用 `declare namespace foo` 来将 `bar` 合并到 `foo` 里。
645645

646-
准确地讲,`export = ` 不仅可以用在声明文件中,也可以用在普通的 ts 文件中。实际上,`import ... require``export =` 都是 ts 为了兼容 AMD 规范和 commonjs 规范而创立的新语法,由于并不常用也不推荐使用,所以这里就不详细介绍了,感兴趣的可以看[官方文档](https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require)
646+
准确地讲,`export =` 不仅可以用在声明文件中,也可以用在普通的 ts 文件中。实际上,`import ... require``export =` 都是 ts 为了兼容 AMD 规范和 commonjs 规范而创立的新语法,由于并不常用也不推荐使用,所以这里就不详细介绍了,感兴趣的可以看[官方文档](https://www.typescriptlang.org/docs/handbook/modules.html#export--and-import--require)
647647

648648
由于很多第三方库是 commonjs 规范的,所以声明文件也就不得不用到 `export =` 这种语法了。但是还是需要再强调下,相比与 `export =`,我们更推荐使用 ES6 标准的 `export default``export`
649649

0 commit comments

Comments
 (0)