-
Notifications
You must be signed in to change notification settings - Fork 0
Add linter #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linter #1
Changes from all commits
d7256a0
7e80ec4
c95827d
f62afcc
0a62e0b
c9ebbad
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,15 @@ | ||
Thank you for contributing. | ||
We're trying to keep the module up to date and we're adding new features everytime. | ||
# Contributing | ||
|
||
Thank you for contributing! | ||
|
||
We're trying to keep the module up to date and we're adding new features every time. | ||
Your contribution help us so much in a lot of ways. | ||
|
||
We ask you to keep contributing, and feel free to open as many issues and PR as you need. | ||
We ask you to keep contributing, and feel free to open as many issues and PR as you need. | ||
|
||
## Developer commands | ||
|
||
- `npm run lint` - Run linting checks. | ||
- `npm run lint:fix` - Fix linting issues. | ||
- `npm run test` - Run linting and formatter checks + Run spelling check. | ||
- `npm run test:spelling` - Run spelling check. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Automated Tests | ||
on: | ||
push: | ||
branches: [master, develop] | ||
pull_request: | ||
branches: [master, develop] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
run-lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
steps: | ||
- run: echo "Starting automated tests for ${{ github.repository }} on ${{ github.ref }}" | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: npm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Check spelling | ||
run: npm run test:spelling | ||
- name: Check linting | ||
run: npm run lint | ||
- run: echo "Test job status is ${{ job.status }}." |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,4 @@ node_modules | |
# Default settings | ||
settings.json | ||
|
||
# Package Lock File | ||
package-lock.json | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,16 @@ | |
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](http://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/). | ||
The format is based on [Keep a Changelog](https://keepachangelog.com/) | ||
and this project adheres to [Semantic Versioning](https://semver.org/). | ||
|
||
## [2.5.0] - Unreleased (`develop` branch) | ||
|
||
### Added | ||
|
||
- Added a spell checker and fixed problems that were found (#308). | ||
- Added JavaScript linting (for the start with soft rules). | ||
- Added GitHub workflow for linting and spell checking on every push and pull request. | ||
Comment on lines
+8
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Enhance the changelog entry with more details While the entry follows the Keep a Changelog format, it would be more helpful to:
Consider this format: -## [2.5.0] - Unreleased (`develop` branch)
+## [2.4.1] - Unreleased (`develop` branch)
### Added
-Added a spell checker and fixed problems that were found (#308).
-Added JavaScript linting (for the start with soft rules).
-Added GitHub workflow for linting and spell checking on every push and pull request.
+- Added cspell for spell checking with custom dictionary support (#308)
+- Added ESLint for JavaScript linting with following initial rules:
+ - [list key rules here]
+- Added GitHub Actions workflow that:
+ - Runs ESLint checks
+ - Performs spell checking
+ - Triggers on push and pull request events
🧰 Tools🪛 LanguageTool[style] ~13-~13: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) [style] ~14-~14: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE)
Comment on lines
+12
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification PR title and description need updating to reflect all changes The GitHub workflow file confirms the implementation of both spell checking and linting in automated tests, validating the changelog entries. The PR title should be updated to "Add linting and spell checking" to accurately reflect these changes, and a proper description should be added to document the complete scope:
🔗 Analysis chainUpdate PR title and description to match changes The PR title "Add linter" doesn't fully reflect the scope of changes, which include:
Please update the PR title and add a proper description detailing these changes. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Verify if the workflow file exists and contains both linting and spell checking
gh pr view 1 --json title,body
find .github/workflows -type f -name "*.y*ml" -exec cat {} \;
Length of output: 2053 🧰 Tools🪛 LanguageTool[style] ~13-~13: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) [style] ~14-~14: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym. (ENGLISH_WORD_REPEAT_BEGINNING_RULE) |
||
|
||
## [2.4.0] - 2024-10-08 | ||
|
||
|
@@ -120,7 +128,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |
### Added | ||
|
||
- Updates now show if there's an update available every day (#52) | ||
- Templates for issues and PRs, and also stale for automanagement of issues. | ||
- Templates for issues and PRs, and also stale for auto management of issues. | ||
- Close Dev Tools (#119) | ||
- Undo Config Implementation [Beta] | ||
- Classes to show, hide or toggle multiple modules at once (#34) | ||
|
@@ -150,7 +158,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). | |
|
||
## [2.1.0] - 2020-11-01 | ||
|
||
Hello! Ezequiel here. Just wanted to say thanks for trust in me, in the past days I made a lot of changes into the code, adding some functions that'll surely be in a future release, and also putting everything together in my fork. I answered almost every issue raised, and tried to help every person that use this module. Today, I'm glad to be able to share everything I learned to all of you. I apologize for some fast and uncommented commits, I just thinked that some things needed to be fixed ASAP. | ||
Hello! Ezequiel here. Just wanted to say thanks for trust in me, in the past days I made a lot of changes into the code, adding some functions that'll surely be in a future release, and also putting everything together in my fork. I answered almost every issue raised, and tried to help every person that use this module. Today, I'm glad to be able to share everything I learned to all of you. I apologize for some fast and uncommented commits, I just thought that some things needed to be fixed ASAP. | ||
See you in future commits, issues and PRs :D | ||
|
||
### Fixed | ||
|
@@ -162,7 +170,7 @@ See you in future commits, issues and PRs :D | |
- IP now showing (#194) | ||
- MM restart button don't just stop anymore (#126) | ||
- Saving config should work as expected now (#153) | ||
- installer.sh now detects where's the node instalation (#222) | ||
- installer.sh now detects where's the node installation (#222) | ||
|
||
### Added | ||
|
||
|
@@ -178,7 +186,7 @@ See you in future commits, issues and PRs :D | |
|
||
## [2.0.1] - 2020-10-28 | ||
|
||
**Huge thanks to [@ezeholz](https://github.com/ezeholz)** who has offered to maintain the module fron now on! | ||
**Huge thanks to [@ezeholz](https://github.com/ezeholz)** who has offered to maintain the module from now on! | ||
Credit for this (and future) versions and releases goes to @ezeholz (unless noted otherwise). | ||
|
||
Now requires MagicMirror² version 2.7. | ||
|
@@ -191,7 +199,7 @@ Now requires MagicMirror² version 2.7. | |
|
||
## [2.0.0] - 2019-02-21 | ||
|
||
Huge shoutout to [shbatm](https://github.com/shbatm) for his work on this new major version, which brings a new API, custom menus and commands and lots of other stuff: | ||
Huge shout out to [shbatm](https://github.com/shbatm) for his work on this new major version, which brings a new API, custom menus and commands and lots of other stuff: | ||
|
||
### Added | ||
|
||
|
@@ -307,7 +315,7 @@ Huge shoutout to [shbatm](https://github.com/shbatm) for his work on this new ma | |
- Menu to change the `config.js` | ||
- Modules can be installed, added, removed, configured | ||
- There will be backups of the five last versions of the `config.js` in the `config` folder | ||
- Some of these parts are hidden behind an "exprimental" warning, do **not** ignore that warning | ||
- Some of these parts are hidden behind an "experimental" warning, do **not** ignore that warning | ||
- NOTIFICATION action, see [README.md](README.md#notification-request) for details | ||
|
||
### Changed | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"version": "0.2", | ||
"language": "en", | ||
"words": [ | ||
"apikey", | ||
"articlelessdetails", | ||
"articlemoredetails", | ||
"articlenext", | ||
"articleprevious", | ||
"articlescrollup", | ||
"articletogglefull", | ||
"Ausschalten", | ||
"Bethge", | ||
"bokmål", | ||
"cambio", | ||
"chlog", | ||
"defaultmodules", | ||
"Energieoptionen", | ||
"extdocs", | ||
"ezeholz", | ||
"Ezequiel", | ||
"Flickr", | ||
"FULLSCREEN", | ||
"HIDEALERT", | ||
"HIDEALL", | ||
"jopyth", | ||
"juzim", | ||
"kapsolas", | ||
"Keyport", | ||
"khassel", | ||
"Kristjan", | ||
"kvpairs", | ||
"listname", | ||
"LOCKSTRING", | ||
"lockstrings", | ||
"longname", | ||
"MODULEAPI", | ||
"MONITOROFF", | ||
"MONITORON", | ||
"MONITORSTATUS", | ||
"MONITORTIMED", | ||
"MONITORTOGGLE", | ||
"mymodulename", | ||
"mypayload", | ||
"Mysh", | ||
"navicon", | ||
"newsfeed", | ||
"newsitems", | ||
"Norsk", | ||
"plusplus", | ||
"REFRESHMM", | ||
"remotecontrol", | ||
"RESTARTMM", | ||
"revparse", | ||
"SENDALERT", | ||
"shbatm", | ||
"showalert", | ||
"SHOWALL", | ||
"somthingelse", | ||
"TOGGLEFULLSCREEN", | ||
"UPDATEMM", | ||
"userpresence", | ||
"vcgencmd", | ||
"Wooo", | ||
"xsmall", | ||
"YOURAPIKEY" | ||
], | ||
"ignorePaths": [ | ||
"modules.json", | ||
"node_modules/**", | ||
"translations/**", | ||
"*.min.js" | ||
], | ||
"dictionaries": [ | ||
"node" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use LTS version of Node.js
Node.js 22 is currently not an LTS version and is in development. This could lead to stability issues.
Use an LTS version instead:
📝 Committable suggestion