mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-02-13 11:49:33 +01:00
refactor: apply React best practices and migrate to ESLint CLI
- 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)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
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";
|
||||
@@ -10,11 +12,10 @@ const compat = new FlatCompat({
|
||||
});
|
||||
|
||||
const eslintConfig = [
|
||||
...nextTypescript,
|
||||
js.configs.recommended,
|
||||
...compat.extends(
|
||||
"next/core-web-vitals",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
),
|
||||
...nextCoreWebVitals,
|
||||
...compat.extends("plugin:@typescript-eslint/recommended"),
|
||||
{
|
||||
ignores: [
|
||||
"node_modules/",
|
||||
@@ -34,7 +35,7 @@ const eslintConfig = [
|
||||
"prefer-const": "error",
|
||||
"no-unused-vars": "warn",
|
||||
},
|
||||
},
|
||||
}
|
||||
];
|
||||
|
||||
export default eslintConfig;
|
||||
|
||||
Reference in New Issue
Block a user