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

[Chore] Setup #1

Merged
merged 16 commits into from
Oct 23, 2021
23 changes: 23 additions & 0 deletions .babelrc
@@ -0,0 +1,23 @@
{
"presets": ["next/babel"],
"plugins": [
[
"transform-imports",
{
"material-ui/core": {
"transform": "material-ui/core/esm/${member}",
"preventFullImport": true
}
}
],
[
"module-resolver",
{
"root": ["./"],
"alias": {
"@/twoopstrackerui": "./src"
gertie-sheshe marked this conversation as resolved.
Show resolved Hide resolved
}
}
]
]
}
52 changes: 52 additions & 0 deletions .eslintrc
@@ -0,0 +1,52 @@
{
"root": true,
"parser": "@babel/eslint-parser",
"extends": [
"plugin:markdown/recommended",
"plugin:json/recommended",
"plugin:import/warnings",
"plugin:import/errors",
"airbnb",
"plugin:react-hooks/recommended",
"plugin:prettier/recommended",
"plugin:@next/next/recommended"
],
"env": {
"browser": true
},
"plugins": ["module-resolver"],
"settings": {
"import/resolver": {
"babel-module": {}
}
},
"rules": {
"import/order": [
"error",
{
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"module-resolver/use-alias": "error",
"react/jsx-filename-extension": [
1,
{
"extensions": [".js"]
}
],
"react/jsx-props-no-spreading": "off"
},
"overrides": [
{
"files": ["src/**/*.stories.js"],
"rules": {
"import/no-extraneous-dependencies": "off",
"react/prop-types": "off"
}
}
]
}
22 changes: 22 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,22 @@
## Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Type of change

Please delete options that are not relevant.

- [ ] Chore (non-breaking change which does not add visible functionality but improves code quality)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

## Screenshots

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
227 changes: 227 additions & 0 deletions .gitignore
@@ -0,0 +1,227 @@
# Created by https://www.toptal.com/developers/gitignore/api/node,yarn,visualstudiocode,linux,macos,vim
# Edit at https://www.toptal.com/developers/gitignore?templates=node,yarn,visualstudiocode,linux,macos,vim

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env*.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Storybook build outputs
.out
.storybook-out
storybook-static

# rollup.js default build output
dist/

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test
.vscode

# Temporary folders
tmp/
temp/

### Vim ###
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim
Sessionx.vim

# Temporary
.netrwhist
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~

### VisualStudioCode ###
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
*.code-workspace

### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide

### yarn ###
# https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored

.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# if you are NOT using Zero-installs, then:
# comment the following lines
!.yarn/cache

# and uncomment the following lines
# .pnp.*

# End of https://www.toptal.com/developers/gitignore/api/node,yarn,visualstudiocode,linux,macos,vim

# Customs

# include wordpress tags function
!src/lib/wordpress/tags
1 change: 1 addition & 0 deletions .husky/.gitignore
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
gertie-sheshe marked this conversation as resolved.
Show resolved Hide resolved
8 changes: 8 additions & 0 deletions .storybook/main.js
@@ -0,0 +1,8 @@
module.exports = {
stories: ["../src/**/*.stories.js"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"storybook-addon-material-ui",
],
};
15 changes: 15 additions & 0 deletions .storybook/preview.js
@@ -0,0 +1,15 @@
import { muiTheme } from "storybook-addon-material-ui";

import theme from "../src/theme";

export const decorators = [muiTheme([theme])];

export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
20 changes: 19 additions & 1 deletion README.md
@@ -1 +1,19 @@
# readme
# trolltracker.investigate.africa/

Troll Tracker
gertie-sheshe marked this conversation as resolved.
Show resolved Hide resolved

## Getting Started

First, run the development server:

```bash
yarn dev
```

Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
9 changes: 9 additions & 0 deletions jsconfig.json
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/twoopstrackerui/*": ["./src/*"]
}
},
"exclude": ["node_modules"]
}
gertie-sheshe marked this conversation as resolved.
Show resolved Hide resolved