diff --git a/.eslintrc.yml b/.eslintrc.yml
new file mode 100644
index 00000000..b15fd704
--- /dev/null
+++ b/.eslintrc.yml
@@ -0,0 +1,11 @@
+env:
+ browser: true
+ es2021: true
+extends: plugin:react/recommended
+overrides: []
+parserOptions:
+ ecmaVersion: latest
+ sourceType: module
+plugins:
+ - react
+rules: {}
diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml
index 19b8d3f9..72584d7e 100644
--- a/.github/workflows/eslint.yml
+++ b/.github/workflows/eslint.yml
@@ -26,7 +26,5 @@ jobs:
- uses: actions/checkout@v2
- name: Install packages
run: npm ci
- - name: Prettier
- run: npm run format
- name: Lint
run: npm run lint
diff --git a/package-lock.json b/package-lock.json
index 7ab54875..677f4d75 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -23,6 +23,10 @@
"react-router-dom": "^6.8.1",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
+ },
+ "devDependencies": {
+ "eslint": "^8.37.0",
+ "eslint-plugin-react": "^7.32.2"
}
},
"node_modules/@adobe/css-tools": {
@@ -2143,13 +2147,36 @@
"version": "0.3.0",
"license": "MIT"
},
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz",
+ "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ==",
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
"node_modules/@eslint/eslintrc": {
- "version": "2.0.0",
- "license": "MIT",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
+ "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
"dependencies": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.4.0",
+ "espree": "^9.5.1",
"globals": "^13.19.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -2166,7 +2193,8 @@
},
"node_modules/@eslint/eslintrc/node_modules/globals": {
"version": "13.20.0",
- "license": "MIT",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
+ "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
"dependencies": {
"type-fest": "^0.20.2"
},
@@ -2178,8 +2206,9 @@
}
},
"node_modules/@eslint/js": {
- "version": "8.35.0",
- "license": "MIT",
+ "version": "8.37.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz",
+ "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A==",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
@@ -4207,7 +4236,8 @@
},
"node_modules/acorn-jsx": {
"version": "5.3.2",
- "license": "MIT",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"peerDependencies": {
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
}
@@ -6269,11 +6299,14 @@
}
},
"node_modules/eslint": {
- "version": "8.35.0",
- "license": "MIT",
- "dependencies": {
- "@eslint/eslintrc": "^2.0.0",
- "@eslint/js": "8.35.0",
+ "version": "8.37.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz",
+ "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==",
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.4.0",
+ "@eslint/eslintrc": "^2.0.2",
+ "@eslint/js": "8.37.0",
"@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -6284,9 +6317,8 @@
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1",
- "eslint-utils": "^3.0.0",
- "eslint-visitor-keys": "^3.3.0",
- "espree": "^9.4.0",
+ "eslint-visitor-keys": "^3.4.0",
+ "espree": "^9.5.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -6308,7 +6340,6 @@
"minimatch": "^3.1.2",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",
- "regexpp": "^3.2.0",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
"text-table": "^0.2.0"
@@ -6489,7 +6520,8 @@
},
"node_modules/eslint-plugin-react": {
"version": "7.32.2",
- "license": "MIT",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz",
+ "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==",
"dependencies": {
"array-includes": "^3.1.6",
"array.prototype.flatmap": "^1.3.1",
@@ -6595,10 +6627,14 @@
}
},
"node_modules/eslint-visitor-keys": {
- "version": "3.3.0",
- "license": "Apache-2.0",
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz",
+ "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ==",
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint-webpack-plugin": {
@@ -6693,12 +6729,13 @@
}
},
"node_modules/espree": {
- "version": "9.4.1",
- "license": "BSD-2-Clause",
+ "version": "9.5.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz",
+ "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==",
"dependencies": {
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.3.0"
+ "eslint-visitor-keys": "^3.4.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -15397,12 +15434,27 @@
"@emotion/weak-memoize": {
"version": "0.3.0"
},
+ "@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "requires": {
+ "eslint-visitor-keys": "^3.3.0"
+ }
+ },
+ "@eslint-community/regexpp": {
+ "version": "4.5.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.0.tgz",
+ "integrity": "sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ=="
+ },
"@eslint/eslintrc": {
- "version": "2.0.0",
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.2.tgz",
+ "integrity": "sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ==",
"requires": {
"ajv": "^6.12.4",
"debug": "^4.3.2",
- "espree": "^9.4.0",
+ "espree": "^9.5.1",
"globals": "^13.19.0",
"ignore": "^5.2.0",
"import-fresh": "^3.2.1",
@@ -15413,6 +15465,8 @@
"dependencies": {
"globals": {
"version": "13.20.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz",
+ "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==",
"requires": {
"type-fest": "^0.20.2"
}
@@ -15420,7 +15474,9 @@
}
},
"@eslint/js": {
- "version": "8.35.0"
+ "version": "8.37.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.37.0.tgz",
+ "integrity": "sha512-x5vzdtOOGgFVDCUs81QRB2+liax8rFg3+7hqM+QhBG0/G3F1ZsoYl97UrqgHgQ9KKT7G6c4V+aTUCgu/n22v1A=="
},
"@humanwhocodes/config-array": {
"version": "0.11.8",
@@ -16656,6 +16712,8 @@
},
"acorn-jsx": {
"version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
"requires": {}
},
"acorn-node": {
@@ -17899,10 +17957,14 @@
}
},
"eslint": {
- "version": "8.35.0",
- "requires": {
- "@eslint/eslintrc": "^2.0.0",
- "@eslint/js": "8.35.0",
+ "version": "8.37.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.37.0.tgz",
+ "integrity": "sha512-NU3Ps9nI05GUoVMxcZx1J8CNR6xOvUT4jAUMH5+z8lpp3aEdPVCImKw6PWG4PY+Vfkpr+jvMpxs/qoE7wq0sPw==",
+ "requires": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.4.0",
+ "@eslint/eslintrc": "^2.0.2",
+ "@eslint/js": "8.37.0",
"@humanwhocodes/config-array": "^0.11.8",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
@@ -17913,9 +17975,8 @@
"doctrine": "^3.0.0",
"escape-string-regexp": "^4.0.0",
"eslint-scope": "^7.1.1",
- "eslint-utils": "^3.0.0",
- "eslint-visitor-keys": "^3.3.0",
- "espree": "^9.4.0",
+ "eslint-visitor-keys": "^3.4.0",
+ "espree": "^9.5.1",
"esquery": "^1.4.2",
"esutils": "^2.0.2",
"fast-deep-equal": "^3.1.3",
@@ -17937,7 +17998,6 @@
"minimatch": "^3.1.2",
"natural-compare": "^1.4.0",
"optionator": "^0.9.1",
- "regexpp": "^3.2.0",
"strip-ansi": "^6.0.1",
"strip-json-comments": "^3.1.0",
"text-table": "^0.2.0"
@@ -18083,6 +18143,8 @@
},
"eslint-plugin-react": {
"version": "7.32.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.32.2.tgz",
+ "integrity": "sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==",
"requires": {
"array-includes": "^3.1.6",
"array.prototype.flatmap": "^1.3.1",
@@ -18145,7 +18207,9 @@
}
},
"eslint-visitor-keys": {
- "version": "3.3.0"
+ "version": "3.4.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz",
+ "integrity": "sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ=="
},
"eslint-webpack-plugin": {
"version": "3.2.0",
@@ -18174,11 +18238,13 @@
}
},
"espree": {
- "version": "9.4.1",
+ "version": "9.5.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.1.tgz",
+ "integrity": "sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg==",
"requires": {
"acorn": "^8.8.0",
"acorn-jsx": "^5.3.2",
- "eslint-visitor-keys": "^3.3.0"
+ "eslint-visitor-keys": "^3.4.0"
}
},
"esprima": {
diff --git a/package.json b/package.json
index 4fb00d2e..dc5ebb97 100644
--- a/package.json
+++ b/package.json
@@ -23,7 +23,8 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
- "eject": "react-scripts eject"
+ "eject": "react-scripts eject",
+ "lint": "eslint ."
},
"eslintConfig": {
"extends": [
@@ -47,5 +48,9 @@
"transformIgnorePatterns": [
"/node_modules/(?!(axios|react-day-picker)/)"
]
+ },
+ "devDependencies": {
+ "eslint": "^8.37.0",
+ "eslint-plugin-react": "^7.32.2"
}
}
diff --git a/src/components/CodeEditorWindow/index.js b/src/components/CodeEditorWindow/index.js
index 9742d8f5..1319df19 100644
--- a/src/components/CodeEditorWindow/index.js
+++ b/src/components/CodeEditorWindow/index.js
@@ -1,3 +1,4 @@
+/* eslint-disable react/prop-types */
import React, { useState, useRef } from "react";
import Editor from "@monaco-editor/react";
import { Rules, options, btnconfig, GetCodeBlocks, selectBlock } from "./config/Rules"
diff --git a/src/components/Logo.js b/src/components/Logo.js
index 7a207e63..a2c28e8c 100644
--- a/src/components/Logo.js
+++ b/src/components/Logo.js
@@ -1,6 +1,6 @@
import React from 'react';
-export const Logo = (props: any) => {
+export const Logo = (props) => {
return (
);
diff --git a/src/components/ResultEditorWindow/index.js b/src/components/ResultEditorWindow/index.js
index 9e063c93..922438b4 100644
--- a/src/components/ResultEditorWindow/index.js
+++ b/src/components/ResultEditorWindow/index.js
@@ -1,3 +1,4 @@
+/* eslint-disable react/prop-types */
import React from "react";
import Editor from "@monaco-editor/react";
diff --git a/src/components/Sidebar.js b/src/components/Sidebar.js
index a24d6d57..b5b150b0 100644
--- a/src/components/Sidebar.js
+++ b/src/components/Sidebar.js
@@ -1,3 +1,4 @@
+/* eslint-disable react/prop-types */
import React from "react";
import { Link } from 'react-router-dom';
import { Divider, Drawer, Grid, List, ListItemButton, ListItemIcon, ListItemText } from "@mui/material";
diff --git a/src/routes.js b/src/routes.js
index f7fea766..bbc5a00d 100644
--- a/src/routes.js
+++ b/src/routes.js
@@ -1,17 +1,17 @@
-
+import React from 'react';
import Home from './pages/Home';
-import Console from './pages/Console'
+import Console from './pages/Console'
import Collections from './pages/Collections'
import Collection from './pages/Collection'
const routes = () => [
{
path: '/',
- element:,
+ element: ,
children: [
- {path: '/console', element: },
- {path: '/collections', element: },
- {path: '/collections/:collectionName', element: }
+ { path: '/console', element: },
+ { path: '/collections', element: },
+ { path: '/collections/:collectionName', element: }
]
}
];