mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-11 22:56:34 -07:00
81accd8dbe
Lint / Linting Checks (push) Has been cancelled
Release Drafter / Update Release Draft (push) Has been cancelled
Docker CI / Docker Build & Push (push) Has been cancelled
Tests / vitest (1) (push) Has been cancelled
Tests / vitest (2) (push) Has been cancelled
Release Drafter / Auto Label PR (push) Has been cancelled
Tests / vitest (3) (push) Has been cancelled
Tests / vitest (4) (push) Has been cancelled
Co-authored-by: shamoon <4887959+shamoon@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com>
64 lines
1.3 KiB
JavaScript
64 lines
1.3 KiB
JavaScript
import nextCoreWebVitals from "eslint-config-next/core-web-vitals";
|
|
import prettierConfig from "eslint-config-prettier/flat";
|
|
import { defineConfig, globalIgnores } from "eslint/config";
|
|
|
|
export default defineConfig([
|
|
...nextCoreWebVitals,
|
|
prettierConfig,
|
|
{
|
|
files: ["**/*.{js,mjs,cjs,jsx}"],
|
|
|
|
languageOptions: {
|
|
ecmaVersion: 6,
|
|
sourceType: "module",
|
|
|
|
parserOptions: {
|
|
ecmaFeatures: {
|
|
modules: true,
|
|
},
|
|
},
|
|
},
|
|
|
|
settings: {
|
|
"import/resolver": {
|
|
node: {
|
|
paths: ["src"],
|
|
},
|
|
},
|
|
},
|
|
|
|
rules: {
|
|
"import/no-cycle": [
|
|
"error",
|
|
{
|
|
maxDepth: 1,
|
|
},
|
|
],
|
|
|
|
"import/order": [
|
|
"error",
|
|
{
|
|
"newlines-between": "always",
|
|
},
|
|
],
|
|
|
|
"no-else-return": [
|
|
"error",
|
|
{
|
|
allowElseIf: true,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
// Vitest tests often intentionally place imports after `vi.mock(...)` to ensure
|
|
// modules under test see the mocked dependencies. `import/order` can't safely
|
|
// auto-fix those cases, so disable it for test files.
|
|
{
|
|
files: ["src/**/*.test.{js,jsx}", "src/**/*.spec.{js,jsx}"],
|
|
rules: {
|
|
"import/order": "off",
|
|
},
|
|
},
|
|
globalIgnores(["./config/", "./coverage/", "./.venv/", "./.next/", "./site/"]),
|
|
]);
|