Skip to content

Commit b1eaee3

Browse files
committed
Create package configuration files.
1 parent 56c697f commit b1eaee3

File tree

9 files changed

+27443
-0
lines changed

9 files changed

+27443
-0
lines changed

.eslintrc.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es6: true,
5+
},
6+
extends: [
7+
'plugin:react/recommended',
8+
'plugin:prettier/recommended',
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
],
11+
globals: {
12+
Atomics: 'readonly',
13+
SharedArrayBuffer: 'readonly',
14+
},
15+
parser: '@typescript-eslint/parser',
16+
parserOptions: {
17+
ecmaFeatures: {
18+
jsx: true,
19+
},
20+
ecmaVersion: 2018,
21+
sourceType: 'module',
22+
},
23+
plugins: ['@typescript-eslint', 'react', 'react-hooks'],
24+
rules: {
25+
'react-hooks/rules-of-hooks': 'error',
26+
'react-hooks/exhaustive-deps': 'warn',
27+
'react/prop-types': 0,
28+
'no-console': 'error',
29+
},
30+
};

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.cache
2+
package.json
3+
package-lock.json
4+
public

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"semi": true,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

.yarnclean

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# test directories
2+
__tests__
3+
test
4+
tests
5+
powered-test
6+
7+
# asset directories
8+
docs
9+
doc
10+
website
11+
images
12+
assets
13+
14+
# examples
15+
example
16+
examples
17+
18+
# code coverage directories
19+
coverage
20+
.nyc_output
21+
22+
# build scripts
23+
Makefile
24+
Gulpfile.js
25+
Gruntfile.js
26+
27+
# configs
28+
appveyor.yml
29+
circle.yml
30+
codeship-services.yml
31+
codeship-steps.yml
32+
wercker.yml
33+
.tern-project
34+
.gitattributes
35+
.editorconfig
36+
.*ignore
37+
.eslintrc
38+
.jshintrc
39+
.flowconfig
40+
.documentup.json
41+
.yarn-metadata.json
42+
.travis.yml
43+
44+
# misc
45+
*.md

package.json

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{
2+
"name": "codeanit.com",
3+
"private": true,
4+
"description": "Tech-Blog by Anit Shrestha Manandhar.",
5+
"version": "0.5.0",
6+
"author": "Anit Shrestha Manandhar <[email protected]>",
7+
"scripts": {
8+
"build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages",
9+
"dev": "rm -rf .cache && rm -rf public && gatsby develop",
10+
"cy:open": "cypress open",
11+
"cy:run": "cypress run --browser chrome",
12+
"develop": "gatsby develop",
13+
"format": "prettier --write \"./src/**/*.{js,jsx,ts,tsx}\"",
14+
"lint": "eslint --ext=jsx,ts,tsx src",
15+
"serve": "gatsby serve",
16+
"start": "yarn develop",
17+
"test": "is-ci \"test:coverage\" \"test:watch\"",
18+
"test:coverage": "jest --coverage",
19+
"test:e2e": "start-server-and-test develop http://localhost:8000 cy:open",
20+
"test:watch": "jest --watch",
21+
"themelink": "yarn link theme",
22+
"themeunlink": "yarn unlink theme && yarn install --force",
23+
"type-check": "tsc --noEmit"
24+
},
25+
"dependencies": {
26+
"@emotion/core": "^10.0.6",
27+
"@emotion/styled": "^10.0.6",
28+
"@mdx-js/mdx": "^1.1.6",
29+
"@mdx-js/react": "^1.1.6",
30+
"@sindresorhus/slugify": "^0.9.1",
31+
"emotion-theming": "^10.0.6",
32+
"focus-trap-react": "^6.0.0",
33+
"framer-motion": "^1.11.0",
34+
"gatsby": "2.21.11",
35+
"gatsby-image": "2.2.43",
36+
"gatsby-plugin-emotion": "^4.3.3",
37+
"gatsby-plugin-google-analytics": "^2.0.9",
38+
"gatsby-plugin-lunr": "^1.5.2",
39+
"gatsby-plugin-manifest": "2.3.3",
40+
"gatsby-plugin-mdx": "^1.2.6",
41+
"gatsby-plugin-offline": "^2.2.9",
42+
"gatsby-plugin-page-creator": "^2.3.8",
43+
"gatsby-plugin-printer": "1.0.8",
44+
"gatsby-plugin-react-helmet": "^3.3.3",
45+
"gatsby-plugin-sharp": "^2.6.10",
46+
"gatsby-plugin-sitemap": "2.2.27",
47+
"gatsby-plugin-twitter": "^2.3.3",
48+
"gatsby-plugin-typescript": "^2.2.2",
49+
"gatsby-plugin-typography": "^2.5.3",
50+
"gatsby-remark-autolink-headers": "^2.3.4",
51+
"gatsby-remark-copy-linked-files": "^2.3.4",
52+
"gatsby-remark-images": "^3.3.9",
53+
"gatsby-remark-sectionize": "^1.0.0",
54+
"gatsby-source-filesystem": "^2.1.9",
55+
"gatsby-transformer-sharp": "^2.5.4",
56+
"mousetrap": "^1.6.5",
57+
"prop-types": "^15.7.2",
58+
"react": "16.13.0",
59+
"react-anchor-link-smooth-scroll": "^1.0.12",
60+
"react-dom": "16.13.0",
61+
"react-helmet": "^6.0.0",
62+
"react-live": "^2.2.2",
63+
"react-scrollspy": "^3.4.2",
64+
"react-typography": "^0.16.18",
65+
"remark-toc": "^7.0.0",
66+
"typeface-fira-code": "^1.1.4",
67+
"typography": "^0.16.18",
68+
"webpack": "^4.43.0"
69+
},
70+
"devDependencies": {
71+
"@babel/preset-typescript": "7.8.3",
72+
"@testing-library/react": "^10.0.1",
73+
"@types/jest": "^23.0.0",
74+
"@types/react": "16.9.23",
75+
"@types/react-dom": "16.9.5",
76+
"@types/react-helmet": "^5.0.8",
77+
"@typescript-eslint/eslint-plugin": "^2.24.0",
78+
"@typescript-eslint/parser": "^2.19.2",
79+
"babel-jest": "^23.1.0",
80+
"babel-preset-gatsby": "^0.1.7",
81+
"cypress": "4.1.0",
82+
"eslint": "^6.8.0",
83+
"eslint-config-prettier": "^6.10.0",
84+
"eslint-plugin-prettier": "^3.1.2",
85+
"eslint-plugin-react": "^7.18.3",
86+
"eslint-plugin-react-hooks": "^2.3.0",
87+
"identity-obj-proxy": "^3.0.0",
88+
"is-ci-cli": "^1.1.1",
89+
"jest": "25.1.0",
90+
"jest-dom": "^3.0.2",
91+
"jest-emotion": "^10.0.7",
92+
"prettier": "^1.19.1",
93+
"react-test-renderer": "^16.8.1",
94+
"start-server-and-test": "^1.10.11",
95+
"typescript": "^3.2.4"
96+
},
97+
"keywords": [
98+
"gatsby"
99+
],
100+
"license": "MIT",
101+
"repository": {
102+
"type": "git",
103+
"url": "https://github.com/MaximeHeckel/blog.maximeheckel.com"
104+
},
105+
"bugs": {
106+
"url": "https://github.com/gatsbyjs/gatsby/issues"
107+
},
108+
"jest": {
109+
"snapshotSerializers": [
110+
"jest-emotion"
111+
],
112+
"setupFilesAfterEnv": [
113+
"./setup-jest.js"
114+
],
115+
"globals": {
116+
"__PATH_PREFIX__": ""
117+
},
118+
"testURL": "http://localhost",
119+
"transform": {
120+
"^.+\\.[jt]sx?$": "<rootDir>/jest-preprocess.js"
121+
},
122+
"transformIgnorePatterns": [
123+
"node_modules/(?!(gatsby)/)"
124+
],
125+
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx)$",
126+
"testPathIgnorePatterns": [
127+
"node_modules",
128+
".cache"
129+
],
130+
"moduleNameMapper": {
131+
"typeface-*": "identity-obj-proxy",
132+
".+\\.(css|styl|less|sass|scss)$": "identity-obj-proxy",
133+
".+\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/file.js"
134+
},
135+
"collectCoverage": false,
136+
"coverageReporters": [
137+
"lcov",
138+
"text",
139+
"html"
140+
]
141+
}
142+
}

setup-jest.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import 'jest-dom/extend-expect';
2+
3+
global.___loader = {
4+
enqueue: jest.fn(),
5+
};

tsconfig.json

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"compileOnSave": false,
3+
"compilerOptions": {
4+
/* Basic Options */
5+
"target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
6+
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
7+
"lib": ["dom", "es2015", "es2017"], // "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */
8+
/* Specify library files to be included in the compilation. */
9+
10+
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
11+
// "declaration": true, /* Generates corresponding '.d.ts' file. */
12+
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
13+
"sourceMap": false /* Generates corresponding '.map' file. */,
14+
// "outFile": "./", /* Concatenate and emit output to single file. */
15+
// "outDir": "./" /* Redirect output structure to the directory. */,
16+
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
17+
// "composite": true, /* Enable project compilation */
18+
// "removeComments": true, /* Do not emit comments to output. */
19+
// "noEmit": true, /* Do not emit outputs. */
20+
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
21+
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
22+
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
23+
24+
/* Strict Type-Checking Options */
25+
"strict": true /* Enable all strict type-checking options. */,
26+
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
27+
// "strictNullChecks": true, /* Enable strict null checks. */
28+
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
29+
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
30+
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
31+
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
32+
33+
/* Additional Checks */
34+
"noUnusedLocals": true /* Report errors on unused locals. */,
35+
"noUnusedParameters": true /* Report errors on unused parameters. */,
36+
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
37+
"noFallthroughCasesInSwitch": true /* Report errors for fallthrough cases in switch statement. */,
38+
39+
/* Module Resolution Options */
40+
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
41+
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
42+
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
43+
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
44+
// "typeRoots": [], /* List of folders to include type definitions from. */
45+
// "types": [], /* Type declaration files to be included in compilation. */
46+
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
47+
// "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
48+
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
49+
50+
/* Source Map Options */
51+
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
52+
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
53+
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
54+
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
55+
56+
/* Experimental Options */
57+
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
58+
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
59+
},
60+
"include": ["./src/**/*"]
61+
}

0 commit comments

Comments
 (0)