Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

explorer-client: improve linting rules #506

Merged
merged 2 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions explorer/client/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module.exports = {
extends: ['react-app', 'react-app/jest', 'prettier'],
rules: {
'react/jsx-no-bind': ['error'],
'import/order': [
'warn',
{
Expand All @@ -9,10 +10,19 @@ module.exports = {
['internal', 'parent', 'sibling', 'index'],
'type',
],
pathGroups: [
{
pattern: '{.,..}/**/*.css',
group: 'type',
position: 'after',
},
],
'newlines-between': 'always',
alphabetize: { order: 'asc' },
warnOnUnassignedImports: true,
},
],
'import/no-duplicates': ['error'],
'@typescript-eslint/consistent-type-imports': [
'error',
{
Expand Down
1 change: 1 addition & 0 deletions explorer/client/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Footer from '../components/footer/Footer';
import Header from '../components/header/Header';
import Search from '../components/search/Search';
import AppRoutes from '../pages/config/AppRoutes';

import styles from './App.module.css';

function App() {
Expand Down
1 change: 1 addition & 0 deletions explorer/client/src/components/footer/Footer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Link } from 'react-router-dom';

import ExternalLink from '../external-link/ExternalLink';

import styles from './Footer.module.css';

function Footer() {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion explorer/client/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { BrowserRouter as Router } from 'react-router-dom';
import App from './app/App';
import reportWebVitals from './utils/reportWebVitals';

import './index.scss';
import './index.css';

ReactDOM.render(
<React.StrictMode>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useParams } from 'react-router-dom';

import mockTransactionData from '../../utils/transaction_mock.json';

import styles from './TransactionResult.module.css';

type DataType = {
Expand Down