Skip to content

Commit

Permalink
init: ⚡ project init
Browse files Browse the repository at this point in the history
  • Loading branch information
JoDMsoluth committed Feb 6, 2021
1 parent 791934e commit 7e67644
Show file tree
Hide file tree
Showing 27 changed files with 7,566 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["next/babel"]
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/node_modules/*
**/out/*
**/.next/*
41 changes: 41 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"env": {
"browser": true,
"node": true,
"jest": true,
"es6": true
},
"extends": ["airbnb", "prettier"],
"plugins": ["import", "react-hooks"],
"rules": {
"semi": "error",
"no-shadow": "off",
"import/named": "off",
"import/export": "off",
"import/extensions": "off",
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["off", { "devDependencies": true }],
"no-unused-expressions": ["warn"],
"react/jsx-filename-extension": "off",
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"camelcase": "warn",
"prefer-destructuring": "warn",
"arrow-body-style": "warn",
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"react/forbid-prop-types": "off",
"react/sort-comp": "off",
"react/require-default-props": "off",
"react/jsx-props-no-spreading": "off",
"no-use-before-define": "off"
}
}
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel
5 changes: 5 additions & 0 deletions .huskyrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
hooks: {
'pre-commit': 'lint-staged',
},
};
11 changes: 11 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"*.{js,jsx}": [
"prettier --write",
"eslint --quiet --fix",
"git add"
],
"*.{html,scss,json}": [
"prettier --write",
"git add"
]
}
Empty file added .prettierignore
Empty file.
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"semi": true,
"useTabs": false,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 80
}
13 changes: 13 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
extends: ['stylelint-config-standard'],
plugins: ['stylelint-scss', 'stylelint-order'],
rules: {
'at-rule-no-unknown': null,
'scss/at-rule-no-unknown': true,
'order/properties-alphabetical-order': true,
'no-empty-source': null,
'rule-empty-line-before': null,
'selector-list-comma-newline-after': null,
'no-descending-specificity': null,
},
};
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true,
"source.fixAll.stylelint": true
},
"stylelint.enable": true
}
Empty file added asset/images/svg/.gitkeep
Empty file.
28 changes: 28 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
const webpack = require('webpack');

// next-plugins
const withPlugins = require('next-compose-plugins');
const withSourceMaps = require('@zeit/next-source-maps')();
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
});

const nextConfig = {
webpack: (config) => {
const prod = process.env.NODE_ENV === 'production';

config.plugins.push(new webpack.IgnorePlugin(/(?:\/tests|__mocks)/));
// moment locale size is too big
config.plugins.push(
new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /(en)/),
);

return {
...config,
mode: prod ? 'production' : 'development',
devtool: prod ? 'inline-source-map' : 'eval',
};
},
};

module.exports = withPlugins([withSourceMaps, withBundleAnalyzer], nextConfig);
Loading

0 comments on commit 7e67644

Please sign in to comment.