learning_ai_common_plat/dashboards/tracker-web/eslint.config.js
saravanakumardb1 2d54795c30 feat(dashboards): migrate admin + tracker dashboards to common-plat as product-agnostic
- Copy admin-dashboard-web → dashboards/admin-web
- Copy tracker-dashboard-web → dashboards/tracker-web
- Update pnpm-workspace.yaml to include dashboards/*
- Replace file: refs with workspace:* for @bytelyst/* packages
- Replace all hardcoded LysnrAI/lysnn.com branding with generic platform refs
- Make telemetry use NEXT_PUBLIC_PRODUCT_ID / PRODUCT_ID env vars
- Update mock credentials, seed data, invitation codes, placeholders
- Update READMEs, e2e tests, unit tests for product-agnostic content
- Both dashboards pass tsc --noEmit clean
2026-02-28 02:17:35 -08:00

104 lines
2.8 KiB
JavaScript

import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import tsparser from '@typescript-eslint/parser';
export default [
{
ignores: [
'dist/**',
'node_modules/**',
'coverage/**',
'*.config.js',
'*.config.ts',
'.next/**',
'out/**',
],
},
js.configs.recommended,
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
parser: tsparser,
parserOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
globals: {
process: 'readonly',
Buffer: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
Headers: 'readonly',
TextEncoder: 'readonly',
TextDecoder: 'readonly',
RequestInit: 'readonly',
HeadersInit: 'readonly',
Response: 'readonly',
Request: 'readonly',
fetch: 'readonly',
console: 'readonly',
performance: 'readonly',
AbortSignal: 'readonly',
expect: 'readonly',
describe: 'readonly',
it: 'readonly',
test: 'readonly',
beforeEach: 'readonly',
afterEach: 'readonly',
beforeAll: 'readonly',
afterAll: 'readonly',
crypto: 'readonly',
localStorage: 'readonly',
sessionStorage: 'readonly',
ReactNode: 'readonly',
React: 'readonly',
JSX: 'readonly',
window: 'readonly',
document: 'readonly',
navigator: 'readonly',
setTimeout: 'readonly',
clearTimeout: 'readonly',
setInterval: 'readonly',
clearInterval: 'readonly',
URL: 'readonly',
URLSearchParams: 'readonly',
confirm: 'readonly',
alert: 'readonly',
HTMLDivElement: 'readonly',
HTMLInputElement: 'readonly',
HTMLButtonElement: 'readonly',
},
},
plugins: {
'@typescript-eslint': tseslint,
},
rules: {
// TypeScript specific rules
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_', caughtErrorsIgnorePattern: '^_' },
],
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'warn',
// General rules
'no-console': 'warn',
'no-debugger': 'error',
'prefer-const': 'error',
'no-var': 'error',
'no-unused-vars': 'off', // Use TypeScript version
// Import rules - disabled for now
// 'sort-imports': ['error', { ignoreDeclarationSort: true }],
},
},
{
files: ['next.config.ts'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-require-imports': 'off',
},
},
];