kevinmcaleer_obsidian-bases.../eslint.config.mjs
Kevin McAleer 1d4568e8a6 Address Obsidian plugin review feedback
- Rename command ID from 'insert-bases-chart' to 'insert-chart' (no plugin prefix)
- Rename command name from 'Insert bases chart' to 'Insert chart' (no plugin name)
- Remove async from onload (no await expressions)
- Replace all inline element.style.X with CSS classes and custom properties
  - is-hidden utility class replaces style.display = 'none'
  - --bases-chart-height for chart container sizing
  - --bases-chart-chip-color for color chip backgrounds
  - --bases-chart-cell-color for calendar cell colors
  - --bases-chart-month-left for calendar month label positioning
- Replace all 'any' types with proper types (SortField, SortDirection, AggregateType, DataLabelsContext, ChartJsType, CachedMetadata, Record<string, unknown>)
- Fix stringification issues — add stringifyValue() and toNumber() helpers to handle arrays and avoid '[object Object]' output
- Handle unawaited promises with void operator
- Remove unused imports (TFile from baseParser and dataQuery, FilterGroup from dataQuery)
- Use sentence case in UI text (SQL Query → SQL query)
- Add eslint config for local validation
2026-04-16 20:11:50 +01:00

23 lines
555 B
JavaScript

import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
export default [
{
files: ['src/**/*.ts'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'no-unused-vars': 'off',
},
},
];