Skip to content

Commit

Permalink
Updated the project with the boilerplate ES6lib v2.2 (Github Actions).
Browse files Browse the repository at this point in the history
  • Loading branch information
jclo committed Feb 1, 2024
1 parent d909a9e commit befeac0
Show file tree
Hide file tree
Showing 19 changed files with 2,819 additions and 7,216 deletions.
Empty file added .eslintignore
Empty file.
20 changes: 10 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
* Set JavaScript language options
*/
"parserOptions": {
"sourceType": "script",
"sourceType": "script"
},
/**
* Set Environnement
*/
"env": {
"browser": false
"browser": true
},
/**
* Set globals
Expand All @@ -22,13 +22,13 @@
"extends": "airbnb-base",
// Overwritten airbnb's rules:
"rules": {
strict: ["error", "global"],
func-names: ["error", "never"],
space-before-function-paren: ["error", "never"],
no-plusplus: ["error", { "allowForLoopAfterthoughts": true }],
"no-multi-spaces": [2, { exceptions: { "VariableDeclarator": true } }],
comma-style: ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
indent: ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
no-multiple-empty-lines: ["error", { "max": 2, "maxEOF": 0 }]
"strict": ["error", "global"],
"func-names": ["error", "never"],
"space-before-function-paren": ["error", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }],
"no-multi-spaces": [2, { "exceptions": { "VariableDeclarator": true } }],
"comma-style": ["error", "first", { "exceptions": { "ArrayExpression": true, "ObjectExpression": true } }],
"indent": ["error", 2, { "VariableDeclarator": { "const": 2 }, "SwitchCase": 1 }],
"no-multiple-empty-lines": ["error", { "max": 2, "maxEOF": 0 }]
}
}
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This workflow will run tests using node.
name: CI pipeline

on:
push:
branches: [ master, main ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm install
- run: npm test
- run: npm run check:coverage

- name: Coveralls
uses: coverallsapp/github-action@v2
# -- oOo --
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
.DS_Store
__trash
_old_*

.nyc_output
node_modules
coverage
node_modules

_db
*sublime*
z_*
dbgeoip
5 changes: 4 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,8 @@
. "$(dirname "$0")/_/husky.sh"

npm test
npm run check-coverage
npm run check:coverage
npm run report


# -- oOo ---
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!lib/*
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
### HEAD

### 0.3.x (January 29, 2022)
### 0.3.x (February 1, 2024)

* Removed an obsolete badge from the README.md file,
* Updated the project with the boilerplate ES6lib v2.2 (Github Actions),
* ...,


Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2022 jclo <jclo@mobilabs.fr> (http://www.mobilabs.fr/)
Copyright (c) 2024 Mobilabs <contact@mobilabs.fr> (http://www.mobilabs.fr)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 4 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NPM version][npm-image]][npm-url]
[![GitHub last commit][commit-image]][commit-url]
[![Travis CI][travis-image]][travis-url]
[![Github workflow][ci-image]][ci-url]
[![Test coverage][coveralls-image]][coveralls-url]
[![License][license-image]](LICENSE.md)

Expand Down Expand Up @@ -142,21 +142,17 @@ Some IP addresses do not report `city` information. Most IPv6 addresses report c
[npm-image]: https://img.shields.io/npm/v/jgeoip.svg?logo=npm&logoColor=fff&label=NPM+package
[release-image]: https://img.shields.io/github/release/jclo/jgeoip.svg?include_prereleases
[commit-image]: https://img.shields.io/github/last-commit/jclo/jgeoip.svg?logo=github
[travis-image]: https://img.shields.io/travis/com/jclo/jgeoip.svg?logo=travis-ci&logoColor=fff
[ci-image]: https://github.com/jclo/jgeoip/actions/workflows/ci.yml/badge.svg
[coveralls-image]: https://img.shields.io/coveralls/jclo/jgeoip/master.svg?&logo=coveralls
[dependencies-image]: https://david-dm.org/jclo/jgeoip/status.svg?theme=shields.io
[devdependencies-image]: https://david-dm.org/jclo/jgeoip/dev-status.svg?theme=shields.io
[npm-bundle-size-image]: https://img.shields.io/bundlephobia/minzip/jgeoip.svg
[license-image]: https://img.shields.io/npm/l/jgeoip.svg

[npm-url]: https://www.npmjs.com/package/jgeoip
[release-url]: https://github.com/jclo/jgeoip/tags
[commit-url]: https://github.com/jclo/jgeoip/commits/master
[travis-url]: https://app.travis-ci.com/jclo/jgeoip?branch=main
[ci-url]: https://github.com/jclo/es6lib/jgeoip/workflows/ci.yml
[coveralls-url]: https://coveralls.io/github/jclo/jgeoip?branch=master
[dependencies-url]: https://david-dm.org/jclo/jgeoip
[devdependencies-url]: https://david-dm.org/jclo/jgeoip?type=dev
[license-url]: http://opensource.org/licenses/MIT
[npm-bundle-size-url]: https://img.shields.io/bundlephobia/minzip/jgeoip
[license-url]: http://opensource.org/licenses/MIT

-- oOo ---
2 changes: 2 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
'use strict';

module.exports = require('./lib/jgeoip');
Loading

0 comments on commit befeac0

Please sign in to comment.