Skip to content

Commit

Permalink
refactor(root): change folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
hendraaagil committed Mar 1, 2022
1 parent 1f6488d commit 60dd6d3
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 14 deletions.
10 changes: 6 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,17 @@ module.exports = {
extends: ['plugin:react/recommended', 'next', 'airbnb', 'prettier'],
plugins: ['react', 'prettier'],
rules: {
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'import/extensions': 'off',
'import/no-unresolved': 'off',
'no-plusplus': 'off',
'react/function-component-definition': [
2,
{ namedComponents: 'arrow-function' },
],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'@next/next/no-page-custom-font': 'off',
'no-plusplus': 'off',
},
};
6 changes: 5 additions & 1 deletion jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"compilerOptions": {
"baseUrl": "."
"baseUrl": ".",
"paths": {
"@/components/*": ["src/components/*"],
"@/styles/*": ["src/styles/*"]
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions pages/_app.js → src/pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { Box, ChakraProvider } from '@chakra-ui/react';
import { AnimatePresence, motion } from 'framer-motion';

import SEO from 'next-seo.config';
import theme from 'styles/theme';
import GlobalStyle from 'styles/styles';
import 'styles/css/nprogress.css';
import theme from '@/styles/theme';
import GlobalStyle from '@/styles/styles';
import '@/styles/css/nprogress.css';

import Star from 'components/Star';
import Footer from 'components/Footer';
import Star from '@/components/Star';
import Footer from '@/components/Footer';

Router.events.on('routeChangeStart', () => NProgress.start());
Router.events.on('routeChangeComplete', () => NProgress.done());
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions pages/index.js → src/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PageContainer from 'components/PageContainer';
import Actions from 'components/Actions';
import PageContainer from '@/components/PageContainer';
import Actions from '@/components/Actions';

const Home = () => (
<PageContainer title="Next.js Chakra Starter">
Expand Down
4 changes: 2 additions & 2 deletions pages/second.js → src/pages/second.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import PageContainer from 'components/PageContainer';
import Actions from 'components/Actions';
import PageContainer from '@/components/PageContainer';
import Actions from '@/components/Actions';

const Second = () => (
<PageContainer title="You Are In Second Page">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

1 comment on commit 60dd6d3

@vercel
Copy link

@vercel vercel bot commented on 60dd6d3 Mar 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.