Skip to content

Commit

Permalink
Remove tslint (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
ficristo authored Aug 26, 2024
1 parent d891f81 commit 29aea28
Show file tree
Hide file tree
Showing 22 changed files with 6 additions and 195 deletions.
1 change: 0 additions & 1 deletion app/appshell/app-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { menuTemplates } from "../shared";

export const ERR_NOT_FOUND = "NOTFOUND";

// tslint:disable-next-line:no-empty-interface
interface MenuItemOptions extends MenuItemConstructorOptions {}

function _getOrCreateMenuTemplate(winId: number): Array<MenuItemOptions> {
Expand Down
3 changes: 1 addition & 2 deletions app/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { app, BrowserWindow, BrowserWindowConstructorOptions, ipcMain, type IpcMainEvent } from "electron";
// tslint:disable-next-line:no-submodule-imports
import * as electronRemote from "@electron/remote/main";
import AutoUpdater from "./auto-updater";
import * as _ from "lodash";
Expand Down Expand Up @@ -140,7 +139,7 @@ app.on("child-process-gone", function (event: Electron.Event, details: Electron.

export function restart(query: {} | string = {}): void {
while (wins.length > 0) {
const win = wins.shift(); // tslint:disable-line
const win = wins.shift();
if (win) {
unsetLoggerWindow(win);
win.close();
Expand Down
1 change: 0 additions & 1 deletion app/shared.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { BrowserWindow, MenuItemConstructorOptions } from "electron";

export type BrowserWindows = Array<BrowserWindow>;
// tslint:disable-next-line:no-empty-interface
export interface MenuItemOptions extends MenuItemConstructorOptions {}
export interface MenuTemplates {
[winId: number]: Array<MenuItemOptions>;
Expand Down
4 changes: 2 additions & 2 deletions app/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ if (app) {

export function getLogger(name: string): Logger {
return {
log: (...msgs: Array<string>) => console.log(`[${name}]`, ...msgs), // tslint:disable-line
info: (...msgs: Array<string>) => console.info(`[${name}]`, ...msgs), // tslint:disable-line
log: (...msgs: Array<string>) => console.log(`[${name}]`, ...msgs),
info: (...msgs: Array<string>) => console.info(`[${name}]`, ...msgs),
warn: (...msgs: Array<string>) => console.warn(`[${name}]`, ...msgs),
error: (...msgs: Array<string>) => console.error(`[${name}]`, ...msgs)
};
Expand Down
124 changes: 0 additions & 124 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@
"tsc": "tsc --project src && npm run webpack",
"build": "gulp copy-src-dist && gulp build && npm run tsc",
"build-optimized": "npm run build && gulp optimize",
"test": "npm run tslint",
"tslint:app": "tslint -c tslint.json --project app/tsconfig.json -t stylish",
"tslint:src": "tslint -c src/tslint.json --project src/tsconfig.json -t stylish",
"tslint": "npm run tslint:app && npm run tslint:src",
"lint": "npm run tslint && gulp eslint",
"lint": "gulp eslint",
"format": "gulp format",
"dev": "concurrently --kill-others \"gulp watch\" \"tsc --watch --project src\" \"npm run webpack -- --watch\"",
"start": "electron .",
Expand All @@ -113,7 +109,7 @@
"publish-win": "npm run build-optimized && electron-builder -w --publish onTagOrDraft",
"publish-mac": "npm run build-optimized && electron-builder -m --publish onTagOrDraft",
"publish-linux": "npm run build-optimized && electron-builder -l --publish onTagOrDraft",
"test:prepare:ci": "gulp test && npm run tslint && gulp copy-test-dist",
"test:prepare:ci": "gulp test && gulp copy-test-dist",
"test:unit": "gulp test-integration --suite=unit --spec=all --results=TEST-unit",
"test:integration": "gulp test-integration --suite=integration --spec=all --results=TEST-integration",
"test:mainview": "gulp test-integration --suite=mainview --spec=all --results=TEST-mainview",
Expand Down Expand Up @@ -193,7 +189,6 @@
"transpile-webpack-plugin": "^1.1.3",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tslint": "^5.20.1",
"typescript": "~4.9.4",
"vscode-languageserver": "5.3.0-next.1",
"webpack": "^5.93.0",
Expand Down
3 changes: 0 additions & 3 deletions src/JSUtils/ScopeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,6 @@ function getFragmentAround(session: Session, start: CodeMirror.Position): FileIn
let min: number;

// expand range backwards
// tslint:disable-next-line:ban-comma-operator
for (p = start.line - 1, min = Math.max(0, p - 100); p >= min; --p) {
const line = session.getLine(p);
const fn = line.search(/\bfunction\b/);
Expand Down Expand Up @@ -838,7 +837,6 @@ function handleTimedOut(response): void {
* to the tern node domain, without worrying about initialization, priming the pump, etc.
*
*/
// tslint:disable member-access
class TernModule {
public resetForced: boolean;

Expand Down Expand Up @@ -1405,7 +1403,6 @@ class TernModule {
this.#addFilesPromise!.done(func);
}
}
// tslint:enable member-access

let resettingDeferred;

Expand Down
2 changes: 0 additions & 2 deletions src/JSUtils/Session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,6 @@ class Session {
let line;
let e;
let found;
// tslint:disable-next-line:ban-comma-operator
for (line = this.getCursor().line, e = Math.max(0, line - 9), found = false; line >= e; --line) {
if (this.getLine(line).charAt(col) === "(") {
found = true;
Expand Down Expand Up @@ -738,7 +737,6 @@ class Session {
}
}
if (node.type === "CallExpression") {
// tslint:disable-next-line:no-string-literal
const args = node["arguments"];
let i;
const n = args.length;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ function _curveClick(e) {
*/
function handlePointMove(e, x, y) {
const self = e.target;
// tslint:disable-next-line:prefer-const
let bezierEditor: BezierCurveEditor = self.bezierEditor;

// Helper function to redraw curve
Expand Down
1 change: 0 additions & 1 deletion src/extensions/default/QuickOpenHTML/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ function createIDList() {
for (let i = 0; i < lines.length; i++) {
const line = lines[i];
let info;
// tslint:disable-next-line:no-conditional-assignment
while ((info = regex.exec(line)) !== null) {
const id = info[1];
// TODO: this doesn't handle id's that share the
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/default/quadre-whitespaces/nobreakspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const CodeMirror = brackets.getModule("thirdparty/CodeMirror/lib/codemirror");

CodeMirror.defineOption("showNoBreakSpace", false, function (cm, val, prev) {
// eslint-disable-next-line eqeqeq
if (prev == (CodeMirror as any).Init) { // tslint:disable-line:triple-equals
if (prev == (CodeMirror as any).Init) {
prev = false;
}
if (prev && !val) {
Expand Down
1 change: 0 additions & 1 deletion src/filesystem/impls/appshell/node/FileWatcherManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ interface WatcherImpl {
watchPath(path: string, ignored: Array<string>, _watcherMap: WatcherMap, domainManager: DomainManager): void;
}

// tslint:disable-next-line:no-empty-interface
interface DomainManager {
emitEvent(domainName: string, eventName: string, parameters?: Array<any>): void;
}
Expand Down
1 change: 0 additions & 1 deletion src/language/CodeInspection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,6 @@ export function requestRun(): void {
// some inspectors don't always provide a line number or report a negative line number
if (!isNaN(error.pos.line) &&
(error.pos.line + 1) > 0 &&
// tslint:disable-next-line:no-conditional-assignment
(error.codeSnippet = currentDoc.getLine(error.pos.line)) !== undefined) {
error.friendlyLine = error.pos.line + 1;
error.codeSnippet = error.codeSnippet.substr(0, 175); // limit snippet width
Expand Down
1 change: 0 additions & 1 deletion src/language/HTMLSimpleDOM.ts
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ export class Builder {
lastClosedTag.endPos = _addPos(self.startOffsetPos, endPos);
}

// tslint:disable-next-line:no-conditional-assignment
while ((token = this.t.nextToken()) !== null) {
// lastTextNode is used to glue text nodes together
// If the last node we saw was text but this one is not, then we're done gluing.
Expand Down
1 change: 0 additions & 1 deletion src/project/FileTreeView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,6 @@ class DirectoryContents extends React.Component<IDirectoryContentsProps, {}> {
const contents = this.props.contents;
const namesInOrder = _sortDirectoryContents(contents, this.props.sortDirectoriesFirst);
const self: DirectoryContents = this;
// tslint:disable-next-line:unnecessary-bind
const children = namesInOrder.map(function (name) {
const entry = contents.get(name);

Expand Down
1 change: 0 additions & 1 deletion src/search/FindInFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ function _getSearchMatches(contents: string, queryExpr: RegExp): Array<SearchMat
const lines = StringUtils.getLines(contents);
const matches: Array<SearchMatch> = [];

// tslint:disable-next-line:no-conditional-assignment
while ((match = queryExpr.exec(contents)) !== null) {
lineNum = StringUtils.offsetToLineNum(lines, match.index);
line = lines[lineNum];
Expand Down
1 change: 0 additions & 1 deletion src/search/FindReplace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,6 @@ export function _findAllAndSelect(editor: Editor.Editor): void {
let nextMatch: Selection | null;
setQueryInfo(state, { query: editor.document.getRange(sel.start, sel.end), isCaseSensitive: false, isRegexp: false, isWholeWord: false });

// tslint:disable-next-line:no-conditional-assignment
while ((nextMatch = _getNextMatch(editor, false, searchStart, false)) !== null) {
if (_selEq(sel, nextMatch)) {
nextMatch.primary = true;
Expand Down
17 changes: 0 additions & 17 deletions src/tslint.json

This file was deleted.

1 change: 0 additions & 1 deletion src/types/NodeConnectionInterfaceSpec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable */
/* tslint:disable:no-empty-interface */

export interface NodeConnectionCommandSpec {

Expand Down
1 change: 0 additions & 1 deletion src/utils/StringUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/

/*eslint no-bitwise: off */
/*tslint:disable no-bitwise */
/*jslint bitwise: true */

/**
Expand Down
1 change: 0 additions & 1 deletion src/view/ThemeView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const $scrollbars = $("<style id='scrollbars'>").appendTo("head");
* to be updated
*/
export function updateScrollbars(theme: Theme | null): void {
// tslint:disable-next-line: no-object-literal-type-assertion
const themeToUpdate = theme || {} as Theme;
if (prefs.get("themeScrollbars")) {
const scrollbar = (themeToUpdate.scrollbar || []).join(" ");
Expand Down
24 changes: 0 additions & 24 deletions tslint.json

This file was deleted.

0 comments on commit 29aea28

Please sign in to comment.