mirror of
				https://github.com/lingble/twenty.git
				synced 2025-10-31 04:37:56 +00:00 
			
		
		
		
	Fix docker install (#2925)
* Fix docker install * Move back twenty-eslint-plugin to eslint-plugin-twenty * fix: add bundled yarn * Improve makeifle structure * Update commands and doc * Add pg_graphql binaries * Fix --------- Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
This commit is contained in:
		| @@ -0,0 +1,51 @@ | ||||
| import { RuleTester } from "@typescript-eslint/rule-tester"; | ||||
|  | ||||
| import noStateUseRefRule from "../rules/no-state-useref"; | ||||
|  | ||||
| const ruleTester = new RuleTester({ | ||||
|   parser: "@typescript-eslint/parser", | ||||
|   parserOptions: { | ||||
|     project: "./tsconfig.json", | ||||
|     tsconfigRootDir: __dirname, | ||||
|     ecmaFeatures: { | ||||
|       jsx: true, | ||||
|     }, | ||||
|   }, | ||||
| }); | ||||
|  | ||||
| ruleTester.run("no-state-useref", noStateUseRefRule, { | ||||
|   valid: [ | ||||
|     { | ||||
|       code: "const scrollableRef = useRef<HTMLDivElement>(null);", | ||||
|     }, | ||||
|     { | ||||
|       code: "const ref = useRef<HTMLInputElement>(null);", | ||||
|     }, | ||||
|   ], | ||||
|   invalid: [ | ||||
|     { | ||||
|       code: "const ref = useRef(null);", | ||||
|       errors: [ | ||||
|         { | ||||
|           messageId: "noStateUseRef", | ||||
|         }, | ||||
|       ], | ||||
|     }, | ||||
|     { | ||||
|       code: "const ref = useRef<Boolean>(null);", | ||||
|       errors: [ | ||||
|         { | ||||
|           messageId: "noStateUseRef", | ||||
|         }, | ||||
|       ], | ||||
|     }, | ||||
|     { | ||||
|       code: "const ref = useRef<string>('');", | ||||
|       errors: [ | ||||
|         { | ||||
|           messageId: "noStateUseRef", | ||||
|         }, | ||||
|       ], | ||||
|     }, | ||||
|   ], | ||||
| }); | ||||
		Reference in New Issue
	
	Block a user
	 Charles Bochet
					Charles Bochet