This repository has been archived by the owner on Mar 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2349928
Showing
53 changed files
with
12,464 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"plugins": [ | ||
"@babel/transform-runtime", | ||
"@babel/proposal-class-properties" | ||
], | ||
"presets": [ | ||
[ | ||
"@babel/env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
"@babel/react" | ||
], | ||
"env": { | ||
"production": { | ||
"compact": false, | ||
"only": [ | ||
"src" | ||
], | ||
"plugins": [ | ||
"transform-react-remove-prop-types", | ||
"@babel/transform-react-inline-elements", | ||
"@babel/transform-react-constant-elements" | ||
] | ||
}, | ||
"development" : { | ||
"compact": false | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
|
||
const prettierOptions = JSON.parse( | ||
fs.readFileSync(path.resolve(__dirname, '.prettierrc'), 'utf8') | ||
); | ||
|
||
module.exports = { | ||
parser: 'babel-eslint', | ||
extends: ['airbnb', 'prettier'], | ||
plugins: ['prettier', 'react', 'jsx-a11y'], | ||
env: { | ||
jest: true, | ||
browser: true, | ||
node: true, | ||
es6: true | ||
}, | ||
parserOptions: { | ||
ecmaVersion: 6, | ||
sourceType: 'module', | ||
ecmaFeatures: { | ||
jsx: true | ||
} | ||
}, | ||
rules: { | ||
'prettier/prettier': ['error', prettierOptions], | ||
'arrow-body-style': [2, 'as-needed'], | ||
'class-methods-use-this': 0, | ||
'import/imports-first': 0, | ||
'import/newline-after-import': 0, | ||
'import/no-dynamic-require': 0, | ||
'import/no-extraneous-dependencies': 0, | ||
'import/no-named-as-default': 0, | ||
'import/no-unresolved': 2, | ||
'import/no-webpack-loader-syntax': 0, | ||
'import/prefer-default-export': 0, | ||
indent: [ | ||
2, | ||
2, | ||
{ | ||
SwitchCase: 1 | ||
} | ||
], | ||
'jsx-a11y/aria-props': 2, | ||
'jsx-a11y/heading-has-content': 0, | ||
'jsx-a11y/label-has-associated-control': [ | ||
2, | ||
{ | ||
// NOTE: If this error triggers, either disable it or add | ||
// your custom components, labels and attributes via these options | ||
// See https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/label-has-associated-control.md | ||
controlComponents: ['Input'] | ||
} | ||
], | ||
'jsx-a11y/label-has-for': 0, | ||
'jsx-a11y/mouse-events-have-key-events': 2, | ||
'jsx-a11y/role-has-required-aria-props': 2, | ||
'jsx-a11y/role-supports-aria-props': 2, | ||
'max-len': 0, | ||
'newline-per-chained-call': 0, | ||
'no-confusing-arrow': 0, | ||
'no-console': 1, | ||
'no-unused-vars': 2, | ||
'no-use-before-define': 0, | ||
'prefer-template': 2, | ||
'react/destructuring-assignment': 0, | ||
'react/jsx-closing-tag-location': 0, | ||
'react/forbid-prop-types': 0, | ||
'react/jsx-first-prop-new-line': [2, 'multiline'], | ||
'react/jsx-filename-extension': 0, | ||
'react/jsx-no-target-blank': 0, | ||
'react/jsx-uses-vars': 2, | ||
'react/require-default-props': 0, | ||
'react/require-extension': 0, | ||
'react/self-closing-comp': 0, | ||
'react/sort-comp': 0, | ||
'require-yield': 0 | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
webpack: { | ||
config: './config/webpack.prod.babel.js' | ||
} | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"printWidth": 80, | ||
"tabWidth": 2, | ||
"useTabs": false, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"processors": ["stylelint-processor-styled-components"], | ||
"extends": [ | ||
"stylelint-config-recommended", | ||
"stylelint-config-styled-components" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "chrome", | ||
"request": "launch", | ||
"name": "Launch Chrome", | ||
"url": "http://localhost:3000", | ||
"webRoot": "${workspaceRoot}/src", | ||
"sourceMapPathOverrides": { | ||
"webpack:///./app/*": "${webRoot}/*", | ||
"webpack:///app/*": "${webRoot}/*" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"editor.wordWrap": "on", | ||
"editor.wordWrapColumn": 80, | ||
|
||
// Files | ||
"files.associations": { | ||
".babelrc": "jsonc", | ||
".eslintrc": "jsonc", | ||
".flowconfig": "ini", | ||
"*.js": "javascriptreact" | ||
}, | ||
"files.exclude": { | ||
"**/*.log": true, | ||
"**/*.log*": true, | ||
"**/dist": true, | ||
"**/coverage": true | ||
}, | ||
|
||
// Linting: | ||
"eslint.enable": true, | ||
"eslint.validate": ["javascript", "javascriptreact", "vue"], | ||
"stylelint.enable": true, | ||
|
||
// Set the default | ||
"editor.formatOnSave": false, | ||
// Enable per-language | ||
"[javascript]": { | ||
"editor.formatOnSave": true | ||
}, | ||
"[javascriptreact]": { | ||
"editor.formatOnSave": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
|
||
### `npm start` | ||
|
||
Runs the app in the development mode.<br> | ||
|
||
### `npm run build` | ||
|
||
Builds the app for production to the `build` folder.<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/** | ||
* COMMON WEBPACK CONFIGURATION | ||
*/ | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
process.noDeprecation = true; | ||
|
||
module.exports = options => ({ | ||
mode: options.mode, | ||
entry: options.entry, | ||
output: Object.assign( | ||
{ | ||
path: path.resolve(process.cwd(), 'build'), | ||
publicPath: '/' | ||
}, | ||
options.output | ||
), | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: options.babelQuery | ||
} | ||
}, | ||
{ | ||
// Preprocess our own .scss files | ||
test: /\.scss$/, | ||
exclude: /node_modules/, | ||
use: ['style-loader', 'css-loader', 'sass-loader'] | ||
}, | ||
{ | ||
// Preprocess 3rd party .css files located in node_modules | ||
test: /\.css$/, | ||
include: /node_modules/, | ||
use: ['style-loader', 'css-loader'] | ||
}, | ||
{ | ||
test: /\.(eot|svg|otf|ttf|woff|woff2)$/, | ||
use: 'file-loader' | ||
}, | ||
{ | ||
test: /\.(jpg|png|gif)$/, | ||
use: 'file-loader' | ||
}, | ||
{ | ||
test: /\.html$/, | ||
use: 'html-loader' | ||
}, | ||
{ | ||
test: /\.(mp4|webm)$/, | ||
use: { | ||
loader: 'url-loader', | ||
options: { | ||
limit: 10000 | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
plugins: options.plugins.concat([ | ||
new webpack.ProvidePlugin({ | ||
// make fetch available | ||
fetch: 'exports-loader?self.fetch!whatwg-fetch' | ||
}), | ||
|
||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: JSON.stringify(process.env.NODE_ENV) | ||
} | ||
}) | ||
]), | ||
resolve: { | ||
modules: ['app', 'node_modules'], | ||
extensions: ['.js', '.jsx', '.scss', '.react.js'], | ||
mainFields: ['browser', 'jsnext:main', 'main'] | ||
}, | ||
devtool: options.devtool, | ||
target: 'web', | ||
performance: options.performance || {}, | ||
optimization: { | ||
namedModules: true, | ||
splitChunks: { | ||
name: 'vendor', | ||
minChunks: 2 | ||
} | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* DEVELOPMENT WEBPACK CONFIGURATION | ||
*/ | ||
|
||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const HtmlWebpackPlugin = require('html-webpack-plugin'); | ||
const CircularDependencyPlugin = require('circular-dependency-plugin'); | ||
|
||
module.exports = require('./webpack.base.babel')({ | ||
mode: 'development', | ||
entry: [ | ||
'eventsource-polyfill', // Necessary for hot reloading with IE | ||
'webpack-hot-middleware/client?reload=true', | ||
path.join(process.cwd(), 'src/index.js') | ||
], | ||
|
||
output: { | ||
filename: '[name].js', | ||
chunkFilename: '[name].chunk.js' | ||
}, | ||
|
||
plugins: [ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new HtmlWebpackPlugin({ | ||
inject: true, | ||
template: 'static/index.html' | ||
}), | ||
new CircularDependencyPlugin({ | ||
exclude: /a\.js|node_modules/, // exclude node_modules | ||
failOnError: false | ||
}) | ||
], | ||
devtool: 'inline-source-map', // 'eval-source-map', | ||
|
||
performance: { | ||
hints: false | ||
} | ||
}); |
Oops, something went wrong.