Skip to content

Commit 0e7842e

Browse files
authored
feat: 🎸 add eslint configuration (#4)
* feat: add husky and jest * feat: 🎸 add new husky cli config * feat: 🎸 add commit lint * feat: 🎸 add ISSUE_TEMPLATE and PULL_REQUEST_TEMPLATE * feat: 🎸 add new workflows to Github actions * fix: 🐛 Fix node version CI * fix: 🐛 add new nvvm and behaviors for eslint
1 parent 0c17a90 commit 0e7842e

File tree

7 files changed

+64
-5
lines changed

7 files changed

+64
-5
lines changed

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# http://editorconfig.org
4+
5+
root = true
6+
7+
[*]
8+
9+
# Change these settings to your own preference
10+
indent_style = space
11+
indent_size = 2
12+
13+
# We recommend you to keep these unchanged
14+
end_of_line = lf
15+
charset = utf-8
16+
trim_trailing_whitespace = true
17+
insert_final_newline = true
18+
19+
[*.md]
20+
trim_trailing_whitespace = false
21+
22+
# 4 space indentation
23+
[*.html]
24+
indent_style = space
25+
indent_size = 4

.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
NODE_PATH=src/
2+
PORT=8000
3+
NEXT_PUBLIC_PACKAGE_NAME=consumer_front_web
4+
SKIP_PREFLIGHT_CHECK=true
5+
PUBLIC_URL=/
6+
NEXT_PUBLIC_PROXY=/

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/mocks

.eslintrc.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
{
2-
"extends": "next/core-web-vitals"
2+
"extends": [
3+
"next/core-web-vitals",
4+
"plugin:react-hooks/recommended",
5+
"plugin:sonarjs/recommended"
6+
]
37
}

.github/workflows/CI.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,17 @@ jobs:
1616
steps:
1717
- name: Checkout
1818
uses: actions/checkout@v3
19-
- name: Use Node.js 18
19+
- name: Use Node.js 19
2020
uses: actions/setup-node@v3
2121
with:
22-
node-version: 18
22+
node-version: 19
2323
- name: Install Project
2424
run: npm install
25-
- name: CI
25+
- name: CI
2626
run: npm ci
2727
- name: Build
2828
run: npm run build --if-present
2929
- name: Tests
3030
run: npm run test
3131

3232

33-

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
19

.nycrc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"temp-directory": "./coverage/.nyc_output",
3+
"include": [
4+
"server/**/*.js",
5+
"index.js"
6+
],
7+
"exclude": [
8+
"**/node_modules/**",
9+
"**/test/nodejs/**",
10+
"**/coverage/**"
11+
],
12+
"all": true,
13+
"lines": 10,
14+
"statements": 10,
15+
"functions": 10,
16+
"branches": 10,
17+
"reporter": [
18+
"text",
19+
"text-summary",
20+
"lcov"
21+
],
22+
"sourceMap": false
23+
}

0 commit comments

Comments
 (0)