Skip to content

Commit

Permalink
Add eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
nawed2611 committed Mar 30, 2023
1 parent c3f8ca6 commit 98f0420
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 46 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
env:
browser: true
es2021: true
extends: plugin:react/recommended
overrides: []
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- react
rules: {}
2 changes: 0 additions & 2 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
138 changes: 102 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand All @@ -47,5 +48,9 @@
"transformIgnorePatterns": [
"/node_modules/(?!(axios|react-day-picker)/)"
]
},
"devDependencies": {
"eslint": "^8.37.0",
"eslint-plugin-react": "^7.32.2"
}
}
1 change: 1 addition & 0 deletions src/components/CodeEditorWindow/index.js
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Logo.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';

export const Logo = (props: any) => {
export const Logo = (props) => {
return (
<img src='/logo.png' alt='logo' width='100px' />
);
Expand Down
1 change: 1 addition & 0 deletions src/components/ResultEditorWindow/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable react/prop-types */
import React from "react";

import Editor from "@monaco-editor/react";
Expand Down
1 change: 1 addition & 0 deletions src/components/Sidebar.js
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
12 changes: 6 additions & 6 deletions src/routes.js
Original file line number Diff line number Diff line change
@@ -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:<Home/>,
element: <Home />,
children: [
{path: '/console', element: <Console /> },
{path: '/collections', element: <Collections />},
{path: '/collections/:collectionName', element: <Collection />}
{ path: '/console', element: <Console /> },
{ path: '/collections', element: <Collections /> },
{ path: '/collections/:collectionName', element: <Collection /> }
]
}
];
Expand Down

0 comments on commit 98f0420

Please sign in to comment.