fix: linting issues and rule changes (#5681)

* fix: lint config package updates

* fix: tsconfig changes

* fix: lint config setup

* fix: lint errors and adding new rules

* fix: lint errors

* fix: ui and editor lints

* fix: build error

* fix: editor tsconfig

* fix: lint errors

* fix: types fixes

---------

Co-authored-by: Anmol Singh Bhatia <anmolsinghbhatia@plane.so>
Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
This commit is contained in:
sriram veeraghanta 2024-09-23 17:10:38 +05:30 committed by GitHub
parent e143e0a051
commit 83bfca6f2d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
75 changed files with 1583 additions and 2631 deletions

View file

@ -1,52 +1,10 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
root: true,
extends: ["custom"],
extends: ["@plane/eslint-config/next.js"],
parser: "@typescript-eslint/parser",
settings: {
"import/resolver": {
typescript: {},
node: {
moduleDirectory: ["node_modules", "."],
},
},
},
rules: {
"import/order": [
"error",
{
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",
}
],
pathGroupsExcludedImportTypes: ["builtin", "internal", "react"],
alphabetize: {
order: "asc",
caseInsensitive: true,
},
},
],
parserOptions: {
project: true,
},
rules: {},
};

View file

@ -6,7 +6,7 @@ import { cn } from "@/helpers/common.helper";
// hooks
import { useMention } from "@/hooks/use-mention";
interface LiteTextReadOnlyEditorWrapperProps extends Omit<ILiteTextReadOnlyEditor, "mentionHandler"> {}
type LiteTextReadOnlyEditorWrapperProps = Omit<ILiteTextReadOnlyEditor, "mentionHandler">;
export const LiteTextReadOnlyEditor = React.forwardRef<EditorReadOnlyRefApi, LiteTextReadOnlyEditorWrapperProps>(
({ ...props }, ref) => {

View file

@ -6,7 +6,7 @@ import { cn } from "@/helpers/common.helper";
// hooks
import { useMention } from "@/hooks/use-mention";
interface RichTextReadOnlyEditorWrapperProps extends Omit<IRichTextReadOnlyEditor, "mentionHandler"> {}
type RichTextReadOnlyEditorWrapperProps = Omit<IRichTextReadOnlyEditor, "mentionHandler">;
export const RichTextReadOnlyEditor = React.forwardRef<EditorReadOnlyRefApi, RichTextReadOnlyEditorWrapperProps>(
({ ...props }, ref) => {

View file

@ -7,7 +7,8 @@
"develop": "next dev -p 3002",
"build": "next build",
"start": "next start",
"lint": "next lint",
"lint": "eslint . --ext .ts,.tsx",
"lint:errors": "eslint . --ext .ts,.tsx --quiet",
"export": "next export"
},
"dependencies": {
@ -58,9 +59,9 @@
"@types/uuid": "^9.0.1",
"@types/zxcvbn": "^4.4.4",
"@typescript-eslint/eslint-plugin": "^5.48.2",
"eslint-config-custom": "*",
"@plane/eslint-config": "*",
"tailwind-config-custom": "*",
"tsconfig": "*",
"typescript": "5.4.5"
"@plane/typescript-config": "*",
"typescript": "5.3.3"
}
}

View file

@ -1,5 +1,5 @@
{
"extends": "tsconfig/nextjs.json",
"extends": "@plane/typescript-config/nextjs.json",
"plugins": [
{
"name": "next"