Skip to content

Commit

Permalink
Develop (#74)
Browse files Browse the repository at this point in the history
* package update

* unary(+) instead of Number and parseInt

* package update

* flat eslint

* too many badges

* fixes due to package update
  • Loading branch information
tofsjonas authored May 13, 2024
1 parent cc649fe commit 39bba0b
Show file tree
Hide file tree
Showing 15 changed files with 3,877 additions and 3,654 deletions.
1 change: 0 additions & 1 deletion .eslintignore

This file was deleted.

19 changes: 0 additions & 19 deletions .eslintrc.js

This file was deleted.

5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
"savePathReplacementPairs": null
}
],
"liveSassCompile.settings.showOutputWindowOn": "Warning"
"eslint.experimental.useFlatConfig": true,

"liveSassCompile.settings.showOutputWindowOn": "Warning",
"typescript.tsdk": "node_modules/typescript/lib"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [3.2.3] - 2024-05-08

### Changed

- Unary(+) instead of `Number` and `parseInt`

## [3.2.2] - 2024-02-14

### Fixed
Expand Down Expand Up @@ -136,6 +142,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

This CHANGELOG.md was generated with the assistance of [ChatGPT by OpenAI](https://www.openai.com/research/chatgpt).

[3.2.3]: https://github.com/tofsjonas/sortable/releases/tag/3.2.3
[3.2.2]: https://github.com/tofsjonas/sortable/releases/tag/3.2.2
[3.2.1]: https://github.com/tofsjonas/sortable/releases/tag/3.2.1
[3.2.0]: https://github.com/tofsjonas/sortable/releases/tag/3.2.0
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<h1>sortable</h1>
<h5>- a tiny, vanilla/plain JavaScript table sorter</h5>

![CI](https://github.com/tofsjonas/sortable/actions/workflows/CI.yml/badge.svg) ![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/tofsjonas/sortable) ![NPM Version](https://img.shields.io/npm/v/sortable-tablesort) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/) ![NPM Downloads](https://img.shields.io/npm/dw/sortable-tablesort) ![GitHub Repo stars](https://img.shields.io/github/stars/tofsjonas/sortable) [![jsdelivr](https://data.jsdelivr.com/v1/package/gh/tofsjonas/sortable/badge)](https://www.jsdelivr.com/package/gh/tofsjonas/sortable)
![GitHub Issues or Pull Requests](https://img.shields.io/github/issues/tofsjonas/sortable) ![NPM Version](https://img.shields.io/npm/v/sortable-tablesort) ![NPM Downloads](https://img.shields.io/npm/dw/sortable-tablesort) ![GitHub Repo stars](https://img.shields.io/github/stars/tofsjonas/sortable) [![jsdelivr](https://data.jsdelivr.com/v1/package/gh/tofsjonas/sortable/badge)](https://www.jsdelivr.com/package/gh/tofsjonas/sortable)

Makes any table with **class="sortable"**, er, sortable. The user can click on a table header and change the sorting of the table rows.

Expand Down Expand Up @@ -40,7 +40,7 @@ You can find a simple demo on <https://tofsjonas.github.io/sortable/>

## Factoids

- **1180 bytes** minified. (617 bytes gzipped)
- **1148 bytes** minified. (619 bytes gzipped)

- Works with **JavaScript generated tables**. (since we are using an eventListener)

Expand Down
31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const js = require('@eslint/js')
const typescriptParser = require('@typescript-eslint/parser')
const typescriptEslintPlugin = require('@typescript-eslint/eslint-plugin')
const globals = require('globals')
const eslintPluginPrettierRecommended = require('eslint-plugin-prettier/recommended')

module.exports = [
js.configs.recommended,
eslintPluginPrettierRecommended,
{ ignores: ['**/*.js', 'node_modules'] },
{
files: ['src/**/*.ts'],

languageOptions: {
globals: {
...globals.browser,
NodeListOf: false,
},
sourceType: 'module',
parser: typescriptParser,
},
plugins: {
'@typescript-eslint': typescriptEslintPlugin,
},
rules: {
'no-inner-declarations': 'off',
'no-unused-vars': 'warn',
// 'no-var': 'off', // Note: Disabled due to issues with target ES5, consider ES2020
},
},
]
44 changes: 24 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sortable-tablesort",
"version": "3.2.2",
"version": "3.2.3",
"description": "A tiny, Vanilla/Plain JavaScript table sorter",
"author": "Jonas Earendel",
"license": "Unlicense",
Expand All @@ -27,8 +27,8 @@
"compile:a11y": "google-closure-compiler --js=./sortable.a11y.js --js_output_file=./sortable.a11y.min.js",
"compile:sortable": "google-closure-compiler --js=./sortable.js --js_output_file=./sortable.min.js",
"dev": "rollup --config --watch --environment NODE_ENV:development --bundleConfigAsCjs",
"lint": "eslint src/sortable.ts",
"prepare": "node ./scripts/prepare.js",
"lint": "eslint './src/*.ts'",
"prepare": "ts-node ./scripts/prepare.ts",
"pre-push": "npm run build && npm run lint && npm run test && npm run test:min",
"sass": "npm run sass:dist && npm run sass:dist:minify",
"sass:dist": "sass src/sortable.scss:sortable.css src/example.scss:example.css src/sortable-base.scss:sortable-base.css",
Expand All @@ -43,26 +43,30 @@
"./CHANGELOG.md"
],
"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/preset-env": "^7.23.3",
"@babel/core": "^7.24.5",
"@babel/preset-env": "^7.24.5",
"@eslint/js": "^9.2.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.5",
"@testing-library/dom": "^9.3.3",
"@testing-library/jest-dom": "^6.1.4",
"@typescript-eslint/eslint-plugin": "^6.11.0",
"@typescript-eslint/parser": "^6.11.0",
"@rollup/plugin-typescript": "^11.1.6",
"@testing-library/dom": "^10.1.0",
"@testing-library/jest-dom": "^6.4.5",
"@types/node": "^20.12.11",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"babel-jest": "^29.7.0",
"cross-env": "^7.0.3",
"eslint": "^8.53.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"google-closure-compiler": "^20230802.0.0",
"husky": "^8.0.3",
"eslint": "^9.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"globals": "^15.2.0",
"google-closure-compiler": "^20240317.0.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"jsdom": "^22.1.0",
"prettier": "^3.1.0",
"rollup": "^4.4.1",
"sass": "^1.69.5",
"typescript": "^5.2.2"
"jsdom": "^24.0.0",
"prettier": "^3.2.5",
"rollup": "^4.17.2",
"sass": "^1.77.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.5"
}
}
Loading

0 comments on commit 39bba0b

Please sign in to comment.