Skip to content

Commit

Permalink
Merge pull request #4 from tpluscode/test
Browse files Browse the repository at this point in the history
test: workflow and example
  • Loading branch information
jordaaash committed Mar 15, 2023
2 parents 36374a3 + 582eec7 commit 80478e0
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"extends": [
"plugin:require-extensions/recommended"
],
"plugins": [
"require-extensions"
],
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 2020
},
"ignorePatterns": [
"/index.js"
]
}
17 changes: 17 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Tests

on: [pull_request, push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ 14, 16, 18 ]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm i
- run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
Empty file added example/foo.json
Empty file.
7 changes: 7 additions & 0 deletions example/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import 'foo';
import './foo.js'
import './foo.json'
// eslint-disable-next-line require-extensions/require-extensions
import './foo'
// eslint-disable-next-line require-extensions/require-extensions
import './bar.json'
3 changes: 3 additions & 0 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"LICENSE",
"README.md"
],
"scripts": {
"test": "eslint . --report-unused-disable-directives"
},
"publishConfig": {
"access": "public"
},
Expand Down

0 comments on commit 80478e0

Please sign in to comment.