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

restores previous styling and fixes base lint errors #20

Open
wants to merge 1 commit into
base: mikellewade/vite
Choose a base branch
from
Open
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
20 changes: 15 additions & 5 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,24 @@ export default [{
allowConstantExport: true,
}],

semi: ["warn", "always"],
"comma-dangle": ["warn", "only-multiline"],

"max-len": [1, 120, 2, { "ignoreComments": true }],
"no-console": "off",
quotes: ["error", "single", {
allowTemplateLiterals: true,
avoidEscape: true,
}],

camelcase: "error",
},
"camelcase": ["error", {"properties": "always"}],
"semi": ["warn", "always"],
"comma-dangle": ["warn", "only-multiline"],
"dot-notation": "warn",
"space-before-function-paren": "off",
"indent": ["warn", 2],
"padded-blocks": "warn",
"no-trailing-spaces": "warn",
"array-bracket-spacing": "warn",
"no-multi-spaces": ["error", { "ignoreEOLComments": true }],
"padded-blocks": ["error", "never"],
"no-var": "error",
},
}];
1 change: 0 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import TaskList from './components/TaskList.jsx';
import './App.css';

Expand Down
1 change: 0 additions & 1 deletion src/App.test.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import App from './App';

Expand Down
2 changes: 1 addition & 1 deletion src/components/Task.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';
import PropTypes from 'prop-types';

import './Task.css';
Expand Down
18 changes: 9 additions & 9 deletions src/components/Task.test.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import { vi } from 'vitest';
import Task from './Task';

describe('Task', () => {
Expand All @@ -10,8 +10,8 @@ describe('Task', () => {
id={1}
title={'Test Title'}
isComplete={true}
onClickCallback={() => {}}
onDeleteCallback={() => {}}
onClickCallback={() => { }}
onDeleteCallback={() => { }}
/>
);

Expand All @@ -21,8 +21,8 @@ describe('Task', () => {

test.skip('Runs callbacks when buttons clicked', () => {
// Arrange
const clickCallback = jest.fn();
const deleteCallback = jest.fn();
const clickCallback = vi.fn();
const deleteCallback = vi.fn();

// Act
render(
Expand Down Expand Up @@ -53,8 +53,8 @@ describe('Task', () => {
id={1}
title={'Test Title'}
isComplete={true}
onClickCallback={() => {}}
onDeleteCallback={() => {}}
onClickCallback={() => { }}
onDeleteCallback={() => { }}
/>
);

Expand All @@ -70,8 +70,8 @@ describe('Task', () => {
id={1}
title={'Test Title'}
isComplete={false}
onClickCallback={() => {}}
onDeleteCallback={() => {}}
onClickCallback={() => { }}
onDeleteCallback={() => { }}
/>
);

Expand Down
1 change: 0 additions & 1 deletion src/components/TaskList.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import PropTypes from 'prop-types';
import Task from './Task.jsx';
import './TaskList.css';
Expand Down
1 change: 0 additions & 1 deletion src/components/TaskList.test.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import TaskList from './TaskList';

Expand Down
2 changes: 2 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import url('./legacy/foundation.css');

body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
Expand Down
67 changes: 67 additions & 0 deletions src/legacy/foundation.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
blockquote, dd, div, dl, dt, form, h1, h2, h3, h4, h5, h6, li, ol, p, pre, td, th, ul {
margin: 0;
padding: 0;
}

dl, ol, ul {
margin-bottom: 1rem;
list-style-position: outside;
line-height: 1.6;
}

button, input, optgroup, select, textarea {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
margin: 0;
}

button {
padding: 0;
appearance: none;
border: 0;
border-radius: 0;
background: 0 0;
line-height: 1;
cursor: auto;
}

.button {
display: inline-block;
vertical-align: middle;
margin: 0 0 1rem 0;
padding: .85em 1em;
border: 1px solid transparent;
border-radius: 0;
transition: background-color .25s ease-out,color .25s ease-out;
font-family: inherit;
font-size: .9rem;
line-height: 1;
text-align: center;
cursor: pointer;
}

.button, .button.disabled, .button.disabled:focus, .button.disabled:hover, .button[disabled], .button[disabled]:focus, .button[disabled]:hover {
background-color: #1779ba;
color: #fefefe;
}

.button:focus, .button:hover {
background-color: #14679e;
color: #fefefe;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
font-family: "Helvetica Neue",Helvetica,Roboto,Arial,sans-serif;
font-style: normal;
font-weight: 400;
color: inherit;
text-rendering: optimizeLegibility;
}

.h1, h1 {
font-size: 1.5rem;
line-height: 1.4;
margin-top: 0;
margin-bottom: .5rem;
}