Skip to content

Commit

Permalink
Big code cleanup 2 years later
Browse files Browse the repository at this point in the history
  • Loading branch information
TowhidKashem committed Mar 12, 2022
1 parent dbb30bd commit 2c81707
Show file tree
Hide file tree
Showing 152 changed files with 6,239 additions and 5,539 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = off
2 changes: 2 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
EXTEND_ESLINT=true
REACT_APP_MAP_BOX_API_KEY=REPLACE_WITH_API_KEY
1 change: 0 additions & 1 deletion .env.sample

This file was deleted.

1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: ['react-app'],
rules: {},
ignorePatterns: ['/public/filters/src/*.js'],
overrides: [
{
files: ['**/*.ts?(x)'],
rules: {
'react-hooks/exhaustive-deps': 'off'
}
}
]
};
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build/

# misc
.DS_Store
.env
# .env # uncommented for demo purposes
.env.local
.env.development.local
.env.test.local
Expand Down
17 changes: 0 additions & 17 deletions .prettierrc

This file was deleted.

17 changes: 17 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
printWidth: 90,
tabWidth: 2,
useTabs: false,
semi: true,
quoteProps: 'as-needed',
jsxSingleQuote: false,
jsxBracketSameLine: false,
trailingComma: 'none',
bracketSpacing: true,
requirePragma: false,
insertPragma: false,
singleQuote: true,
arrowParens: 'always',
endOfLine: 'lf',
htmlWhitespaceSensitivity: 'strict'
};
22 changes: 10 additions & 12 deletions .storybook/storybook.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,26 @@ body {
}
}

.pod {
&.action-item {
width: 400px;
.menu-item {
width: 400px;

.btn {
.icon {
font-size: inherit;
}
.btn {
.icon {
font-size: inherit;
}
}
}

&.spotlight,
&.user {
width: 190px;
}
.card,
.user-card {
width: 190px;
}

.skeleton-frame {
width: 200px;
}

.widget {
.section {
> header,
p {
color: $color-white;
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,11 @@
>
</li>
<li>
Rename the <code>.env.sample</code> file at the root of the project to
just <code>.env</code>
</li>
<li>
Inside enter your new API key, for example:
In the <code>.env</code> file enter your new API key, for example:
<ul>
<li>
Before:
<code>REACT_APP_MAP_BOX_API_KEY=&lt;REPLACE_WITH_API_KEY&gt;</code>
<code>REACT_APP_MAP_BOX_API_KEY=REPLACE_WITH_API_KEY</code>
</li>
<li>After: <code>REACT_APP_MAP_BOX_API_KEY=xy.abc123</code></li>
</ul>
Expand Down
1 change: 1 addition & 0 deletions cypress/integration/archive.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe('Archive', () => {
describe('new photos', () => {
beforeEach(() => {
cy.loadApp();
cy.wait(500);
cy.get('[data-test=btn-capture-main]').as('captureBtn');
cy.get('@captureBtn').click();
cy.get('[data-test=photo-capture]').as('photoCapture');
Expand Down
6 changes: 3 additions & 3 deletions cypress/integration/search.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ describe('Search', () => {

it('can filter search results', () => {
cy.get('@searchField').focus().type('ed');
cy.get('@searchDrawer').find('.results .pod.user').should('have.length', 3);
cy.get('@searchDrawer').find('.results .user-card').should('have.length', 3);
cy.wait(100);
cy.get('@searchField').type('d');
cy.get('@searchDrawer').find('.results .pod.user').should('have.length', 1);
cy.get('@searchDrawer').find('.results .user-card').should('have.length', 1);
});

it('can see no results message', () => {
cy.get('@searchField').focus().type('xyz');
cy.get('@searchDrawer').find('.results .pod.user').should('have.length', 0);
cy.get('@searchDrawer').find('.results .user-card').should('have.length', 0);
cy.get('@searchDrawer').find('.no-results').should('be.visible');
});
});
Loading

0 comments on commit 2c81707

Please sign in to comment.