Skip to content

Commit

Permalink
Remove tslint
Browse files Browse the repository at this point in the history
  • Loading branch information
niik committed Feb 1, 2022
1 parent befb640 commit 6564a7d
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 168 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ rules:
react/jsx-uses-vars: error
react/jsx-uses-react: error
react/no-unused-state: error
react/no-unused-prop-types: error
react/prop-types: error

# JSDoc
jsdoc/check-alignment: error
Expand Down
3 changes: 0 additions & 3 deletions app/src/lib/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ let oauthState: IOAuthState | null = null
* flow.
*/
export function askUserToOAuth(endpoint: string) {
// Disable the lint warning since we're storing the `resolve` and `reject`
// functions.
// tslint:disable-next-line:promise-must-complete
return new Promise<Account>((resolve, reject) => {
oauthState = { state: uuid(), endpoint, resolve, reject }

Expand Down
1 change: 0 additions & 1 deletion app/src/lib/stores/app-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5205,7 +5205,6 @@ export class AppStore extends TypedBaseStore<IAppState> {
* resolve when `_completeOpenInDesktop` is called.
*/
public _startOpenInDesktop(fn: () => void): Promise<Repository | null> {
// tslint:disable-next-line:promise-must-complete
const p = new Promise<Repository | null>(
resolve => (this.resolveOpenInDesktop = resolve)
)
Expand Down
2 changes: 0 additions & 2 deletions app/src/lib/stores/helpers/repository-indicator-updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ export class RepositoryIndicatorUpdater {

public pause() {
if (this.paused === false) {
// Disable the lint warning since we're storing the `resolve`
// tslint:disable-next-line:promise-must-complete
this.pausePromise = new Promise<void>(resolve => {
this.resolvePausePromise = resolve
})
Expand Down
3 changes: 0 additions & 3 deletions app/src/ui/lib/highlight-text.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import * as React from 'react'

// broken for SFCs: https://github.com/Microsoft/tslint-microsoft-contrib/issues/339
/* tslint:disable react-unused-props-and-state */

interface IHighlightTextProps {
/** The text to render */
readonly text: string
Expand Down
2 changes: 0 additions & 2 deletions app/src/ui/window/full-screen-info.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group'
import { WindowState } from '../../lib/window-state'

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

Expand Down
1 change: 0 additions & 1 deletion docs/contributing/linting.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Our linting tooling uses a combination of

* [Prettier](https://github.com/prettier/prettier)
* [ESLint](https://github.com/eslint/eslint)
* [TSLint](https://github.com/palantir/tslint).

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.

Expand Down
4 changes: 2 additions & 2 deletions docs/contributing/styleguide.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# TypeScript Style Guide

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

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

# Documenting your code

Expand Down
3 changes: 1 addition & 2 deletions docs/contributing/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Recommended packages:
* [build-npm-apm](https://atom.io/packages/build-npm-apm) - invoke
all npm scripts straight from the editor by pressing F7 (requires
[build](https://atom.io/packages/build))
* [linter](https://atom.io/packages/linter) and
[linter-tslint](https://atom.io/packages/linter-tslint) - shows linter errors and warning in the editor
* [linter](https://atom.io/packages/linter) - shows linter errors and warning in the editor

You can install them all at once with:

Expand Down
11 changes: 3 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@
"lint": "yarn prettier && yarn lint:src",
"lint:fix": "yarn prettier --write && yarn lint:src:fix",
"prettier": "prettier --check \"./**/*.{ts,tsx,js,json,jsx,scss,html,yaml,yml}\"",
"lint:src": "yarn tslint && yarn eslint-check && yarn eslint",
"lint:src:fix": "yarn tslint --fix && yarn eslint --fix",
"tslint": "tslint -p .",
"lint:src": "yarn eslint-check && yarn eslint",
"lint:src:fix": "yarn eslint --fix",
"eslint": "eslint --cache --rulesdir ./eslint-rules \"./eslint-rules/**/*.js\" \"./script/**/*.ts{,x}\" \"./app/{src,typings,test}/**/*.{j,t}s{,x}\" \"./changelog.json\"",
"eslint-check": "eslint --print-config .eslintrc.* | eslint-config-prettier-check",
"publish": "ts-node -P script/tsconfig.json script/publish.ts",
Expand Down Expand Up @@ -78,7 +77,7 @@
"eslint-plugin-jsdoc": "^37.7.0",
"eslint-plugin-json": "^2.1.1",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react": "7.26.1",
"express": "^4.15.0",
"fake-indexeddb": "^2.0.4",
"file-loader": "^2.0.0",
Expand Down Expand Up @@ -108,11 +107,7 @@
"ts-jest": "^26.4.4",
"ts-loader": "^8",
"ts-node": "^7.0.0",
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.14.0",
"tslint-microsoft-contrib": "^6.2.0",
"typescript": "^4.5.5",
"typescript-tslint-plugin": "^0.0.6",
"webpack": "^4.8.3",
"webpack-bundle-analyzer": "^3.3.2",
"webpack-dev-middleware": "^3.1.3",
Expand Down
5 changes: 0 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
"lib": ["ES2017", "DOM", "DOM.Iterable", "ES2018.Promise", "ES2020.string"],
"useUnknownInCatchVariables": false
},
"plugins": [
{
"name": "typescript-tslint-plugin"
}
],
"include": ["app/**/*.ts", "app/**/*.tsx", "app/**/*.d.tsx"],
"exclude": [
"node_modules",
Expand Down
14 changes: 0 additions & 14 deletions tslint.json

This file was deleted.

Loading

0 comments on commit 6564a7d

Please sign in to comment.