mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-02-13 13:55:42 +01:00
- Dynamic import for WordCloud component (code splitting) - Fix waterfall in handleRefresh with Promise.all - Memoize data prep functions in overview page (7 useMemo hooks) - Replace useState+useEffect with useMemo in CountryDisplay/LanguageDisplay - Memoize navigationCards and class getters in dashboard page - Extract inline handlers with useCallback - Fix missing index parameter in TopQuestionsChart map - Migrate from next lint to ESLint CLI (Next.js 16 deprecation)
42 lines
1.0 KiB
JavaScript
42 lines
1.0 KiB
JavaScript
import nextTypescript from "eslint-config-next/typescript";
|
|
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
import { FlatCompat } from "@eslint/eslintrc";
|
|
import js from "@eslint/js";
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
});
|
|
|
|
const eslintConfig = [
|
|
...nextTypescript,
|
|
js.configs.recommended,
|
|
...nextCoreWebVitals,
|
|
...compat.extends("plugin:@typescript-eslint/recommended"),
|
|
{
|
|
ignores: [
|
|
"node_modules/",
|
|
".next/",
|
|
".vscode/",
|
|
"out/",
|
|
"build/",
|
|
"dist/",
|
|
"coverage/",
|
|
],
|
|
rules: {
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-unused-vars": "warn",
|
|
"react/no-unescaped-entities": "warn",
|
|
"no-console": "off",
|
|
"no-trailing-spaces": "warn",
|
|
"prefer-const": "error",
|
|
"no-unused-vars": "warn",
|
|
},
|
|
}
|
|
];
|
|
|
|
export default eslintConfig;
|