Skip to content

Commit

Permalink
Merge pull request #482 from Digital-Coder/nextjs-11
Browse files Browse the repository at this point in the history
next.js 11 webpack 5 eslint prettier
  • Loading branch information
Enjoy2Live authored Jun 28, 2021
2 parents 2df78af + aff692a commit b477e6f
Show file tree
Hide file tree
Showing 10 changed files with 18,759 additions and 22,094 deletions.
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node_modules
production
staging
workload
.next
/out/
.vscode
.github
*.json
*.lock
*.md

4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": ["airbnb-base", "next", "prettier"],
"env": { "browser": true, "node": true, "es2021": true }
}
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.next
/out/
/node_modules/
.github
13 changes: 13 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"singleQuote": false,
"trailingComma": "es5",
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"jsxSingleQuote": false,
"jsxBracketSameLine": false,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf"
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"esbenp.prettier-vscode",
"jpoissonnier.vscode-styled-components"
"jpoissonnier.vscode-styled-components",
"dbaeumer.vscode-eslint"
]
}
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.alwaysShowStatus": true,
"files.exclude": {
"**/.classpath": true,
"**/.project": true,
Expand Down
32 changes: 20 additions & 12 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
const withImages = require("next-images");

module.exports = withImages({
webpack(config, { isServer }) {
// Fixes npm packages that depend on `fs` module
if (!isServer) {
config.node = {
fs: "empty"
};
}
return config;
},
async redirects() {
return [
{
source: "/meet",
destination: "/hangout",
permanent: true
}
permanent: true,
},
];
}
},
images: {
/*
next-images plugin is conflicting with Next.js 11 static import feature.
see the discussion here:
https://github.com/twopluszero/next-images/issues/73
*/
disableStaticImages: true,
},
webpack5: true,
reactStrictMode: true, // It helps you avoid legacy code, and deprecated APIs.
eslint: {
// Warning: Dangerously allow production builds to successfully complete even if
// your project has ESLint errors.
// we have too many errors if you run npm run lint ,but after bug fixes we could enforce this.
ignoreDuringBuilds: true,
},
});
Loading

0 comments on commit b477e6f

Please sign in to comment.