Skip to content

Commit 055d83e

Browse files
authored
Merge pull request #62 from chkware/25-lint
feat: add eslint and prettier
2 parents d841f7c + 1929abf commit 055d83e

36 files changed

Lines changed: 3299 additions & 1938 deletions

.eslintignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

.eslintrc.js

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// .eslintrc.js
2+
module.exports = {
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
node: true,
7+
},
8+
extends: [
9+
"eslint:recommended",
10+
"plugin:react/recommended",
11+
"plugin:prettier/recommended",
12+
],
13+
settings: {
14+
react: {
15+
version: "detect",
16+
},
17+
},
18+
parserOptions: {
19+
ecmaFeatures: {
20+
jsx: true,
21+
},
22+
ecmaVersion: "latest",
23+
sourceType: "module",
24+
},
25+
plugins: ["react"],
26+
rules: {
27+
"react/react-in-jsx-scope": "off",
28+
},
29+
};

.github/workflows/test-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,11 @@ jobs:
2828
- name: Install dependencies
2929
run: npm ci
3030

31+
- name: Run lint
32+
run: npm run lint
33+
34+
- name: Run prettier
35+
run: npm run prettier
36+
3137
- name: Test Build
3238
run: npm run build

.prettierignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

.prettierrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"semi": true,
3+
"arrowParens": "always",
4+
"bracketSpacing": true,
5+
"printWidth": 80,
6+
"singleQuote": false,
7+
"tabWidth": 2
8+
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ This repository holds source code and publishable website for [CHKware](https://
44

55
### Install and setup
66

7-
- Head to [CHKware website](https://docs.chkware.com), for documentation, if you want to use *CHKware* in your project.
7+
- Head to [CHKware website](https://docs.chkware.com), for documentation, if you want to use _CHKware_ in your project.
88
- Jump to the [setup for website developer](https://docs.chkware.com/setup/setup-site-dev) if you want to contribute to this repository.

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
2+
presets: [require.resolve("@docusaurus/core/lib/babel/preset")],
33
};

0 commit comments

Comments
 (0)