Skip to content

migrate plugin to Typescript and generate modular packages #24

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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
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
64 changes: 64 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"extends": [
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"env": {
"es6": true,
"browser": true
},
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"eslint-plugin-tsdoc"
],
"rules": {
"no-console": 2,
"curly": 2,
"dot-notation": 1,
"eqeqeq": 2,
"no-alert": 2,
"no-caller": 2,
"no-eval": 2,
"no-extra-bind": 2,
"no-implied-eval": 2,
"no-multi-spaces": 2,
"no-with": 2,
"no-shadow": 2,
"no-shadow-restricted-names": 2,
"brace-style": ["error", "1tbs"],
"camelcase": 2,
"comma-style": ["error", "last"],
"eol-last": 2,
"key-spacing": 2,
"new-cap": 1,
"no-array-constructor": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multiple-empty-lines": 2,
"semi-spacing": 2,
"no-spaced-func": 2,
"no-trailing-spaces": 2,
"space-before-blocks": 2,
"spaced-comment": 1,
"no-var": 2,
"tsdoc/syntax": "warn"
},
"overrides": [
{
"files": ["test/**/*.js"],
"plugins": [
"jest",
"jest-dom"
],
"extends": ["plugin:jest-dom/recommended"],
"env": {
"jest/globals": true,
"node": true
},
"rules": {
"no-console": 0,
"no-shadow": 0
}
}
]
}
26 changes: 14 additions & 12 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -7,20 +7,22 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14, 16, 18]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm install
npm run build --if-present
npm test
env:
CI: true
node-version: 18

- name: yarn install
run: yarn install

- name: build
run: yarn build

- name: test
run: yarn test

- name: lint
run: yarn lint
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"singleQuote": true,
"jsxSingleQuote": true,
"semi": true,
"tabWidth": 2,
"bracketSpacing": true,
"arrowParens": "avoid",
"trailingComma": "none"
}
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "stylelint-config-standard-scss"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

* The plugin is now compatible with and requires Chartist v1 API
* The plugin provides an ESM, CSJ and UMD version
* The "class" option accepts a single class name or an array of class names
* Sources were converted to TypeScript
* Replace deprecated properties "page{X,Y}Offset" with scroll{X,Y}
* Dropped support for "currency" and "currencyFormatCallback" options (use "tooltipFnc" instead)

## [1.0.0] - 2nd January 2023

Versions 1.0.0 and above of this plugin only work with Chartist versions of 1.0.0 and above.
25 changes: 0 additions & 25 deletions Gruntfile.js

This file was deleted.

4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
The MIT License (MIT)

Copyright (c) 2015 Markus Padourek
Copyright (c) 2018 LukBukkit
Copyright (c) 2015-2018 Markus Padourek

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -19,4 +20,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Loading