Skip to content

Commit dc965b9

Browse files
committed
chore: Get rid of tslint
Switched to prettier + eslint.
1 parent 714e038 commit dc965b9

File tree

276 files changed

+11036
-7094
lines changed

Some content is hidden

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

276 files changed

+11036
-7094
lines changed

.eslintrc

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"env": {
5+
"node": true,
6+
"es6": true
7+
},
8+
"plugins": ["@typescript-eslint"],
9+
"extends": [
10+
"eslint:recommended",
11+
"plugin:@typescript-eslint/eslint-recommended",
12+
"plugin:@typescript-eslint/recommended"
13+
],
14+
"ignorePatterns": ["src/test/renderer/specs/**", "examples/**", "dist"],
15+
"rules": {
16+
// This rule is factually incorrect. Interfaces which extend some type alias can be used to introduce
17+
// new type names. This is useful particularly when dealing with mixins.
18+
"@typescript-eslint/no-empty-interface": 0,
19+
20+
// We still use `any` fairly frequently...
21+
"@typescript-eslint/ban-types": 0,
22+
"@typescript-eslint/no-explicit-any": 0,
23+
24+
// Declaration merging with a namespace is a necessary tool when working with enums.
25+
"@typescript-eslint/no-namespace": 0,
26+
27+
// Feel free to turn one of these back on and submit a PR!
28+
"@typescript-eslint/no-empty-function": 0,
29+
"@typescript-eslint/no-non-null-assertion": 0,
30+
"@typescript-eslint/explicit-module-boundary-types": 0,
31+
"@typescript-eslint/no-unused-vars": 0
32+
},
33+
"overrides": [
34+
{
35+
"files": ["src/test/converter/**", "src/test/renderer/**"],
36+
"rules": {
37+
"prefer-rest-params": 0,
38+
"no-inner-declarations": 0,
39+
"no-var": 0,
40+
"prefer-const": 0,
41+
"@typescript-eslint/prefer-namespace-keyword": 0,
42+
"@typescript-eslint/no-inferrable-types": 0,
43+
"@typescript-eslint/explicit-module-boundary-types": 0,
44+
"@typescript-eslint/no-empty-function": 0,
45+
"@typescript-eslint/no-unused-vars": 0,
46+
"@typescript-eslint/no-misused-new": 0
47+
}
48+
},
49+
{
50+
"files": ["scripts/**", "bin/typedoc.js"],
51+
"rules": {
52+
// We don't depend on a new enough version of node to use imports here...
53+
"@typescript-eslint/no-var-requires": 0
54+
}
55+
},
56+
{
57+
"files": ["src/test/**"],
58+
"env": {
59+
"mocha": true
60+
}
61+
}
62+
]
63+
}

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,19 @@ to TypeDoc not working.
1111
-->
1212

1313
## Search terms
14+
1415
<!-- Include keywords that might help others with the same problem find this issue -->
1516

1617
## Expected Behavior
18+
1719
<!-- How did you expect Typedoc to work? -->
1820

1921
## Actual Behavior
22+
2023
<!-- What does Typedoc fail to do? -->
2124

2225
## Steps to reproduce the bug
26+
2327
<!--
2428
If possible, please create a *minimal* repo reproducing your problem and link it.
2529
@@ -31,7 +35,8 @@ If this is not possible, include at least:
3135
-->
3236

3337
## Environment
34-
- Typedoc version:
35-
- TypeScript version:
36-
- Node.js version:
37-
- OS:
38+
39+
- Typedoc version:
40+
- TypeScript version:
41+
- Node.js version:
42+
- OS:

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@ labels: enhancement
55
---
66

77
## Search Terms
8+
89
<!-- Include keywords that might help others with the same problem find this issue -->
910

1011
## Problem
12+
1113
<!-- What is missing or inconvenient without this improvement or feature? -->
1214

1315
## Suggested Solution
16+
1417
<!-- How do you suggest fixing the problem? Do any other tools already do it? -->

.prettierignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
dist
2+
coverage
3+
.nyc_output
4+
src/test/renderer/specs
5+
src/test/**/specs*.json

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ sudo: false
22
language: node_js
33

44
node_js:
5-
- 10
6-
- 12
7-
- 14
5+
- 10
6+
- 12
7+
- 14
88

99
before_install:
10-
- npm install --global npm@
10+
- npm install --global npm@
1111

1212
script:
13-
- npm run build_and_test
14-
- npm run lint
13+
- npm run build_and_test
14+
- npm run lint

.vscode/launch.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,7 @@
3030
"name": "Debug Tests",
3131
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
3232
"cwd": "${workspaceRoot}",
33-
"args": [
34-
"--no-timeouts",
35-
"dist/test/**/*.js"
36-
],
33+
"args": ["--no-timeouts", "dist/test/**/*.js"],
3734
"outFiles": [
3835
"${workspaceRoot}/lib/**/*.js",
3936
"${workspaceRoot}/test/**/*.js"

.vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"typescript.tsdk": "./node_modules/typescript/lib"
3-
}
2+
"typescript.tsdk": "./node_modules/typescript/lib"
3+
}

.vscode/tasks.json

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the tasks.json format
4-
"version": "2.0.0",
5-
"tasks": [
6-
{
7-
"label": "build",
8-
"type": "shell",
9-
"command": "npm run build",
10-
"problemMatcher": [
11-
"$tsc"
12-
]
13-
},
14-
{
15-
"label": "build_and_test",
16-
"type": "shell",
17-
"command": "npm run build_and_test",
18-
"problemMatcher": [
19-
"$tsc"
20-
]
21-
}
22-
]
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build",
8+
"type": "shell",
9+
"command": "npm run build",
10+
"problemMatcher": ["$tsc"]
11+
},
12+
{
13+
"label": "build_and_test",
14+
"type": "shell",
15+
"command": "npm run build_and_test",
16+
"problemMatcher": ["$tsc"]
17+
}
18+
]
2319
}

CONTRIBUTING.md

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,15 @@ This document includes a set of guidelines for contributing to TypeDoc. These ar
77
## Table of Contents
88

99
1. [How Can I Contribute?](#how-can-i-contribute)
10-
- [Bug Reports](#bug-reports)
11-
- [Suggestions](#suggestions)
12-
- [Documentation](#documentation)
13-
- [Code](#code)
10+
- [Bug Reports](#bug-reports)
11+
- [Suggestions](#suggestions)
12+
- [Documentation](#documentation)
13+
- [Code](#code)
1414
1. [Setup - Git, GitHub, and Node](#setup---git-github-and-node)
1515
1. [Linting, Building, and Testing](#linting-building-and-testing)
1616
1. [Pull Requests](#pull-requests)
1717
1. [Updating Your Branch](#updating-your-branch)
1818

19-
2019
## How Can I Contribute?
2120

2221
### Bug Reports
@@ -27,9 +26,9 @@ Before creating a bug report please check [this list][bugs] to see if it has alr
2726

2827
When creating a bug report, explain the problem and include as much additional information as necessary to help maintainers to reproduce it. Ideally, provide an example project which highlights the problem.
2928

30-
- **Use a clear and descriptive title** for the issue to identify the problem
31-
- **Describe your project setup**. The easier it is for maintainers to reproduce your problem, the more likely it is to be quickly fixed.
32-
- **Explain what you expected to see instead and why**
29+
- **Use a clear and descriptive title** for the issue to identify the problem
30+
- **Describe your project setup**. The easier it is for maintainers to reproduce your problem, the more likely it is to be quickly fixed.
31+
- **Explain what you expected to see instead and why**
3332

3433
### Suggestions
3534

@@ -39,18 +38,18 @@ Before creating a feature request, please check [this list][suggestions] to see
3938

4039
When creating an enhancement request, explain your use case and ultimate goal. This will make it possible for contributors to suggest existing alternatives which may already meet your requirements.
4140

42-
- **Use a clear and descriptive title** for the issue to identify the suggestion.
43-
- **Provide an example where this enhancement would improve TypeDoc**
44-
- **If possible, list another documentation generator where this feature exists**
41+
- **Use a clear and descriptive title** for the issue to identify the suggestion.
42+
- **Provide an example where this enhancement would improve TypeDoc**
43+
- **If possible, list another documentation generator where this feature exists**
4544

4645
### Documentation
4746

4847
TypeDoc is documented in 4 primary areas.
4948

50-
- This repo's [README.md](https://github.com/TypeStrong/typedoc/blob/master/README.md)
51-
- The website guides hosted at [TypeStrong/typedoc-site](https://github.com/TypeStrong/typedoc-site/)
52-
- Doc comments of source files which are rendered in the [api docs](https://typedoc.org/api/)
53-
- The [option descriptions](https://github.com/TypeStrong/typedoc/blob/ce0654295698e2bb2badf5f93d388bd977da3c46/src/lib/application.ts#L66) used by the `--help` command
49+
- This repo's [README.md](https://github.com/TypeStrong/typedoc/blob/master/README.md)
50+
- The website guides hosted at [TypeStrong/typedoc-site](https://github.com/TypeStrong/typedoc-site/)
51+
- Doc comments of source files which are rendered in the [api docs](https://typedoc.org/api/)
52+
- The [option descriptions](https://github.com/TypeStrong/typedoc/blob/ce0654295698e2bb2badf5f93d388bd977da3c46/src/lib/application.ts#L66) used by the `--help` command
5453

5554
If you would like to improve the documentation in any of these areas, please open an issue if there isn't one already to discuss what you would like to improve. Then submit a [Pull Request](#pull-requests) to this repo, (or to [TypeStrong/typedoc-site](https://github.com/TypeStrong/typedoc-site/) in the case of guides).
5655

@@ -73,26 +72,26 @@ If you don't already have [Git] installed, install it first. You will need it to
7372
1. Open a terminal, or "Git Bash" on Windows.
7473
1. Use `cd` to move to the directory that you want to work in.
7574
1. Clone your repository, replace USER with your GitHub username:
76-
```bash
77-
git clone https://github.com/USER/typedoc
78-
```
75+
```bash
76+
git clone https://github.com/USER/typedoc
77+
```
7978
1. Add the TypeDoc repo as a remote repository
80-
```bash
81-
git remote add typedoc https://github.com/TypeStrong/typedoc
82-
```
79+
```bash
80+
git remote add typedoc https://github.com/TypeStrong/typedoc
81+
```
8382
1. Install dependencies:
84-
```bash
85-
npm install
86-
```
87-
1. Open the typedoc folder in your favorite editor. If you don't have one, try [Visual Studio Code][VSCode] or [Atom]
83+
```bash
84+
npm install
85+
```
86+
1. Open the typedoc folder in your favorite editor. If you don't have one, try [Visual Studio Code][vscode] or [Atom]
8887
8988
## Linting, Building, and Testing
9089
9190
Once you have cloned TypeDoc, you can lint, build, and test the code from your terminal.
9291
9392
#### Linting
9493
95-
To lint the TypeDoc code, run `npm run lint`. This will start tslint and check all files for stylistic problems. You can also install a tslint plugin for your editor to show most style problems as you type.
94+
To lint the TypeDoc code, run `npm run lint`. This will start eslint and check all files for stylistic problems. You can also install an eslint plugin for your editor to show most style problems as you type.
9695
9796
You can automatically fix some style problems by running `npm run lint -- --fix`.
9897
@@ -122,10 +121,9 @@ If the TypeDoc repository has changed since you originally forked it, you will n
122121
[suggestions]: https://github.com/TypeStrong/typedoc/labels/enhancement
123122
[good-first-issue]: https://github.com/TypeStrong/typedoc/labels/good%20first%20issue
124123
[help-wanted]: https://github.com/TypeStrong/typedoc/labels/help%20wanted
125-
126-
[Gitter]: https://gitter.im/TypeStrong/typedoc
127-
[GitHub]: https://github.com
128-
[Git]: https://git-scm.com
129-
[Node]: https://nodejs.org/en/
130-
[VSCode]: https://code.visualstudio.com/
131-
[Atom]: https://atom.io/
124+
[gitter]: https://gitter.im/TypeStrong/typedoc
125+
[github]: https://github.com
126+
[git]: https://git-scm.com
127+
[node]: https://nodejs.org/en/
128+
[vscode]: https://code.visualstudio.com/
129+
[atom]: https://atom.io/

0 commit comments

Comments
 (0)