2024-09-23 17:10:38 +05:30
|
|
|
const { resolve } = require("node:path");
|
|
|
|
|
const project = resolve(process.cwd(), "tsconfig.json");
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
extends: ["next", "prettier", "plugin:@typescript-eslint/recommended"],
|
|
|
|
|
globals: {
|
|
|
|
|
React: "readonly",
|
|
|
|
|
JSX: "readonly",
|
|
|
|
|
},
|
|
|
|
|
env: {
|
|
|
|
|
node: true,
|
|
|
|
|
browser: true,
|
|
|
|
|
},
|
|
|
|
|
plugins: ["react", "@typescript-eslint", "import"],
|
|
|
|
|
settings: {
|
|
|
|
|
"import/resolver": {
|
|
|
|
|
typescript: {
|
|
|
|
|
project,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
ignorePatterns: [".*.js", "node_modules/"],
|
|
|
|
|
rules: {
|
|
|
|
|
"no-useless-escape": "off",
|
|
|
|
|
"prefer-const": "error",
|
|
|
|
|
"no-irregular-whitespace": "error",
|
|
|
|
|
"no-trailing-spaces": "error",
|
|
|
|
|
"no-duplicate-imports": "error",
|
|
|
|
|
"no-useless-catch": "warn",
|
|
|
|
|
"no-case-declarations": "error",
|
|
|
|
|
"no-undef": "error",
|
|
|
|
|
"no-unreachable": "error",
|
|
|
|
|
"arrow-body-style": ["error", "as-needed"],
|
|
|
|
|
"@next/next/no-html-link-for-pages": "off",
|
|
|
|
|
"@next/next/no-img-element": "off",
|
|
|
|
|
"react/jsx-key": "error",
|
|
|
|
|
"react/self-closing-comp": ["error", { component: true, html: true }],
|
|
|
|
|
"react/jsx-boolean-value": "error",
|
|
|
|
|
"react/jsx-no-duplicate-props": "error",
|
|
|
|
|
"react-hooks/exhaustive-deps": "warn",
|
|
|
|
|
"@typescript-eslint/no-unused-expressions": "warn",
|
2025-07-24 13:14:51 -07:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
|
"warn",
|
|
|
|
|
{
|
|
|
|
|
"argsIgnorePattern": "^_",
|
|
|
|
|
"varsIgnorePattern": "^_",
|
|
|
|
|
"caughtErrorsIgnorePattern": "^_"
|
|
|
|
|
}
|
|
|
|
|
],
|
2024-09-23 17:10:38 +05:30
|
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
|
|
|
"@typescript-eslint/no-useless-empty-export": "error",
|
|
|
|
|
"@typescript-eslint/prefer-ts-expect-error": "warn",
|
|
|
|
|
"@typescript-eslint/naming-convention": [
|
|
|
|
|
"warn",
|
|
|
|
|
{
|
|
|
|
|
selector: "variable",
|
|
|
|
|
format: ["camelCase", "snake_case", "UPPER_CASE", "PascalCase"],
|
|
|
|
|
leadingUnderscore: "allow",
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
"import/order": [
|
2025-07-02 19:43:44 +05:30
|
|
|
"warn",
|
2024-09-23 17:10:38 +05:30
|
|
|
{
|
|
|
|
|
groups: ["builtin", "external", "internal", "parent", "sibling"],
|
|
|
|
|
pathGroups: [
|
|
|
|
|
{
|
|
|
|
|
pattern: "react",
|
|
|
|
|
group: "external",
|
|
|
|
|
position: "before",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
pattern: "lucide-react",
|
|
|
|
|
group: "external",
|
|
|
|
|
position: "after",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
pattern: "@headlessui/**",
|
|
|
|
|
group: "external",
|
|
|
|
|
position: "after",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
pattern: "@plane/**",
|
|
|
|
|
group: "external",
|
|
|
|
|
position: "after",
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
pattern: "@/**",
|
|
|
|
|
group: "internal",
|
|
|
|
|
},
|
2025-07-02 19:43:44 +05:30
|
|
|
{
|
|
|
|
|
pattern: "public/**",
|
|
|
|
|
group: "internal",
|
|
|
|
|
position: "after",
|
|
|
|
|
},
|
2024-09-23 17:10:38 +05:30
|
|
|
],
|
|
|
|
|
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
|
|
|
|
|
alphabetize: {
|
|
|
|
|
order: "asc",
|
|
|
|
|
caseInsensitive: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
};
|