-
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 a2cc682
Showing
21 changed files
with
9,272 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,7 @@ | ||
{ | ||
"presets": ["next/babel", "linaria/babel"], | ||
"plugins": [ | ||
"@babel/plugin-proposal-optional-chaining", | ||
"babel-plugin-ts-nameof" | ||
] | ||
} |
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 @@ | ||
node_modules/ | ||
|
||
build/ | ||
coverage/ | ||
lib/ | ||
dist/ | ||
.next/ | ||
.linaria-cache/ |
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,60 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:react/recommended" | ||
], | ||
"plugins": ["@typescript-eslint", "import", "react-hooks"], | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module", | ||
"ecmaFeatures": { | ||
"jsx": true, | ||
"modules": true | ||
}, | ||
"project": ["./tsconfig.eslint.json", "./tsconfig.json"], | ||
"tsconfigRootDir": "./" | ||
}, | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true, | ||
"jest": true | ||
}, | ||
"settings": { | ||
"react": { | ||
"version": "detect" | ||
} | ||
}, | ||
"rules": { | ||
"no-console": [ | ||
"error", | ||
{ | ||
"allow": ["warn", "error"] | ||
} | ||
], | ||
"react/prop-types": 0, | ||
"prefer-const": "error", | ||
"padding-line-between-statements": [ | ||
"error", | ||
{ "blankLine": "always", "prev": "*", "next": "return" }, | ||
{ "blankLine": "always", "prev": "*", "next": "case" } | ||
], | ||
"@typescript-eslint/explicit-module-boundary-types": "off" | ||
}, | ||
"overrides": [ | ||
{ | ||
"files": ["*.tsx", "*.ts"], | ||
"rules": { | ||
"react-hooks/rules-of-hooks": "error", | ||
"react-hooks/exhaustive-deps": "error", | ||
"react/react-in-jsx-scope": "off", | ||
"@typescript-eslint/explicit-function-return-type": "off" | ||
} | ||
} | ||
], | ||
"globals": { | ||
"nameof": "readonly" | ||
} | ||
} |
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 @@ | ||
* text=auto eol=lf |
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 @@ | ||
### Project | ||
|
||
.linaria-cache | ||
.idea | ||
*.swp | ||
|
||
### Node | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Diagnostic reports (https://nodejs.org/api/report.html) | ||
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
*.lcov | ||
|
||
# Dependency directories | ||
node_modules/ | ||
|
||
# TypeScript cache | ||
*.tsbuildinfo | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Next.js build output | ||
.next |
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 @@ | ||
registry=https://registry.npmjs.org/ |
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,23 @@ | ||
# Project | ||
node_modules/ | ||
.* | ||
!.babelrc | ||
*.log | ||
*.sh | ||
*.tsbuildinfo | ||
*.gz | ||
yarn.lock | ||
/lib | ||
/dist | ||
/coverage | ||
/build | ||
/coverage | ||
|
||
# Images | ||
*.svg | ||
*.jpg | ||
*.png | ||
*.cur | ||
|
||
# markdown | ||
*.md |
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,4 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none" | ||
} |
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,10 @@ | ||
# Test react app | ||
|
||
1. Clone and run `yarn` | ||
2. Create your own git branch | ||
3. Modify styles for Root component | ||
4. Create styled input, add some styles, add `label (visual name)` place it inside Root component + create state `value` and `onChange` handler ans pass them to the input: | ||
* Tatiana - for Celsius's | ||
* Alex - for Kelvin's | ||
5. Find math formula to convert `Kelvin ←→ Celsius` | ||
6. Find any other temperature systems and keep them + math formulas to convert. |
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 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
rules: { | ||
'body-leading-blank': [2, 'always'], | ||
'footer-leading-blank': [2, 'always'] | ||
} | ||
}; |
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 @@ | ||
const TEST_REGEX = '(\\.|/)(spec)\\.(jsx?|js?|tsx?|ts?)$'; | ||
|
||
module.exports = { | ||
testRegex: TEST_REGEX, | ||
transform: { | ||
'^.+\\.(tsx?|js)$': 'babel-jest' | ||
}, | ||
transformIgnorePatterns: [], | ||
testPathIgnorePatterns: ['<rootDir>/.next/', '<rootDir>/node_modules/'], | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
collectCoverage: true, | ||
coverageReporters: ['lcov', 'html', 'text-summary'], | ||
collectCoverageFrom: ['./src/**/*.tsx'] | ||
}; |
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 @@ | ||
module.exports = { displayName: 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,5 @@ | ||
/// <reference types="next" /> | ||
/// <reference types="next/image-types/global" /> | ||
|
||
// NOTE: This file should not be edited | ||
// see https://nextjs.org/docs/basic-features/typescript for more information. |
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,4 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const withLinaria = require('next-linaria'); | ||
|
||
module.exports = withLinaria({}); |
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,77 @@ | ||
{ | ||
"name": "react-next-starter-kit", | ||
"version": "1.0.0", | ||
"license": "MIT", | ||
"scripts": { | ||
"clean": "rimraf ./.next ./.linaria-cache ./coverage", | ||
"build": "yarn clean && next build", | ||
"dev": "yarn clean && next", | ||
"start": "next start", | ||
"lint": "yarn lint:ts && yarn lint:commitlint && yarn lint:prettier && yarn lint:eslint && yarn lint:stylelint", | ||
"lint:ts": "tsc", | ||
"lint:commitlint": "yarn commitlint -c commitlint.config.js", | ||
"lint:eslint": "eslint --ext .js,.jsx,.ts,.tsx ./ --color --cache", | ||
"lint:prettier": "prettier -c ./", | ||
"lint:stylelint": "stylelint **/*.{ts,tsx}", | ||
"test": "cross-env NODE_ENV=test jest", | ||
"test:watch": "jest --watch", | ||
"healthcheck": "yarn lint && yarn test && yarn build" | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"lint-staged": { | ||
"*.{json,md}": [ | ||
"prettier --write" | ||
], | ||
"*.(ts,tsx)": [ | ||
"tsc --noEmit", | ||
"prettier --write", | ||
"stylelint", | ||
"eslint --color --fix --cache" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.13.15", | ||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", | ||
"@babel/plugin-proposal-optional-chaining": "^7.13.12", | ||
"@commitlint/config-conventional": "^12.1.1", | ||
"@testing-library/jest-dom": "^5.11.10", | ||
"@testing-library/react": "^13.4.0", | ||
"@types/jest": "^26.0.22", | ||
"@types/ts-nameof": "^4.2.1", | ||
"@typescript-eslint/eslint-plugin": "^4.21.0", | ||
"@typescript-eslint/parser": "^4.21.0", | ||
"babel-plugin-ts-nameof": "^4.2.1", | ||
"commitlint": "^12.1.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^7.23.0", | ||
"eslint-config-next": "^13.1.1", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-react": "^7.23.2", | ||
"eslint-plugin-react-hooks": "^4.2.0", | ||
"husky": "^4.3.5", | ||
"jest": "^26.6.3", | ||
"lint-staged": "^10.5.4", | ||
"next": "^13.1.1", | ||
"next-linaria": "^0.11.0", | ||
"prettier": "^2.2.1", | ||
"rimraf": "^3.0.2", | ||
"stylelint": "^13.12.0", | ||
"stylelint-config-standard": "^21.0.0", | ||
"stylelint-config-styled-components": "^0.1.1", | ||
"stylelint-order": "^4.1.0", | ||
"stylelint-processor-styled-components": "^1.10.0", | ||
"ts-nameof": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@callstack/react-theme-provider": "^3.0.8", | ||
"linaria": "^4.1.11", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"typescript": "^4.9.4" | ||
} | ||
} |
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 @@ | ||
export { Example as default } from '../src/example'; |
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,3 @@ | ||
export const Example = () => { | ||
return <></>; | ||
}; |
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,27 @@ | ||
module.exports = { | ||
extends: ['stylelint-config-standard', 'stylelint-config-styled-components'], | ||
processors: [ | ||
[ | ||
'stylelint-processor-styled-components', | ||
{ | ||
parserPlugins: [ | ||
'jsx', | ||
'objectRestSpread', | ||
['decorators', { decoratorsBeforeExport: true }], | ||
'classProperties', | ||
'exportExtensions', | ||
'asyncGenerators', | ||
'functionBind', | ||
'functionSent', | ||
'dynamicImport', | ||
'optionalCatchBinding', | ||
'optionalChaining', | ||
'nullishCoalescingOperator' | ||
] | ||
} | ||
] | ||
], | ||
rules: { | ||
'declaration-colon-newline-after': null | ||
} | ||
}; |
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 @@ | ||
{ | ||
"extends": "./tsconfig", | ||
"include": ["**/*.js"], | ||
"compilerOptions": { | ||
"allowJs": true | ||
}, | ||
"exclude": ["node_modules"] | ||
} |
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,22 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"module": "esnext", | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"noEmit": true, | ||
"noUnusedLocals": true, | ||
"noUnusedParameters": true, | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"jsx": "preserve", | ||
"esModuleInterop": true, | ||
"incremental": true | ||
}, | ||
"exclude": ["node_modules"], | ||
"include": ["next-env.d.ts", "types.d.ts", "**/*.ts", "**/*.tsx"] | ||
} |
Oops, something went wrong.