Skip to content

Commit 1ad6360

Browse files
committed
initial commit
1 parent 0cb2d80 commit 1ad6360

7 files changed

+154
-0
lines changed

.eslintignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Third party
2+
**/node_modules
3+
4+
# Not written by hand
5+
packages/react-art/npm/lib
6+
7+
# Build products
8+
build/
9+
coverage/
10+
fixtures/
11+
scripts/bench/benchmarks/**/*.js
12+
13+
# React repository clone
14+
scripts/bench/remote-repo/
15+
16+
packages/react-devtools-core/dist
17+
packages/react-devtools-extensions/chrome/build
18+
packages/react-devtools-extensions/firefox/build
19+
packages/react-devtools-extensions/shared/build
20+
packages/react-devtools-extensions/src/ErrorTesterCompiled.js
21+
packages/react-devtools-inline/dist
22+
packages/react-devtools-shared/src/hooks/__tests__/__source__/__compiled__/
23+
packages/react-devtools-shared/src/hooks/__tests__/__source__/__untransformed__/
24+
packages/react-devtools-shell/dist
25+
packages/react-devtools-timeline/dist
26+
packages/react-devtools-timeline/static

.eslintrc.js

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
module.exports = {
2+
settings: {
3+
'import/resolver': {
4+
node: {
5+
extensions: ['.js', '.jsx', '.ts', '.tsx'],
6+
},
7+
},
8+
},
9+
env: {
10+
browser: true,
11+
es2021: true,
12+
},
13+
extends: ['airbnb', 'prettier', 'plugin:prettier/recommended'],
14+
parser: '@typescript-eslint/parser',
15+
parserOptions: {
16+
ecmaVersion: 'latest',
17+
sourceType: 'module',
18+
},
19+
plugins: ['@typescript-eslint', 'prettier'],
20+
rules: {
21+
'linebreak-style': 'off',
22+
'import/extensions': [
23+
'error',
24+
'never',
25+
{
26+
json: 'always',
27+
},
28+
],
29+
'react/function-component-definition': [
30+
'error',
31+
{
32+
namedComponents: 'arrow-function',
33+
unnamedComponents: 'arrow-function',
34+
},
35+
],
36+
'react/jsx-filename-extension': 'off',
37+
'react/jsx-props-no-spreading': 'off',
38+
'react/jsx-indent': 'off',
39+
'react/jsx-indent-props': [0, 'first'],
40+
'react/require-default-props': 'off',
41+
'react/jsx-wrap-multilines': 'off',
42+
'no-use-before-define': 'off',
43+
'import/prefer-default-export': 'off',
44+
'react/react-in-jsx-scope': 'off',
45+
indent: 'off',
46+
},
47+
};

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text eol=lf

.gitignore

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
.env
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

.prettierrc.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 4,
4+
"semi": true,
5+
"singleQuote": true
6+
}

package.json

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "clean-code-starter",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"build": "babel -x \".ts\" -x \".tsx\" -x \".js\" ./src --out-dir ./dist && tsc"
8+
},
9+
"author": "",
10+
"license": "ISC",
11+
"dependencies": {
12+
"react": "^17.0.2",
13+
"react-dom": "^17.0.2"
14+
},
15+
"devDependencies": {
16+
"@babel/cli": "^7.17.6",
17+
"@babel/core": "^7.17.5",
18+
"@babel/plugin-transform-typescript": "^7.16.1",
19+
"@babel/preset-typescript": "^7.16.0",
20+
"@typescript-eslint/parser": "^5.12.1",
21+
"eslint": "^8.9.0",
22+
"eslint-config-airbnb": "^19.0.4",
23+
"eslint-config-prettier": "^8.4.0",
24+
"eslint-plugin-import": "^2.25.4",
25+
"eslint-plugin-jsx-a11y": "^6.5.1",
26+
"eslint-plugin-prettier": "^4.0.0",
27+
"eslint-plugin-react": "^7.28.0",
28+
"eslint-plugin-react-hooks": "^4.3.0",
29+
"prettier": "^2.5.1",
30+
"typescript": "^4.5.5"
31+
}
32+
}

tsconfig.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"compilerOptions": {
3+
"target": "es6",
4+
"rootDir": "src",
5+
"jsx": "preserve",
6+
// Ensure that .d.ts files are created by tsc, but not .js files
7+
"declaration": true,
8+
"emitDeclarationOnly": true,
9+
// Ensure that Babel can safely transpile files in the TypeScript project
10+
"isolatedModules": true,
11+
"outDir": "./dist/",
12+
"moduleResolution": "Node",
13+
"allowSyntheticDefaultImports": true,
14+
"resolveJsonModule": true,
15+
"lib": ["ES2021", "DOM"]
16+
},
17+
"include": ["src"],
18+
"exclude": ["node_modules/**"]
19+
}

0 commit comments

Comments
 (0)