mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
* chore: fix lint * fix: constants check:lint command * chore(lint): permit unused vars which begin w/ _ * chore: rm dead code * fix(lint): more lint fixes to constants pkg * fix(lint): lint the live server - fix lint issues * chore: improve clean script * fix(lint): more lint * chore: set live server process title * chore(deps): update to turbo@2.5.5 * chore(live): target node22 * fix(dev): add missing ui pkg dependency * fix(dev): lint decorators * fix(dev): lint space app * fix(dev): address lint issues in types pkg * fix(dev): lint editor pkg * chore(dev): moar lint * fix(dev): live server exit code * chore: address PR feedback * fix(lint): better TPageExtended type * chore: refactor * chore: revert most live server changes * fix: few more lint issues * chore: enable ci checks Ensure we can build + confirm that lint is not getting worse. * chore: address PR feedback * fix: web lint warning added to package.json * fix: ci:lint command --------- Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
81 lines
2.2 KiB
JavaScript
81 lines
2.2 KiB
JavaScript
const { resolve } = require("node:path");
|
|
|
|
const project = resolve(process.cwd(), "tsconfig.json");
|
|
|
|
/** @type {import("eslint").Linter.Config} */
|
|
module.exports = {
|
|
extends: ["prettier", "plugin:@typescript-eslint/recommended"],
|
|
plugins: ["react", "react-hooks", "@typescript-eslint", "import"],
|
|
globals: {
|
|
React: true,
|
|
JSX: true,
|
|
},
|
|
env: {
|
|
node: true,
|
|
browser: true,
|
|
},
|
|
settings: {
|
|
"import/resolver": {
|
|
typescript: {
|
|
project,
|
|
},
|
|
},
|
|
},
|
|
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",
|
|
"@typescript-eslint/no-unused-vars": [
|
|
"warn",
|
|
{
|
|
"argsIgnorePattern": "^_",
|
|
"varsIgnorePattern": "^_",
|
|
"caughtErrorsIgnorePattern": "^_"
|
|
}
|
|
],
|
|
"@typescript-eslint/no-explicit-any": "warn",
|
|
"@typescript-eslint/no-useless-empty-export": "error",
|
|
"@typescript-eslint/prefer-ts-expect-error": "warn",
|
|
"import/order": [
|
|
"warn",
|
|
{
|
|
groups: ["builtin", "external", "internal", "parent", "sibling"],
|
|
pathGroups: [
|
|
{
|
|
pattern: "@plane/**",
|
|
group: "external",
|
|
position: "after",
|
|
},
|
|
{
|
|
pattern: "@/**",
|
|
group: "internal",
|
|
position: "before",
|
|
},
|
|
],
|
|
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
|
|
alphabetize: {
|
|
order: "asc",
|
|
caseInsensitive: true,
|
|
},
|
|
},
|
|
],
|
|
},
|
|
|
|
ignorePatterns: [".*.js", "node_modules/", "dist/"],
|
|
};
|