Skip to content

Commit

Permalink
chore: little fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Emmo00 committed Nov 18, 2023
1 parent a8d8438 commit e7cf875
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ ALX test Suite. Shell Utility that checks for ALX Project Requirements
### JavaScript

- Javascript file is executable
> Note: enabled with `-js` or `--nodejs-project` commandline switch. See [Usage](#usage) below
> Note: enabled with `-js` or `--nodejs-project` command line switch. See [Usage](#usage) below
- *shebang* is present and at the top of the file (`#!/usr/bin/node` or `#!/usr/bin/env node`)
> Note: enabled with `-js` or `--nodejs-project` commandline switch. See [Usage](#usage) below
> Note: enabled with `-js` or `--nodejs-project` command line switch. See [Usage](#usage) below
- `semistandard` check
> Note: you would have to install semistandard `npm install semistandard -g`
- `var` is not used.
Expand All @@ -62,12 +62,14 @@ After installation, to use this package, just run it as a shell command. This st
alxcheck
```

If the project is a JavaScript project with node.js scripts, a commandline switch can be used to enable the first two checks [listed above](#javascript).
If the project is a JavaScript project with node.js scripts, a command line switch can be used to enable the first two checks [listed above](#javascript).

```bash
alxcheck -js #shorthand version
```

or

```bash
alxcheck --nodejs-project #long version
```
Expand Down
4 changes: 2 additions & 2 deletions alxcheck/utils/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ def is_python_virtual_env_folder(folder_path):


def is_nodejs_project():
"""Checks for node.js commandline switches"""
switches = ('-js', '--nodejs-checks')
"""Checks for node.js command line switches"""
switches = ("-js", "--nodejs-checks")
for switch in switches:
if switch in sys.argv:
return True
Expand Down

0 comments on commit e7cf875

Please sign in to comment.