diff --git a/.eslintrc.json b/.eslintrc.json index 0a0765e..886a571 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,8 +1,13 @@ { "root": true, - "parser": "babel-eslint", + "parser": "@typescript-eslint/parser", + "plugins": [ + "@typescript-eslint", + "react", + "jsx-a11y", + "jest" + ], "extends": [ - "wordpress", "plugin:react/recommended", "plugin:jsx-a11y/recommended", "plugin:jest/recommended" @@ -26,7 +31,6 @@ "window": true, "document": true }, - "plugins": ["react", "jsx-a11y", "jest"], "settings": { "react": { "pragma": "wp" diff --git a/package.json b/package.json index 9dabf34..112d393 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "@wordpress/block-editor": "^8.0.13", "@wordpress/blocks": "^11.1.5", "@wordpress/i18n": "^4.2.4", + "@wordpress/icons": "^6.1.1", "@wordpress/scripts": "^19.2.2", "classnames": "^2.2.6", "react": "^17.0.2", @@ -45,7 +46,10 @@ "webpack-cli": "^4.9.1" }, "devDependencies": { + "@typescript-eslint/eslint-plugin": "^5.10.0", + "@typescript-eslint/parser": "^5.10.0", "concurrently": "^7.0.0", + "eslint-plugin-jest": "^25.7.0", "prettier": "^2.0.5", "sass": "^1.48.0", "shx": "^0.3.4", diff --git a/src/index.tsx b/src/index.tsx index 73e7d9d..46089e9 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3,7 +3,6 @@ */ import { registerBlockType } from '@wordpress/blocks'; -import { __ } from '@wordpress/i18n'; import { BlockAttributes } from './types'; @@ -15,13 +14,10 @@ import Save from './save'; import CogIcon from './assets/cogicon'; -registerBlockType ( 'cognito-forms/cognito-embed', { +registerBlockType( 'cognito-forms/cognito-embed', { title: 'Cognito Forms', icon: CogIcon, - description: __( - 'Easily build powerful forms.', - 'cognito' - ), + description: 'Easily build powerful forms.', category: 'embed', supports: { // Removes support for an HTML mode. diff --git a/src/save.tsx b/src/save.tsx index 29de951..0d37a9e 100644 --- a/src/save.tsx +++ b/src/save.tsx @@ -16,8 +16,6 @@ const Save: React.FC> = ( { attributes: { formId break; } - console.log(formId); - return (