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

chore: Convert tests and code to modern JS #906

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

7 changes: 0 additions & 7 deletions .babelrc-umd

This file was deleted.

12 changes: 12 additions & 0 deletions .babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
const config = {
comments: true,
presets: ['@babel/preset-env', ['@babel/typescript', { allExtensions: true, isTSX: false }]],
plugins: [
'@babel/plugin-proposal-class-properties',
['@babel/plugin-proposal-object-rest-spread', { useBuiltIns: true }],
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-transform-runtime',
],
};

module.exports = config;
76 changes: 0 additions & 76 deletions .eslintrc

This file was deleted.

8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
extends: ['@octopusthink/eslint-config'],
rules: {
'@typescript-eslint/rule-name': 'error',
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint']
};
27 changes: 27 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Tests

on:
push:
branches:
- '!*'
- '!gh-pages'
- 'master'
tags:
- v*
pull_request:
branches:
- '*'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: 10
- name: Install dependencies
run: npm install
- name: Run unit tests and code coverage
run: npm run test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ components
test/localforage.browserify.js
test/localforage.component.js
test/localforage.webpack.js
dist

# Logs + Sauce Labs Tests
*.log
Expand Down
2 changes: 1 addition & 1 deletion .huskyrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"hooks": {
"pre-commit": "lint-staged"

}
}
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
4 changes: 0 additions & 4 deletions .prettierrc

This file was deleted.

3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
before_install:
- npm install -g bower
- bower install
- npm install
language: node_js
node_js:
- '10'
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2014 Mozilla
Copyright 2019 Matthew Riley MacPherson and Thodoris Greasidis.
Previous versions Copyright 2013 Mozilla.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
12 changes: 12 additions & 0 deletions dist/localforage.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/localforage.js.map

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions dist/localforage.min.js

This file was deleted.