From e8f1310acdccb6b17d7f710e720921710353500c Mon Sep 17 00:00:00 2001 From: Igor Bedesqui Date: Tue, 10 Sep 2024 22:47:31 +0100 Subject: [PATCH 1/2] impr(language): add common javascript words, symbols and functions --- .../static/languages/code_javascript.json | 135 +++++++++++++++++- 1 file changed, 134 insertions(+), 1 deletion(-) diff --git a/frontend/static/languages/code_javascript.json b/frontend/static/languages/code_javascript.json index dba7cd5449b9..19f0238700c9 100644 --- a/frontend/static/languages/code_javascript.json +++ b/frontend/static/languages/code_javascript.json @@ -17,6 +17,19 @@ "i++", "${i}", "${j}", + "[]", + "[].map()", + "[].filter()", + "[].reduce()", + "()", + "=>", + "{}", + "\"", + "'", + "`", + "\"\"", + "''", + "``", "label", "switch", "case", @@ -95,6 +108,126 @@ "try", "catch", "throw", - "finally" + "finally", + "{...props}", + "{...attributes}", + "{...children}", + "{...rest}", + "className", + "React.createElement()", + "React.Fragment", + "React.useState()", + "React.useEffect()", + "React.useRef()", + "React.useCallback()", + "React.useMemo()", + "React.useReducer()", + "React.useContext()", + "React.useImperativeHandle()", + "React.forwardRef()", + "React.memo()", + "React.lazy()", + "React.Suspense", + "React.cloneElement()", + "React.isValidElement()", + "React.createContext()", + "React.createRef()", + "React.forwardRef()", + "React.Children", + "React.Component", + "React.Pure", + "useState()", + "useEffect()", + "useRef()", + "useCallback()", + "useMemo()", + "useReducer()", + "useContext()", + "useImperativeHandle()", + "forwardRef()", + "memo()", + "lazy()", + "Suspense", + "cloneElement()", + "isValidElement()", + "createContext()", + "createRef()", + "forwardRef()", + "Children", + "Component", + "Pure", + "createElement()", + "Fragment", + "<>", + "useReducer()", + "useMemo()", + "useCallback()", + "useContext()", + "useRef()", + "useState()", + "useEffect()", + "memo()", + "lazy()", + "cloneElement()", + "isValidElement()", + "createContext()", + "createRef()", + "forwardRef()", + "Children", + "Component", + "Pure", + "createElement()", + "Fragment", + "useReducer()", + "useMemo()", + "useCallback()", + "useContext()", + "useQuery()", + "useMutation()", + "useSubscription()", + "useLazyQuery()", + "useApolloClient()", + "gql()", + "ApolloProvider", + "Query", + "Mutation", + "Subscription", + "LazyQuery", + "getApolloContext()", + "getApolloClient()", + "setContext()", + "setClient()", + "setDefaultOptions()", + "resetDefaultOptions()", + "clearStore()", + "addTypename()", + "removeTypename()", + "makeVar()", + "makeVarWithDefault()", + "makeArrayVar()", + "makeArrayVarWithDefault()", + "makeObjectVar()", + "makeObjectVarWithDefault()", + "watchQuery()", + "query()", + "mutate()", + "subscribeToMore()", + "onError()", + "onCompleted()", + "onNext()", + "updateQuery()", + "updateQueryWithVariables()", + "readQuery()", + "writeQuery()", + "readFragment()", + "writeFragment()", + "createUploadthing", + ".input", + ".middleware", + ".onUploadComplete", + "createRouteHandler", + "callbackUrl", + "uploadthingId", + "uploadthingSecret" ] } From 9d76563cb6bdbdb8fddae5f9a4145d62320c18b6 Mon Sep 17 00:00:00 2001 From: Igor Bedesqui Date: Wed, 11 Sep 2024 12:56:32 +0100 Subject: [PATCH 2/2] remove frontend specific words from js --- .../static/languages/code_javascript.json | 101 ------------------ 1 file changed, 101 deletions(-) diff --git a/frontend/static/languages/code_javascript.json b/frontend/static/languages/code_javascript.json index 19f0238700c9..7698daacdd31 100644 --- a/frontend/static/languages/code_javascript.json +++ b/frontend/static/languages/code_javascript.json @@ -109,109 +109,8 @@ "catch", "throw", "finally", - "{...props}", - "{...attributes}", - "{...children}", - "{...rest}", - "className", - "React.createElement()", - "React.Fragment", - "React.useState()", - "React.useEffect()", - "React.useRef()", - "React.useCallback()", - "React.useMemo()", - "React.useReducer()", - "React.useContext()", - "React.useImperativeHandle()", - "React.forwardRef()", - "React.memo()", - "React.lazy()", - "React.Suspense", - "React.cloneElement()", - "React.isValidElement()", - "React.createContext()", - "React.createRef()", - "React.forwardRef()", - "React.Children", - "React.Component", - "React.Pure", - "useState()", - "useEffect()", - "useRef()", - "useCallback()", - "useMemo()", - "useReducer()", - "useContext()", - "useImperativeHandle()", - "forwardRef()", - "memo()", - "lazy()", - "Suspense", - "cloneElement()", - "isValidElement()", - "createContext()", - "createRef()", - "forwardRef()", - "Children", - "Component", - "Pure", - "createElement()", - "Fragment", - "<>", - "useReducer()", - "useMemo()", - "useCallback()", - "useContext()", - "useRef()", - "useState()", - "useEffect()", - "memo()", - "lazy()", - "cloneElement()", - "isValidElement()", - "createContext()", - "createRef()", - "forwardRef()", - "Children", - "Component", - "Pure", - "createElement()", - "Fragment", - "useReducer()", - "useMemo()", - "useCallback()", - "useContext()", - "useQuery()", - "useMutation()", - "useSubscription()", - "useLazyQuery()", - "useApolloClient()", - "gql()", - "ApolloProvider", - "Query", - "Mutation", - "Subscription", - "LazyQuery", - "getApolloContext()", - "getApolloClient()", - "setContext()", - "setClient()", - "setDefaultOptions()", - "resetDefaultOptions()", - "clearStore()", - "addTypename()", - "removeTypename()", - "makeVar()", - "makeVarWithDefault()", - "makeArrayVar()", - "makeArrayVarWithDefault()", - "makeObjectVar()", - "makeObjectVarWithDefault()", - "watchQuery()", "query()", "mutate()", - "subscribeToMore()", "onError()", "onCompleted()", "onNext()",