Skip to content

Commit 1558d76

Browse files
committed
Fix ESLint issues for the rest of libraries/*
1 parent 1e6d2e9 commit 1558d76

File tree

12 files changed

+34
-18
lines changed

12 files changed

+34
-18
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require("@rushstack/eslint-config/patch-eslint6");
3+
4+
module.exports = {
5+
extends: [ "@rushstack/eslint-config" ],
6+
parserOptions: { tsconfigRootDir: __dirname },
7+
};

libraries/load-themed-styles/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55

66
// Declaring a global here in case that the execution environment is Node.js (without importing the
77
// entire node.js d.ts for now)
8-
declare var global: any; // eslint-disable-line @typescript-eslint/no-explicit-any
8+
declare let global: any; // eslint-disable-line @typescript-eslint/no-explicit-any
99

1010
export interface IThemingInstruction {
1111
theme?: string;
1212
defaultValue?: string;
1313
rawString?: string;
1414
}
1515

16-
export type ThemableArray = Array<IThemingInstruction>;
16+
export type ThemableArray = IThemingInstruction[];
1717

1818
export interface ITheme {
1919
[key: string]: string;
@@ -350,7 +350,7 @@ export function splitStyles(styles: string): ThemableArray {
350350
if (styles) {
351351
let pos: number = 0; // Current position in styles.
352352
let tokenMatch: RegExpExecArray | null; // eslint-disable-line no-restricted-syntax
353-
while (tokenMatch = _themeTokenRegex.exec(styles)) {
353+
while (tokenMatch = _themeTokenRegex.exec(styles)) { // eslint-disable-line no-cond-assign
354354
const matchIndex: number = tokenMatch.index;
355355
if (matchIndex > pos) {
356356
result.push({

libraries/load-themed-styles/tslint.json

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require("@rushstack/eslint-config/patch-eslint6");
3+
4+
module.exports = {
5+
extends: [ "@rushstack/eslint-config" ],
6+
parserOptions: { tsconfigRootDir: __dirname },
7+
};

libraries/package-deps-hash/src/getPackageDeps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ export function getPackageDeps(packagePath: string = process.cwd(), excludedPath
178178
const excludedHashes: { [key: string]: boolean } = {};
179179

180180
if (excludedPaths) {
181-
excludedPaths.forEach(path => excludedHashes[path] = true);
181+
excludedPaths.forEach((path) => { excludedHashes[path] = true });
182182
}
183183

184184
const changes: IPackageDeps = {

libraries/package-deps-hash/tslint.json

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

libraries/rushell/.eslintrc.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// This is a workaround for https://github.com/eslint/eslint/issues/3458
2+
require("@rushstack/eslint-config/patch-eslint6");
3+
4+
module.exports = {
5+
extends: [ "@rushstack/eslint-config" ],
6+
parserOptions: { tsconfigRootDir: __dirname },
7+
};

libraries/rushell/src/Parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export class Parser {
6969
private _parseCompoundWord(): AstCompoundWord | undefined {
7070
const compoundWord: AstCompoundWord = new AstCompoundWord();
7171

72-
while (true) {
72+
for (;;) {
7373
const node: AstNode | undefined = this._parseText();
7474
if (!node) {
7575
break;

libraries/rushell/src/Tokenizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export class Tokenizer {
7373
return c === ' ' || c === '\t';
7474
}
7575

76-
constructor(input: TextRange | string) {
76+
public constructor(input: TextRange | string) {
7777
if (typeof(input) === 'string') {
7878
this.input = TextRange.fromString(input);
7979
} else {

libraries/rushell/tslint.json

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

0 commit comments

Comments
 (0)