Skip to content

Commit

Permalink
fix: replace standard with prettier (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanSN committed Aug 27, 2020
1 parent 8453801 commit df9f6a1
Show file tree
Hide file tree
Showing 26 changed files with 437 additions and 1,622 deletions.
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -1,14 +1,14 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -21,8 +21,9 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Windows 7]
- Version [e.g. 2.0]

- OS: [e.g. Windows 7]
- Version [e.g. 2.0]

**Additional context**
Add any other context about the problem here.
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
@@ -1,13 +1,15 @@
### Goal of PR

_Describe the problem or feature in addition to a link to the issues._

### Screenshots

### QA
_How to test the PR what was done to test?_

_How to test the PR what was done to test?_

## Does this PR introduce a breaking change?

```
[ ] Yes
[ ] No
Expand Down
38 changes: 19 additions & 19 deletions .github/workflows/codeql-analysis.yml
@@ -1,4 +1,4 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
Expand All @@ -15,24 +15,24 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
with:
languages: javascript
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
with:
languages: javascript

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
7 changes: 7 additions & 0 deletions .prettierignore
@@ -0,0 +1,7 @@
# Ignore artifacts:
build
coverage
*.bundle.js

# Ignore all HTML files:
*.html
8 changes: 8 additions & 0 deletions .prettierrc
@@ -0,0 +1,8 @@
{
"useTabs": false,
"printWidth": 100,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "es5",
"semi": true
}
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Expand Up @@ -3,6 +3,7 @@
We welcome contributions. We want to make contributing to this project as easy and transparent as possible.

## Coding style

[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

This repo uses the `[standard](https://standardjs.com/)` coding style to maintain consistency.
Expand All @@ -18,6 +19,7 @@ We actively welcome your pull requests.
5. Submitting a Pull requests means you agree to our [Developer Certificate of Origin](#developer-certificate-of-origin-10)

## Rules

1. All pull requests should be made to the master branch.
2. Always make sure all the tests are passing before sending a pull request.

Expand Down
19 changes: 10 additions & 9 deletions README.md
Expand Up @@ -11,17 +11,17 @@
[![Coverage Status](https://coveralls.io/repos/github/ryanSN/winmoji/badge.svg)](https://coveralls.io/github/ryanSN/winmoji)
[![Known Vulnerabilities](https://snyk.io/test/github/ryanSN/winmoji/badge.svg)](https://snyk.io/test/github/ryanSN/winmoji)


Look up emoji's on windows! It's an alternative solution to using the windows onscreen keyboard or on windows 7 where this keyboard does not exist.

馃馃槑馃槅馃槓


## Features

Clicking on the emoji saves the emoji to your clipboard to be pasted anywhere you need it.
Using shortcut `CTRL+SHIFT+E` will toggle winMoji for quick adding of emojis.

## Download/Install

You can manually download the latest release [here](https://github.com/ryanSN/winmoji/releases)

## How do I contribute to `winMoji` ?
Expand All @@ -43,16 +43,17 @@ $ yarn dev
```
$ yarn release
```

**OR**

To package for debug purpose
```
$ yarn pack
```
To package for debug purpose

```
$ yarn pack
```

[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)

## License
## License

MIT 漏 [Ryan Chatterton](./LICENSE)
MIT 漏 [Ryan Chatterton](./LICENSE)
4 changes: 2 additions & 2 deletions __mocks__/electron.js
Expand Up @@ -4,5 +4,5 @@ module.exports = {
app: jest.fn(() => value),
remote: jest.fn(() => value),
dialog: jest.fn(() => value),
ipcRenderer: {on: jest.fn()},
}
ipcRenderer: { on: jest.fn() },
};
14 changes: 7 additions & 7 deletions __tests__/app/app.test.js
@@ -1,10 +1,10 @@
import React from 'react'
import ReactDOM from 'react-dom'
import Root from '../../app/containers/Root'
import React from 'react';
import ReactDOM from 'react-dom';
import Root from '../../app/containers/Root';

describe('app', () => {
it('renders without crashing', () => {
const div = document.createElement('div')
ReactDOM.render(<Root />, div)
})
})
const div = document.createElement('div');
ReactDOM.render(<Root />, div);
});
});
16 changes: 8 additions & 8 deletions __tests__/app/containers/Root.test.js
@@ -1,12 +1,12 @@
import React from 'react'
import Root from '../../../app/containers/Root'
import React from 'react';
import Root from '../../../app/containers/Root';

import renderer from 'react-test-renderer'
import renderer from 'react-test-renderer';

describe('app', () => {
it('should render the base app', () => {
const componet = renderer.create(<Root />)
const json = componet.toJSON()
expect(json).toMatchSnapshot()
})
})
const componet = renderer.create(<Root />);
const json = componet.toJSON();
expect(json).toMatchSnapshot();
});
});
6 changes: 3 additions & 3 deletions __tests__/main.test.js
@@ -1,5 +1,5 @@
describe('example test', () => {
it('works', () => {
expect(1).toBe(1)
})
})
expect(1).toBe(1);
});
});
11 changes: 4 additions & 7 deletions app/app.js
@@ -1,8 +1,5 @@
import React from 'react'
import { render } from 'react-dom'
import Root from './containers/Root'
import React from 'react';
import { render } from 'react-dom';
import Root from './containers/Root';

render(
<Root />,
document.getElementById('app')
)
render(<Root />, document.getElementById('app'));
32 changes: 13 additions & 19 deletions app/components/EmojiList.js
@@ -1,25 +1,19 @@
import React from 'react'
import React from 'react';

const EmojiList = ({ filteredContent, onEmojiClick }) => {
return (
<ul>
{
filteredContent.map((emoji, idx) => {
return (
<li key={idx} className='results__item'>
<a
href='#'
className='results__link'
onClick={() => onEmojiClick(this, emoji)}
>
{emoji.char}
</a>
</li>
)
})
}
{filteredContent.map((emoji, idx) => {
return (
<li key={idx} className="results__item">
<a href="#" className="results__link" onClick={() => onEmojiClick(this, emoji)}>
{emoji.char}
</a>
</li>
);
})}
</ul>
)
}
);
};

export default EmojiList
export default EmojiList;
16 changes: 4 additions & 12 deletions app/components/Search.js
@@ -1,15 +1,7 @@
import React from 'react'
import React from 'react';

const Search = ({ onChange, inputRef }) => {
return (
<input
type='text'
autoFocus
placeholder='Search'
onChange={onChange}
ref={inputRef}
/>
)
}
return <input type="text" autoFocus placeholder="Search" onChange={onChange} ref={inputRef} />;
};

export default Search
export default Search;

0 comments on commit df9f6a1

Please sign in to comment.