Skip to content

Commit

Permalink
Merge branch 'main' into hb-files
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbollar committed Nov 14, 2023
2 parents 98d59b0 + 0f6eb09 commit d69c337
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Check MRjs has been linted
name: npm run format

on:
workflow_dispatch:
push:

permissions:
contents: read

jobs:
check-format:
runs-on: ubuntu-latest
# needs: build # todo
steps:
- uses: actions/checkout@v2

# todo - run the npm install with a dockerfile setup instead of pure
# install but not important to do right now since install isnt too long

- uses: actions/setup-node@v2
with:
node-version: 18

# todo - are the dependencies needed for lint?

- name: Install Dependencies
run: |
npm install
- name: 👷 Check if format is needed
run: |
if ! npm run check-format; then
echo "Some files need formatting. Run 'npm run format' to format them."
exit 1
fi
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"main": "dist/build.js",
"scripts": {
"build": "npx webpack --config webpack.config.js",
"test": "echo \"Error: no test specified\" && exit 1",
"format": "prettier --write \"src/**/*.js\" \"*.js\"",
"check-format": "prettier --list-different \"src/**/*.js\" \"*.js\"",
"test": "node --experimental-vm-modules ./node_modules/.bin/jest",
"docs": "npx jsdoc src/*.js --destination ./docs"
},
"repository": {
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default {
MRJS: 'MRJS',
}),
],

module: {
rules: [
{
Expand Down

0 comments on commit d69c337

Please sign in to comment.