Skip to content
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

cleanup & modernization #61

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier"
],
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": 1, // Means warning
"no-console": 1, // Means warning
"prettier/prettier": 2 // Means error
}
}
}
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"
- name: Install dependencies and build 🔧
run: npm ci && npm run build
- name: Run lint
- name: Run lint
run: npm run lint
- name: Run tests
- name: Run tests
run: npm run test
- name: Package module
run: npm pack
Expand All @@ -33,4 +33,4 @@ jobs:
uses: actions/upload-artifact@v1
with:
name: esptool-js-${{ steps.version.outputs.version }}.tgz
path: esptool-js-${{ steps.version.outputs.version }}.tgz
path: esptool-js-${{ steps.version.outputs.version }}.tgz
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
registry-url: "https://registry.npmjs.org"
- name: Install dependencies and build 🔧
run: npm ci && npm run build
- name: Run lint
- name: Run lint
run: npm run lint
- name: Run tests
- name: Run tests
run: npm run test
- name: Package module
run: npm pack
Expand Down Expand Up @@ -52,4 +52,4 @@ jobs:
- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
node_modules
lib
bundle.js
esptool-js-*.tgz
dist
5 changes: 2 additions & 3 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"printWidth": 120,
"trailingComma": "all"
}
"trailingComma": "none"
}
13 changes: 4 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@
"bundle.js"
],
"scripts": {
"build": "npm run clean && tsc",
"clean": "rimraf lib bundle.js",
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
"lint": "eslint . --ext .ts",
"lintAndFix": "eslint . --ext .ts --fix",
"prepare": "npm run build",
"test": "echo \"Error: no test specified\"",
"prepublishOnly": "npm run test && npm run lint",
"rollup": "npm run build && rollup --config"
"build": "tsc",
"format:check": "prettier --check . && eslint src/**/*.ts",
"format:fix": "prettier --write . && eslint --fix src/**/*.ts",
"rollup": "rollup --config"
},
"repository": {
"type": "git",
Expand Down
Loading