Skip to content

Commit

Permalink
Migrate to flat config
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXal committed Oct 18, 2024
1 parent 5d1e4c9 commit 72bc26d
Show file tree
Hide file tree
Showing 24 changed files with 1,271 additions and 1,368 deletions.
11 changes: 0 additions & 11 deletions .eslintignore

This file was deleted.

68 changes: 0 additions & 68 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- name: Test build
run: pnpm build
- name: Run ESLint
run: ESLINT_USE_FLAT_CONFIG=false pnpm eslint . --ext .js,.vue,.ts
run: pnpm eslint .
- name: Run VueTSC
run: pnpm vue-tsc
- name: Run Prettier
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lint:
golangci-lint run cmd/... pkg/...
#To fix run: pnpm prettier --write . --loglevel
pnpm prettier --check . --log-level warn
ESLINT_USE_FLAT_CONFIG=false eslint . --ext .js,.vue,.ts
eslint .
vue-tsc


Expand Down
1 change: 0 additions & 1 deletion dashboard/app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ async function initApp() {
await router.isReady().then(() => app.mount("#app"))
}

// eslint-disable-next-line unicorn/prefer-top-level-await
void initApp()
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const aggregationOperatorConfigurator = injectOrError(aggregationOperatorConfigu
const chartStyle = inject(chartStyleKey, chartDefaultStyle)
const measureConfigurator = new PredefinedGroupingMeasureConfigurator(measures, timeRange, chartStyle)
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const dataQueryExecutor = new DataQueryExecutor([...injectOrError(configuratorListKey), aggregationOperatorConfigurator, measureConfigurator])
onMounted(() => {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ function createValueFrom(configurator?: DimensionConfigurator) {
},
set(value) {
if (configurator == null) return
// eslint-disable-next-line vue/no-mutating-props
configurator.selected.value = value == null || value.length === 0 ? null : value
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export class DataQueryExecutor {
function computeCartesian<T>(input: T[][]): T[][] {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line unicorn/no-array-reduce
return input.reduce((a, b) => {
return a.flatMap((d) => b.map((e) => [d, e].flat()))
})
Expand Down
2 changes: 1 addition & 1 deletion dashboard/new-dashboard/src/components/common/dataQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class DataQuery {
// used only for grouped query
aggregator?: string
// cube.js term (group by)
private dimensions?: DataQueryDimension[]
public dimensions?: DataQueryDimension[]

// used only for grouped query
timeDimensionFormat?: string
Expand Down
4 changes: 1 addition & 3 deletions dashboard/new-dashboard/src/components/common/rison.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function doEncode(value: any) {
// typeof for array also object
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-assignment
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
return Array.isArray(value) ? array(value) : (encoders[typeof value](value) as string)
}

Expand Down Expand Up @@ -123,7 +123,5 @@ const encoders = {
* rison-encode a javascript structure
*/
export function encodeRison(v: unknown): string {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
return Array.isArray(v) ? array(v) : object(v)
}
4 changes: 0 additions & 4 deletions dashboard/new-dashboard/src/components/common/zstd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ export function getCompressor(): CompressorUsingDictionary {
return compressor!
}

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
if (import.meta.hot) {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
import.meta.hot.dispose(() => {
if (compressor !== null) {
compressor.dispose()
Expand Down Expand Up @@ -78,9 +76,7 @@ export class CompressorUsingDictionary {
// compute maximum compressed size in worst case single-pass scenario - https://zstd.docsforge.com/dev/api/ZSTD_compressBound/
const uncompressedOffset = malloc(maxUncompressedSize)
try {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const sourceSize = new TextEncoder().encodeInto(s, HEAPU8.subarray(uncompressedOffset, uncompressedOffset + maxUncompressedSize)).written

const maxCompressedSize = compressBound(sourceSize)
const compressedOffset = malloc(maxCompressedSize)
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ const testComparisons = computed(() => filteredProjects.value.map((element) => t
const resultData = ref<TestComparisonTableEntry[]>([]) as Ref<TestComparisonTableEntry[]>
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-member-access
const totalTimeK1 = computed(() => calculateTotalTime((entry) => entry.baselineValue))
// eslint-disable-next-line @typescript-eslint/no-unsafe-return,@typescript-eslint/no-unsafe-member-access
const totalTimeK2 = computed(() => calculateTotalTime((entry) => entry.currentValue))
const totalImprovement = computed(() => (totalTimeK2.value == 0 ? 0 : (totalTimeK1.value - totalTimeK2.value) / totalTimeK2.value))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ export class MeasureConfigurator implements DataQueryConfigurator, ChartConfigur

const selected = selectedRef.value
if (selected != null && selected.length > 0) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const selectedInData = selected.filter((it) => data.includes(it))
if (selectedInData.length > 0) {
filtered = [...new Set([...filtered, ...selectedInData])]
Expand Down
Loading

0 comments on commit 72bc26d

Please sign in to comment.