Skip to content

Commit

Permalink
🛀 update toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Jun 7, 2024
1 parent 2d66a57 commit c3d43d9
Show file tree
Hide file tree
Showing 16 changed files with 3,414 additions and 2,703 deletions.
2 changes: 1 addition & 1 deletion .c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"all": true,
"es-modules": true,
"include": ["src/**"],
"reporter": ["clover", "lcov", "text"],
"reporter": ["clover"],
"report-dir": "./.build/coverage",
"temp-dir": "./.build/c8"
}
50 changes: 0 additions & 50 deletions .eslintrc.json

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: "checkout sources"
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: "install dependencies"
run: npm install
Expand All @@ -32,9 +32,10 @@ jobs:
run: npm run build-src

- name: "send code coverage report to codecov.io"
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
directory: ./.build/coverage/
token: ${{ secrets.CODECOV_TOKEN }}
files: .build/coverage/clover.xml

- name: "build docs"
run: npm run jsdoc
Expand All @@ -47,7 +48,7 @@ jobs:
clean: true

- name: "upload artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: js-qrcode-${{ github.sha }}
path: ./dist
19 changes: 0 additions & 19 deletions .github/workflows/publish.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"extension": ["test.js"],
"recursive": true,
"ui": "tdd"
"ui": "tdd",
"spec": [
"test/**/*.test.js"
]
}
1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": "@istanbuljs/nyc-config-babel",
"temp-dir": ".build/.nyc_output"
}

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ A javascript port of [chillerlan/php-qrcode](https://github.com/chillerlan/php-q

[license-badge]: https://img.shields.io/github/license/chillerlan/js-qrcode.svg
[license]: https://github.com/chillerlan/js-qrcode/blob/main/LICENSE
[coverage-badge]: https://codecov.io/gh/chillerlan/js-qrcode/branch/main/graph/badge.svg?token=03VT14Q8UW
[coverage-badge]: https://img.shields.io/codecov/c/github/chillerlan/js-qrcode?logo=codecov&logoColor=ccc
[coverage]: https://codecov.io/github/chillerlan/js-qrcode
[gh-action-badge]: https://github.com/chillerlan/js-qrcode/workflows/build/badge.svg
[gh-action-badge]: https://img.shields.io/github/actions/workflow/status/chillerlan/js-qrcode/build.yml?branch=main&logo=github&logoColor=ccc
[gh-action]: https://github.com/chillerlan/js-qrcode/actions/workflows/build.yml?query=branch%3Amain

## Documentation
Expand Down
7 changes: 4 additions & 3 deletions babel.config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"exclude": "node_modules/**",
"plugins": [
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread"
"@babel/plugin-syntax-import-attributes",
"istanbul"
],
"presets": [
[
Expand All @@ -14,7 +15,7 @@
]
},
"useBuiltIns": "entry",
"corejs": "^3.6"
"corejs": "3.37"
}
]
]
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import babelParser from "@babel/eslint-parser";

export default [
{
files: ['**/*.js'],
ignores: [
'**/dist/**',
'**/lib/**',
'**/node_modules/**',
],
languageOptions: {
parser: babelParser,
parserOptions: {
sourceType: 'module',
requireConfigFile: false,
babelOptions: {
configFile: './babel.config.json',
},

},
ecmaVersion: 2022
},
rules: {
'no-console': 'off',
'no-debugger': 'off',
'no-unused-vars': 'off',
'eqeqeq': 'error',
'no-useless-escape': 'off',
'quotes': [
'error',
'single',
{
'avoidEscape': false
}
],
'max-len': [
2,
{
'code': 130,
'tabWidth': 4,
'ignoreUrls': true,
'ignoreComments': true
}
],
'curly': [
'error',
'all'
]

}
}
];
Loading

0 comments on commit c3d43d9

Please sign in to comment.