diff --git a/.eslintrc.json b/.eslintrc.json index 214df72..70300b7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,16 +6,8 @@ "node": true }, "extends": ["eslint:recommended", "plugin:prettier/recommended"], - "parserOptions": { - "ecmaFeatures": { - "jsx": true - }, - "sourceType": "module" - }, + "plugins": ["prettier"], "rules": { - "no-unreachable": "warn", - "no-unused-vars": "warn", - "semi": "warn", - "valid-typeof": "warn" + "prettier/prettier": "error" } } diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..1ea4134 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,28 @@ +name: Install, lint and package +on: + # Triggers the workflow on push or pull-request events for the master and Dev branches + push: + branches: [master, Dev] + pull_request: + branches: [master, Dev] + +jobs: + install-lint-package: + runs-on: ubuntu-latest + steps: + - name: Checkout Git repository + uses: actions/checkout@v3 + + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 14 + + - name: Install dependencies + run: npm ci + + - name: Lint codebase + run: npm run lint + + - name: Create package + run: npm run package diff --git a/.vscode/settings.json b/.vscode/settings.json index 92d4065..93af001 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,11 @@ // Place your settings in this file to overwrite default and user settings. { + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.codeActionsOnSave": { + "source.fixAll.eslint": true + }, + "editor.formatOnSave": true + }, "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe" }