Skip to content

Commit db59caa

Browse files
committed
first commit
0 parents  commit db59caa

32 files changed

+18894
-0
lines changed

.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// .eslintignore
2+
build/*
3+
public/*
4+
src/react-app-env.d.ts
5+
src/serviceWorker.ts
6+
rollup.config.js
7+
setupTests.ts

.eslintrc

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// .eslintrc
2+
{
3+
"plugins": [
4+
"prettier",
5+
"@typescript-eslint"
6+
],
7+
"extends": [
8+
"airbnb-typescript",
9+
"react-app",
10+
"prettier"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"project": "./tsconfig.json"
15+
},
16+
"settings": {
17+
"import/resolver": {
18+
"typescript": {
19+
"alwaysTryTypes": true
20+
}
21+
}
22+
},
23+
"rules": {
24+
"object-curly-spacing": [
25+
"warn",
26+
"always"
27+
],
28+
"no-unused-vars": [
29+
"warn",
30+
{
31+
"vars": "all",
32+
"args": "none"
33+
}
34+
],
35+
"@typescript-eslint/no-unused-vars": [
36+
"warn",
37+
{
38+
"vars": "all",
39+
"args": "none"
40+
}
41+
],
42+
"@typescript-eslint/no-explicit-any": [
43+
"error",
44+
{
45+
"ignoreRestArgs": true
46+
}
47+
],
48+
"max-len": [
49+
"warn",
50+
{
51+
"code": 80,
52+
"ignoreStrings": true,
53+
"ignoreTemplateLiterals": true,
54+
"ignoreComments": true
55+
}
56+
],
57+
"no-plusplus": [
58+
"error",
59+
{
60+
"allowForLoopAfterthoughts": true
61+
}
62+
],
63+
"react/jsx-key": "error",
64+
"import/no-extraneous-dependencies": [
65+
"error",
66+
{
67+
"devDependencies": [
68+
"**/*.test.js",
69+
"**/*.test.jsx",
70+
"**/*.test.ts",
71+
"**/*.test.tsx",
72+
"src/tests/**/*",
73+
"**/*.config.js",
74+
"*.config.js"
75+
]
76+
}
77+
],
78+
"react/jsx-props-no-spreading": "off",
79+
"import/prefer-default-export": "off",
80+
"react/jsx-boolean-value": "off",
81+
"react/prop-types": "off",
82+
"react/no-unescaped-entities": "off",
83+
"react/jsx-one-expression-per-line": "off",
84+
"react/jsx-wrap-multilines": "off",
85+
"react/destructuring-assignment": "off"
86+
}
87+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules/
2+
build/
3+
__snapshots__

.prettierrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"printWidth": 80,
3+
"singleQuote": true,
4+
"trailingComma": "es5",
5+
"tabWidth": 2
6+
}

.storybook/addons.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import '@storybook/addon-actions/register';
2+
import '@storybook/addon-links/register';

.storybook/config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { configure } from '@storybook/react';
2+
3+
// automatically import all files ending in *.stories.js
4+
configure(
5+
[
6+
require.context('../src', true, /\.stories\.tsx$/),
7+
],
8+
module
9+
);

.storybook/webpack.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module.exports = async ({ config, mode }) => {
2+
config.module.rules.push({
3+
test: /\.(ts|tsx)$/,
4+
loader: require.resolve('babel-loader'),
5+
options: {
6+
presets: [['react-app', { flow: false, typescript: true }]],
7+
},
8+
});
9+
config.resolve.extensions.push('.ts', '.tsx');
10+
11+
return config;
12+
};

LICENCE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 EggTronic
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# react-openweather-widget
2+
3+
> A nice weather widget for react based on openweather
4+
5+
> Demo: https://eggtronic.github.io/react-openweather-widget/
6+
7+
---
8+
9+
---
10+
11+
## 🔨 Development
12+
13+
#### 🧪 Testing
14+
15+
`npm run test`
16+
17+
#### 🔧 Building
18+
19+
`npm run build`
20+
21+
#### 🔖 Storybook
22+
23+
`npm run storybook`
24+
25+
#### 📝 Props
26+
27+
## License
28+
29+
MIT © [EggTronic](https://github.com/eggtronic)

jest.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports = {
2+
roots: ["./src"],
3+
setupFiles: ["./setupTests.ts"],
4+
moduleFileExtensions: ["ts", "tsx", "js"],
5+
testPathIgnorePatterns: ["node_modules/"],
6+
transform: {
7+
"^.+\\.tsx?$": "ts-jest"
8+
},
9+
testMatch: ["**/*.test.(ts|tsx)"],
10+
moduleNameMapper: {
11+
// Mocks out all these file formats when tests are run
12+
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
13+
"identity-obj-proxy",
14+
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
15+
},
16+
snapshotSerializers: ["enzyme-to-json/serializer"]
17+
};

0 commit comments

Comments
 (0)