Skip to content

Commit 6564a7d

Browse files
committed
Remove tslint
1 parent befb640 commit 6564a7d

File tree

13 files changed

+36
-168
lines changed

13 files changed

+36
-168
lines changed

.eslintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ rules:
111111
react/jsx-uses-vars: error
112112
react/jsx-uses-react: error
113113
react/no-unused-state: error
114+
react/no-unused-prop-types: error
115+
react/prop-types: error
114116

115117
# JSDoc
116118
jsdoc/check-alignment: error

app/src/lib/oauth.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ let oauthState: IOAuthState | null = null
2323
* flow.
2424
*/
2525
export function askUserToOAuth(endpoint: string) {
26-
// Disable the lint warning since we're storing the `resolve` and `reject`
27-
// functions.
28-
// tslint:disable-next-line:promise-must-complete
2926
return new Promise<Account>((resolve, reject) => {
3027
oauthState = { state: uuid(), endpoint, resolve, reject }
3128

app/src/lib/stores/app-store.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5205,7 +5205,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
52055205
* resolve when `_completeOpenInDesktop` is called.
52065206
*/
52075207
public _startOpenInDesktop(fn: () => void): Promise<Repository | null> {
5208-
// tslint:disable-next-line:promise-must-complete
52095208
const p = new Promise<Repository | null>(
52105209
resolve => (this.resolveOpenInDesktop = resolve)
52115210
)

app/src/lib/stores/helpers/repository-indicator-updater.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,6 @@ export class RepositoryIndicatorUpdater {
140140

141141
public pause() {
142142
if (this.paused === false) {
143-
// Disable the lint warning since we're storing the `resolve`
144-
// tslint:disable-next-line:promise-must-complete
145143
this.pausePromise = new Promise<void>(resolve => {
146144
this.resolvePausePromise = resolve
147145
})

app/src/ui/lib/highlight-text.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
import * as React from 'react'
22

3-
// broken for SFCs: https://github.com/Microsoft/tslint-microsoft-contrib/issues/339
4-
/* tslint:disable react-unused-props-and-state */
5-
63
interface IHighlightTextProps {
74
/** The text to render */
85
readonly text: string

app/src/ui/window/full-screen-info.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group'
33
import { WindowState } from '../../lib/window-state'
44

55
interface IFullScreenInfoProps {
6-
// react-unused-props-and-state doesn't understand getDerivedStateFromProps
7-
// tslint:disable-next-line:react-unused-props-and-state
86
readonly windowState: WindowState | null
97
}
108

docs/contributing/linting.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Our linting tooling uses a combination of
88

99
* [Prettier](https://github.com/prettier/prettier)
1010
* [ESLint](https://github.com/eslint/eslint)
11-
* [TSLint](https://github.com/palantir/tslint).
1211

1312
Most (if not all) editors have integrations for these tools so that they will report errors and fix formatting in realtime. See [tooling](./tooling.md) for how to set these integrations up while developing for desktop.
1413

docs/contributing/styleguide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# TypeScript Style Guide
22

3-
Most of our preferred style when writing typescript is configured in our [`tslint.json`](../../tslint.json) and [`.eslintrc.yml`](../../.eslintrc.yml) files.
3+
Most of our preferred style when writing typescript is configured in our [`.eslintrc.yml`](../../.eslintrc.yml) files.
44

55
## Do
66
- Use camelCase for methods
77
- Use PascalCase for class names
8-
- Enable [TSLint](https://palantir.github.io/tslint/usage/third-party-tools/) and [ESLint](https://eslint.org/docs/user-guide/integrations) in your editor
8+
- [ESLint](https://eslint.org/docs/user-guide/integrations) in your editor
99

1010
# Documenting your code
1111

docs/contributing/tooling.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ Recommended packages:
99
* [build-npm-apm](https://atom.io/packages/build-npm-apm) - invoke
1010
all npm scripts straight from the editor by pressing F7 (requires
1111
[build](https://atom.io/packages/build))
12-
* [linter](https://atom.io/packages/linter) and
13-
[linter-tslint](https://atom.io/packages/linter-tslint) - shows linter errors and warning in the editor
12+
* [linter](https://atom.io/packages/linter) - shows linter errors and warning in the editor
1413

1514
You can install them all at once with:
1615

package.json

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
"lint": "yarn prettier && yarn lint:src",
3030
"lint:fix": "yarn prettier --write && yarn lint:src:fix",
3131
"prettier": "prettier --check \"./**/*.{ts,tsx,js,json,jsx,scss,html,yaml,yml}\"",
32-
"lint:src": "yarn tslint && yarn eslint-check && yarn eslint",
33-
"lint:src:fix": "yarn tslint --fix && yarn eslint --fix",
34-
"tslint": "tslint -p .",
32+
"lint:src": "yarn eslint-check && yarn eslint",
33+
"lint:src:fix": "yarn eslint --fix",
3534
"eslint": "eslint --cache --rulesdir ./eslint-rules \"./eslint-rules/**/*.js\" \"./script/**/*.ts{,x}\" \"./app/{src,typings,test}/**/*.{j,t}s{,x}\" \"./changelog.json\"",
3635
"eslint-check": "eslint --print-config .eslintrc.* | eslint-config-prettier-check",
3736
"publish": "ts-node -P script/tsconfig.json script/publish.ts",
@@ -78,7 +77,7 @@
7877
"eslint-plugin-jsdoc": "^37.7.0",
7978
"eslint-plugin-json": "^2.1.1",
8079
"eslint-plugin-prettier": "^3.1.4",
81-
"eslint-plugin-react": "^7.28.0",
80+
"eslint-plugin-react": "7.26.1",
8281
"express": "^4.15.0",
8382
"fake-indexeddb": "^2.0.4",
8483
"file-loader": "^2.0.0",
@@ -108,11 +107,7 @@
108107
"ts-jest": "^26.4.4",
109108
"ts-loader": "^8",
110109
"ts-node": "^7.0.0",
111-
"tslint": "^5.11.0",
112-
"tslint-config-prettier": "^1.14.0",
113-
"tslint-microsoft-contrib": "^6.2.0",
114110
"typescript": "^4.5.5",
115-
"typescript-tslint-plugin": "^0.0.6",
116111
"webpack": "^4.8.3",
117112
"webpack-bundle-analyzer": "^3.3.2",
118113
"webpack-dev-middleware": "^3.1.3",

tsconfig.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
"lib": ["ES2017", "DOM", "DOM.Iterable", "ES2018.Promise", "ES2020.string"],
1919
"useUnknownInCatchVariables": false
2020
},
21-
"plugins": [
22-
{
23-
"name": "typescript-tslint-plugin"
24-
}
25-
],
2621
"include": ["app/**/*.ts", "app/**/*.tsx", "app/**/*.d.tsx"],
2722
"exclude": [
2823
"node_modules",

tslint.json

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

0 commit comments

Comments
 (0)