Skip to content

Commit baa9d8d

Browse files
committed
ADD: ESLint;
Installing and configuring eslint and its dependencies
1 parent 73f6afd commit baa9d8d

File tree

3 files changed

+167
-0
lines changed

3 files changed

+167
-0
lines changed

.eslintignore

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
### Node template
2+
# Logs
3+
logs
4+
*.log
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
lerna-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Microbundle cache
58+
.rpt2_cache/
59+
.rts2_cache_cjs/
60+
.rts2_cache_es/
61+
.rts2_cache_umd/
62+
63+
# Optional REPL history
64+
.node_repl_history
65+
66+
# Output of 'npm pack'
67+
*.tgz
68+
69+
# Yarn Integrity file
70+
.yarn-integrity
71+
72+
# dotenv environment variables file
73+
.env
74+
.env.test
75+
76+
# parcel-bundler cache (https://parceljs.org/)
77+
.cache
78+
.parcel-cache
79+
80+
# Next.js build output
81+
.next
82+
out
83+
84+
# Nuxt.js build / generate output
85+
.nuxt
86+
dist
87+
88+
# Gatsby files
89+
.cache/
90+
# Comment in the public line in if your project uses Gatsby and not Next.js
91+
# https://nextjs.org/blog/next-9-1#public-directory-support
92+
# public
93+
94+
# vuepress build output
95+
.vuepress/dist
96+
97+
# Serverless directories
98+
.serverless/
99+
100+
# FuseBox cache
101+
.fusebox/
102+
103+
# DynamoDB Local files
104+
.dynamodb/
105+
106+
# TernJS port file
107+
.tern-port
108+
109+
# Stores VSCode versions used for testing VSCode extensions
110+
.vscode-test
111+
112+
# yarn v2
113+
.yarn/cache
114+
.yarn/unplugged
115+
.yarn/build-state.yml
116+
.yarn/install-state.gz
117+
.pnp.*
118+

.eslintrc.json

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"es2021": true,
5+
"browser": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:react/recommended",
10+
"plugin:prettier/recommended",
11+
"plugin:@typescript-eslint/recommended"
12+
13+
],
14+
"parser": "@typescript-eslint/parser",
15+
"parserOptions": {
16+
"ecmaFeatures": {
17+
"jsx": true
18+
},
19+
"sourceType": "module",
20+
"ecmaVersion": "latest"
21+
},
22+
"plugins": [
23+
"react",
24+
"@typescript-eslint"
25+
],
26+
"rules": {
27+
"prettier/prettier": [
28+
"error",
29+
{
30+
"endOfLine": "auto"
31+
},
32+
{
33+
"usePrettierrc": true
34+
}
35+
],
36+
"react/react-in-jsx-scope": "off"
37+
}
38+
}

package.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,22 @@
1616
"@types/node": "^17.0.9",
1717
"@types/react": "^17.0.38",
1818
"@types/react-dom": "^17.0.11",
19+
"@typescript-eslint/eslint-plugin": "^5.10.0",
20+
"@typescript-eslint/parser": "^5.10.0",
21+
"eslint": "^8.7.0",
22+
"eslint-config-prettier": "^8.3.0",
23+
"eslint-plugin-prettier": "^4.0.0",
24+
"eslint-plugin-react": "^7.28.0",
1925
"prettier": "2.5.1",
2026
"typescript": "^4.5.4",
2127
"webpack": "^5.66.0"
2228
},
2329
"eslintConfig": {
30+
"extends": [
31+
"react-app",
32+
],
33+
"overrides": [
34+
]
2435
},
2536
"browserslist": {
2637
"production": [

0 commit comments

Comments
 (0)