Skip to content

Commit 0696bdc

Browse files
committed
initial commit
1 parent 7b782b5 commit 0696bdc

File tree

19 files changed

+959
-277
lines changed

19 files changed

+959
-277
lines changed

.babelrc

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
11
{
2-
"presets": ["next/babel"]
2+
"presets": ["next/babel"],
3+
"plugins": [
4+
[
5+
"module-resolver",
6+
{
7+
"root": ["./"],
8+
"alias": {
9+
"@*": ["./src/*"]
10+
}
11+
}
12+
]
13+
]
314
}

.eslintrc.json

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
{
22
"parser": "@typescript-eslint/parser",
3-
"plugins": ["@typescript-eslint"],
3+
"plugins": ["@typescript-eslint", "prettier"],
44
"extends": [
5+
"airbnb",
6+
"airbnb/hooks",
57
"eslint:recommended",
68
"plugin:react/recommended",
7-
"plugin:@typescript-eslint/recommended"
8-
// Uncomment the following lines to enable eslint-config-prettier
9-
// Is not enabled right now to avoid issues with the Next.js repo
10-
// "prettier",
11-
// "prettier/@typescript-eslint"
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:import/errors",
11+
"plugin:import/warnings",
12+
"plugin:import/typescript",
13+
"prettier",
14+
"prettier/@typescript-eslint",
15+
"prettier/react"
1216
],
1317
"env": {
1418
"es6": true,
@@ -19,9 +23,17 @@
1923
"settings": {
2024
"react": {
2125
"version": "detect"
26+
},
27+
"import/resolver": {
28+
"typescript": {}
2229
}
2330
},
2431
"rules": {
32+
"prettier/prettier": "error",
33+
"@typescript-eslint/explicit-module-boundary-types": 0,
34+
"react/jsx-filename-extension": [1, { "extensions": [".ts", ".tsx"] }],
35+
"react/jsx-props-no-spreading": 0,
36+
"jsx-a11y/anchor-is-valid": 0,
2537
"react/react-in-jsx-scope": 0,
2638
"react/display-name": 0,
2739
"react/prop-types": 0,
@@ -31,6 +43,7 @@
3143
"@typescript-eslint/member-delimiter-style": 0,
3244
"@typescript-eslint/no-explicit-any": 0,
3345
"@typescript-eslint/no-var-requires": 0,
46+
"no-use-before-define": 0,
3447
"@typescript-eslint/no-use-before-define": 0,
3548
"@typescript-eslint/no-unused-vars": [
3649
2,

.prettierrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"semi": false,
3-
"singleQuote": true
3+
"singleQuote": false
44
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": true,
4+
"source.fixAll": true
5+
},
6+
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
7+
}

jest.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module.exports = {
2-
roots: ['<rootDir>'],
3-
moduleFileExtensions: ['ts', 'tsx', 'js', 'json', 'jsx'],
4-
testPathIgnorePatterns: ['<rootDir>[/\\\\](node_modules|.next)[/\\\\]'],
5-
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(ts|tsx)$'],
2+
roots: ["<rootDir>"],
3+
moduleFileExtensions: ["ts", "tsx", "js", "json", "jsx"],
4+
testPathIgnorePatterns: ["<rootDir>[/\\\\](node_modules|.next)[/\\\\]"],
5+
transformIgnorePatterns: ["[/\\\\]node_modules[/\\\\].+\\.(ts|tsx)$"],
66
transform: {
7-
'^.+\\.(ts|tsx)$': 'babel-jest',
7+
"^.+\\.(ts|tsx)$": "babel-jest",
88
},
99
watchPlugins: [
10-
'jest-watch-typeahead/filename',
11-
'jest-watch-typeahead/testname',
10+
"jest-watch-typeahead/filename",
11+
"jest-watch-typeahead/testname",
1212
],
1313
moduleNameMapper: {
14-
'\\.(css|less|sass|scss)$': 'identity-obj-proxy',
15-
'\\.(gif|ttf|eot|svg|png)$': '<rootDir>/test/__mocks__/fileMock.js',
14+
"\\.(css|less|sass|scss)$": "identity-obj-proxy",
15+
"\\.(gif|ttf|eot|svg|png)$": "<rootDir>/test/__mocks__/fileMock.js",
1616
},
1717
}

package.json

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "with-typescript-eslint-jest",
3-
"author": "@erikdstock",
3+
"author": "@agctyz",
44
"license": "MIT",
55
"version": "1.0.0",
66
"scripts": {
@@ -26,9 +26,16 @@
2626
]
2727
},
2828
"dependencies": {
29+
"@tailwindcss/forms": "^0.2.1",
30+
"@tailwindcss/typography": "^0.4.0",
31+
"autoprefixer": "^10.2.4",
32+
"babel-plugin-module-resolver": "^4.1.0",
2933
"next": "latest",
34+
"postcss": "^8.2.5",
3035
"react": "^17.0.1",
31-
"react-dom": "^17.0.1"
36+
"react-dom": "^17.0.1",
37+
"sass": "^1.32.6",
38+
"tailwindcss": "^2.0.3"
3239
},
3340
"devDependencies": {
3441
"@testing-library/react": "^11.2.5",
@@ -39,8 +46,15 @@
3946
"@typescript-eslint/parser": "^4.14.2",
4047
"babel-jest": "^26.6.3",
4148
"eslint": "^7.19.0",
49+
"eslint-config-airbnb": "^18.2.1",
4250
"eslint-config-prettier": "^7.2.0",
51+
"eslint-import-resolver-babel-module": "^5.2.0",
52+
"eslint-import-resolver-typescript": "^2.3.0",
53+
"eslint-plugin-import": "^2.22.1",
54+
"eslint-plugin-jsx-a11y": "^6.4.1",
55+
"eslint-plugin-prettier": "^3.3.1",
4356
"eslint-plugin-react": "^7.19.0",
57+
"eslint-plugin-react-hooks": "^4.2.0",
4458
"husky": "^4.2.3",
4559
"identity-obj-proxy": "^3.0.0",
4660
"jest": "^26.6.3",

pages/index.tsx

Lines changed: 0 additions & 211 deletions
This file was deleted.

postcss.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
}

src/components/test.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default function Test() {
2+
return <div className="text-red-400">Hello Whats uo</div>
3+
}

src/pages/_app.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { AppProps } from "next/app"
2+
import React from "react"
3+
import "../styles/tailwind.scss"
4+
5+
function MyApp({ Component, pageProps }: AppProps): JSX.Element {
6+
return <Component {...pageProps} />
7+
}
8+
9+
export default MyApp

0 commit comments

Comments
 (0)