Skip to content

Commit

Permalink
Merge branch 'main' into fix_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
SSShogunn authored Oct 12, 2024
2 parents 9c9964e + cc03b44 commit 959c581
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 9 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Format

on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -16,11 +19,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # Use the Node.js version your project requires
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run Prettier to check formatting
run: npm run prettier -- --check
continue-on-error: false # Fail the workflow if formatting issues are found
continue-on-error: false
13 changes: 7 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: Lint and Format
name: Lint

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
lint-and-format:
lint:
runs-on: ubuntu-latest

steps:
Expand All @@ -16,13 +19,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16' # or whichever version your project requires
node-version: '20'

- name: Install dependencies
run: npm install

- name: Run Prettier to check formatting
run: npm run format -- --check

- name: Run ESLint to check for linting issues
run: npm run lint
continue-on-error: false
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,16 @@ npm run lint

This command will execute ESLint on your project files and report any errors or warnings.

### Running the Formatter

To format your code, run the following command:

```bash
npm run format
```

This command will execute Prettier on your project files and apply consistent formatting according to the rules defined in your configuration.

## Maintainers

This project is actively maintained by:
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ npm run lint

This command will execute ESLint on your project files and report any errors or warnings.

### Running the Formatter

To format your code, run the following command:

```bash
npm run format
```

This command will execute Prettier on your project files and apply consistent formatting according to the rules defined in your configuration.

## Contributing to Hacktoberfest 2024 🎉

![hecktoberfest](https://github.com/user-attachments/assets/9352e904-6b2d-495e-8140-1437e385ffdb)
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write .",
"prettier": "prettier --check .",
"lint": "eslint ."
},
"keywords": [],
Expand Down
3 changes: 2 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ function addTodo() {
updateTodoList();
}

// eslint-disable-next-line no-unused-vars
function deleteTodo(index) {
// Remove the specific todo from the list
todoList.splice(index, 1);
localStorage.setItem('todoList', JSON.stringify(todoList));
updateTodoList();
}

// eslint-disable-next-line no-unused-vars
function editTodo(index) {
let inputNameElement = document.querySelector('.js-name-input');
let inputDateElement = document.querySelector('.js-date-input');
Expand Down

0 comments on commit 959c581

Please sign in to comment.