mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-26 12:58:28 -04:00
69 lines
1.7 KiB
JavaScript
69 lines
1.7 KiB
JavaScript
import { FlatCompat } from "@eslint/eslintrc";
|
|
import js from "@eslint/js";
|
|
import prettierRecommended from "eslint-plugin-prettier/recommended";
|
|
import customConfig from "@jakejarvis/eslint-config";
|
|
import * as mdx from "eslint-plugin-mdx";
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: import.meta.dirname,
|
|
});
|
|
|
|
// eslint-disable-next-line import/no-anonymous-default-export
|
|
export default [
|
|
{ ignores: ["README.md", ".next", ".vercel", "node_modules"] },
|
|
js.configs.recommended,
|
|
...compat.extends("next/core-web-vitals", "next/typescript"),
|
|
prettierRecommended,
|
|
...customConfig,
|
|
{
|
|
rules: {
|
|
"prettier/prettier": [
|
|
"error",
|
|
{},
|
|
{
|
|
usePrettierrc: true,
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
|
|
rules: {
|
|
camelcase: "off",
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"react/no-unescaped-entities": "off",
|
|
"react/jsx-boolean-value": "error",
|
|
|
|
"react/jsx-wrap-multilines": [
|
|
"error",
|
|
{
|
|
arrow: "parens-new-line",
|
|
assignment: "parens-new-line",
|
|
condition: "parens-new-line",
|
|
declaration: "parens-new-line",
|
|
logical: "parens-new-line",
|
|
prop: "ignore",
|
|
return: "parens-new-line",
|
|
},
|
|
],
|
|
},
|
|
},
|
|
{
|
|
...mdx.flat,
|
|
processor: mdx.createRemarkProcessor({
|
|
lintCodeBlocks: false,
|
|
}),
|
|
rules: {
|
|
"mdx/remark": "warn",
|
|
"mdx/code-blocks": "off",
|
|
"react/jsx-no-undef": "off",
|
|
"react/jsx-boolean-value": "off",
|
|
"react/no-unescaped-entities": "off",
|
|
// TODO: skip these correctly
|
|
"max-len": "off",
|
|
semi: "off",
|
|
},
|
|
},
|
|
];
|