diff --git a/packages/stateless/components/inputs/CodeMirrorInput.tsx b/packages/stateless/components/inputs/CodeMirrorInput.tsx index ee1e63964..e46cbdb73 100644 --- a/packages/stateless/components/inputs/CodeMirrorInput.tsx +++ b/packages/stateless/components/inputs/CodeMirrorInput.tsx @@ -2,7 +2,6 @@ import 'codemirror/lib/codemirror.css' import 'codemirror/theme/material.css' import clsx from 'clsx' -import { EditorConfiguration } from 'codemirror' import dynamic from 'next/dynamic' import { Control, @@ -61,7 +60,7 @@ export function CodeMirrorInput>({ const editorTheme = themeContext.theme !== 'dark' ? 'default' : 'material-ocean' - const cmOptions: EditorConfiguration = { + const cmOptions = { mode: { name: 'javascript', json: true, @@ -69,8 +68,10 @@ export function CodeMirrorInput>({ theme: editorTheme, lineNumbers: false, lineWrapping: true, + autoCloseBrackets: false, tabSize: 2, gutters: ['CodeMirror-lint-markers'], + lint: true, readOnly, } diff --git a/packages/stateless/package.json b/packages/stateless/package.json index 4bb8ae61b..f9bd617e1 100644 --- a/packages/stateless/package.json +++ b/packages/stateless/package.json @@ -50,7 +50,6 @@ "@cosmos-kit/core": "^2.13.1", "@dao-dao/config": "2.5.0-rc.3", "@storybook/react": "^6.5.10", - "@types/codemirror": "^5.60.15", "@types/lodash.clonedeep": "^4.5.0", "@types/react": "^17.0.37", "@types/react-csv": "^1.1.3", diff --git a/yarn.lock b/yarn.lock index d35930102..a51bfe01f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8809,13 +8809,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/codemirror@^5.60.15": - version "5.60.15" - resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.15.tgz#0f82be6f4126d1e59cf4c4830e56dcd49d3c3e8a" - integrity sha512-dTOvwEQ+ouKJ/rE9LT1Ue2hmP6H1mZv5+CCnNWu2qtiOe2LQa9lCprEY20HxiDmV/Bxh+dXjywmy5aKvoGjULA== - dependencies: - "@types/tern" "*" - "@types/connect@^3.4.33": version "3.4.38" resolved "https://registry.yarnpkg.com/@types/connect/-/connect-3.4.38.tgz#5ba7f3bc4fbbdeaff8dded952e5ff2cc53f8d858" @@ -9278,13 +9271,6 @@ resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.8.tgz#b94a4391c85666c7b73299fd3ad79d4faa435310" integrity sha512-ipixuVrh2OdNmauvtT51o3d8z12p6LtFW9in7U79der/kwejjdNchQC5UMn5u/KxNoM7VHHOs/l8KS8uHxhODQ== -"@types/tern@*": - version "0.23.9" - resolved "https://registry.yarnpkg.com/@types/tern/-/tern-0.23.9.tgz#6f6093a4a9af3e6bb8dde528e024924d196b367c" - integrity sha512-ypzHFE/wBzh+BlH6rrBgS5I/Z7RD21pGhZ2rltb/+ZrVM1awdZwjx7hE5XfuYgHWk9uvV5HLZN3SloevCAp3Bw== - dependencies: - "@types/estree" "*" - "@types/triple-beam@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/triple-beam/-/triple-beam-1.3.2.tgz#38ecb64f01aa0d02b7c8f4222d7c38af6316fef8"