Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions .eslintrc.js

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ node_modules/
!.yarn/versions
.pnp.*
*.tgz
*.zip
*.zip
.eslintcache
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"stylelint.stylelintPath": ".yarn/sdks/stylelint/lib/index.js"
}
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.0.2.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.3.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
yarnPath: .yarn/releases/yarn-4.0.2.cjs
yarnPath: .yarn/releases/yarn-4.5.3.cjs
6 changes: 1 addition & 5 deletions demo/cell.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable class-methods-use-this */
import { uniformContext } from '../src';
import { ACellRenderer, ICellContext } from '../src/cell/ACellRenderer';
import '../src/style.scss';
Expand All @@ -9,7 +8,7 @@ export default class CellRenderer extends ACellRenderer {

constructor(root: HTMLElement, id: string, numberOfRows = 128, numberOfColumns = 128) {
super(root);
// eslint-disable-next-line no-param-reassign

root.id = id;

this.privateContext = {
Expand All @@ -34,7 +33,6 @@ export default class CellRenderer extends ACellRenderer {
}

protected updateCell(node: HTMLElement, row: number, col: number): HTMLElement | void {
// eslint-disable-next-line no-param-reassign
node.textContent = `${row}/${col}`;
}

Expand All @@ -45,7 +43,6 @@ export default class CellRenderer extends ACellRenderer {
}

protected updateRowHeader(node: HTMLElement, row: number): HTMLElement | void {
// eslint-disable-next-line no-param-reassign
node.textContent = `#${row}`;
}

Expand All @@ -56,7 +53,6 @@ export default class CellRenderer extends ACellRenderer {
}

protected updateColumnHeader(node: HTMLElement, col: number): HTMLElement | void {
// eslint-disable-next-line no-param-reassign
node.textContent = `#${col}`;
}
}
2 changes: 0 additions & 2 deletions demo/column.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { IColumn } from '../src';
import '../src/style.scss';
import { CSS_CLASS_FROZEN } from '../src/styles';
Expand Down Expand Up @@ -36,7 +35,6 @@ export default class Column<T> implements IColumn {
}

update(node: HTMLElement, row: T) {
// eslint-disable-next-line no-param-reassign
node.textContent = `${this.name}@${row.toString()}`;
return node;
}
Expand Down
3 changes: 1 addition & 2 deletions demo/frozen.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable class-methods-use-this */
import { ACellRenderer, ICellRenderContext, uniformContext, nonUniformContext } from '../src';
import Column from './column';

Expand All @@ -8,7 +7,7 @@ export default class TestRenderer extends ACellRenderer<Column<number>> {

constructor(root: HTMLElement, id: string, numberOfRows = 1000, numberOfColumns = 15) {
super(root, `#${id}`, { mixins: [], striped: true });
// eslint-disable-next-line no-param-reassign

root.id = id;

const defaultRowHeight = 20;
Expand Down
3 changes: 1 addition & 2 deletions demo/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable class-methods-use-this */
import { ACellRenderer, ICellRenderContext, PrefetchMixin, uniformContext } from '../src';
import Column from './column';

Expand All @@ -8,7 +7,7 @@ export default class TestRenderer extends ACellRenderer<Column<number>> {

constructor(root: HTMLElement, id: string, numberOfRows = 1000, numberOfColumns = 20) {
super(root, `#${id}`, { mixins: [PrefetchMixin], striped: true });
// eslint-disable-next-line no-param-reassign

root.id = id;

const defaultRowHeight = 20;
Expand Down
1 change: 0 additions & 1 deletion demo/table.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable class-methods-use-this */
import { ICellRenderContext, uniformContext, ACellTableSection } from '../src';
import Column from './column';
import MultiTableRowRenderer from '../src/table/MultiTableRowRenderer';
Expand Down
26 changes: 26 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-plugin-prettier';

export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, {
plugins: { prettier },
rules: {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'all',
argsIgnorePattern: '^_',
caughtErrors: 'all',
caughtErrorsIgnorePattern: '^_',
destructuredArrayIgnorePattern: '^_',
varsIgnorePattern: '^_',
ignoreRestSiblings: true,
},
],
},
});
70 changes: 29 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@
"!build/demo"
],
"scripts": {
"clean": "rimraf build dist docs \"*.tgz\" && npm run clean:compile",
"clean:compile": "rimraf build/src \"build/*.tsbuildinfo\" \"*.tsbuildinfo\" ",
"clean": "rimraf --glob build dist docs \"*.tgz\" && npm run clean:compile",
"clean:compile": "rimraf --glob build/src \"build/*.tsbuildinfo\" \"*.tsbuildinfo\" ",
"compile": "tsc -b ./tsconfig.json",
"compile:dev": "tsc -b ./tsconfig.dev.json",
"fix": "npm run eslint:fix && npm run prettier:write && npm run stylelint:fix",
"prettier:write": "prettier \"*\" \"*/**\" --write",
"prettier": "prettier \"*\" \"*/**\" --check",
"eslint": "eslint src demo --ext .ts,.tsx",
"eslint": "eslint src demo --cache",
"eslint:fix": "npm run eslint --fix",
"stylelint": "stylelint \"src/**/*.scss\"",
"stylelint:fix": "npm run stylelint --fix",
Expand All @@ -61,50 +61,38 @@
"prepare": "echo 'dummy prepare since prepack has no dev dependencies'",
"prepack": "npm run clean && npm run compile && npm run build"
},
"resolutions": {
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"@yarnpkg/sdks": "^3.1.0",
"css-loader": "^6.9.1",
"eslint": "^8.56.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-flowtype": "^8.0.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"@eslint/js": "^9.17.0",
"@types/jest": "^29.5.14",
"@yarnpkg/sdks": "^3.2.0",
"css-loader": "^7.1.2",
"eslint": "^9.17.0",
"eslint-plugin-prettier": "^5.2.1",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"mini-css-extract-plugin": "^2.7.7",
"mini-css-extract-plugin": "^2.9.2",
"mkdirp": "^3.0.1",
"postcss": "^8.4.33",
"prettier": "^3.2.4",
"rimraf": "^5.0.5",
"sass": "^1.70.0",
"sass-loader": "^14.0.0",
"style-loader": "^3.3.4",
"stylelint": "^16.2.0",
"postcss": "^8.4.49",
"prettier": "^3.4.2",
"rimraf": "^6.0.1",
"sass": "^1.83.0",
"sass-loader": "^16.0.4",
"style-loader": "^4.0.0",
"stylelint": "^16.12.0",
"stylelint-config-prettier-scss": "^1.0.0",
"stylelint-config-standard-scss": "^13.0.0",
"stylelint-prettier": "^5.0.0",
"stylelint-scss": "^6.1.0",
"thread-loader": "^4.0.2",
"ts-jest": "^29.1.1",
"stylelint-config-standard-scss": "^14.0.0",
"stylelint-prettier": "^5.0.2",
"stylelint-scss": "^6.10.0",
"thread-loader": "^4.0.4",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.1",
"typedoc": "^0.25.7",
"typescript": "^5.3.3",
"webpack": "^5.89.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
"typedoc": "^0.27.6",
"typescript": "^5.7.2",
"typescript-eslint": "^8.18.1",
"webpack": "^5.97.1",
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.0"
},
"packageManager": "yarn@4.0.2"
"packageManager": "yarn@4.5.3"
}
4 changes: 0 additions & 4 deletions src/ACellRenderer.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable class-methods-use-this */
/* eslint-disable max-classes-per-file */
import { IAbortAblePromise, IAsyncUpdate } from './abortAble';
import { IAnimationContext } from './animation';
import { ARowRenderer, IRowRendererOptions, setTransform } from './ARowRenderer';
Expand All @@ -24,7 +22,6 @@ export abstract class ACellRenderer<T extends IColumn> extends ARowRenderer {
htmlId: string,
options: Partial<IRowRendererOptions> = {}
) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
super(setTemplate(root, htmlId).querySelector<HTMLElement>('main > article')!, options);
root.classList.add(cssClass(), 'lineup-engine');

Expand Down Expand Up @@ -83,7 +80,6 @@ export abstract class ACellRenderer<T extends IColumn> extends ARowRenderer {
* get the header root element
*/
protected get header(): HTMLElement {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
return this.root.querySelector<HTMLElement>('header > article')!;
}

Expand Down
15 changes: 7 additions & 8 deletions src/ARowRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ export abstract class ARowRenderer {
}

private static cleanUp(item: HTMLElement) {
// eslint-disable-next-line no-param-reassign
item.style.height = '';
}

Expand Down Expand Up @@ -700,15 +699,15 @@ export abstract class ARowRenderer {

const run = () => {
// dummy log for forcing dom update
// eslint-disable-next-line no-console

console.assert(activeAnimation[0].node.offsetTop >= 0, 'dummy log for forcing dom update');
executePhase(phases[actPhase]);
actPhase += 1;
// shifted by one since already added through ++
if (actPhase < phases.length) {
// schedule the next one
const next = phases[actPhase];
// eslint-disable-next-line no-restricted-globals

currentTimer = self.setTimeout(run, next.delay);
return;
}
Expand All @@ -726,7 +725,7 @@ export abstract class ARowRenderer {
return;
}
node.remove();
// eslint-disable-next-line no-param-reassign

node.style.transform = '';
this.recycle(node);
});
Expand Down Expand Up @@ -780,7 +779,7 @@ export abstract class ARowRenderer {
};

// next tick such that DOM will be updated
// eslint-disable-next-line no-restricted-globals

currentTimer = self.setTimeout(run, phases[actPhase].delay);
}

Expand Down Expand Up @@ -947,12 +946,12 @@ export default ARowRenderer;
export function setTransform(elem: HTMLElement, x: number | string, y: number | string): void {
const text = `translate(${x}px, ${y}px)`;
const anyElem = elem as { __transform__?: string };
// eslint-disable-next-line no-underscore-dangle

if (anyElem.__transform__ === text) {
return;
}
// eslint-disable-next-line no-underscore-dangle

anyElem.__transform__ = text;
// eslint-disable-next-line no-param-reassign

elem.style.transform = text;
}
4 changes: 1 addition & 3 deletions src/abortAble.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function thenFactory<T>(loader: PromiseLike<T | symbol>, isAborted: () => boolea
): IAbortAblePromiseBase<TResult1 | TResult2> {
const fullfiller = loader.then((loaded) => {
const loadedOrAborted = isAborted() ? ABORTED : loaded;
// eslint-disable-next-line @typescript-eslint/no-explicit-any

const res = onfulfilled ? onfulfilled(loadedOrAborted) : (loadedOrAborted as unknown as any);

if (isPromiseLike(res)) {
Expand Down Expand Up @@ -198,7 +198,6 @@ export function abortAbleAll(values: unknown[]): IAAP<unknown[]> {
const race = Promise.race<unknown | symbol>([aborter, loader]);

return {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
then: thenFactory(race, isAborted, abort) as any,
abort,
isAborted,
Expand Down Expand Up @@ -239,7 +238,6 @@ export function abortAbleResolveNow<T>(value: T): IAAP<T> {
return abortAble(res) as unknown as IAbortAblePromiseBase<TResult1 | TResult2>;
}
return {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
then: abortAbleResolveNow(res as TResult1) as any,
abort: () => undefined,
isAborted: () => false,
Expand Down
3 changes: 1 addition & 2 deletions src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import './style.scss';

export * from '.';

// eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle
declare const __VERSION__: string;
// eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle

declare const __BUILD_ID__: string;

export const version = __VERSION__;
Expand Down
Loading
Loading