Skip to content

Commit

Permalink
chore: update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
tsvetomir committed Jan 2, 2025
1 parent 8eba7af commit c161740
Show file tree
Hide file tree
Showing 18 changed files with 22 additions and 107 deletions.
71 changes: 0 additions & 71 deletions .eslintrc.js

This file was deleted.

19 changes: 19 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import globals from "globals";

/** @type {import('eslint').Linter.Config[]} */
export default [
{
files: ["*/*.js"],
languageOptions: {
sourceType: "module"
}
},
{
languageOptions: {
globals: globals.browser
}
},
{
ignores: ["dist/"]
}
];
2 changes: 0 additions & 2 deletions lib/deflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import { deflateInit2, deflateSetHeader, deflateSetDictionary, deflate as zlibDe
import msg from './zlib/messages';
import ZStream from './zlib/zstream';

/* eslint-disable */

var toString = Object.prototype.toString;

/**
Expand Down
2 changes: 0 additions & 2 deletions lib/inflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import msg from './zlib/messages';
import ZStream from './zlib/zstream';
import GZheader from './zlib/gzheader';

/* eslint-disable */

var toString = Object.prototype.toString;

/**
Expand Down
2 changes: 0 additions & 2 deletions lib/utils/common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

function _has(obj, key) {
return Object.prototype.hasOwnProperty.call(obj, key);
}
Expand Down
2 changes: 0 additions & 2 deletions lib/utils/strings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// String encode/decode helpers

import { Buf8, shrinkBuf } from './common';
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/adler32.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// Note: adler32 takes 12% for level 0 and 2% for level 6.
// It isn't worth it to make additional optimizations as in original.
// Small size is preferable.
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/crc32.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// Note: we can't get significant speed boost here.
// So write code to minimize size - no pregenerated tables
// and array tools dependencies.
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/deflate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/gzheader.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/inffast.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/inflate.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/inftrees.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/messages.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
6 changes: 0 additions & 6 deletions lib/zlib/trees.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand All @@ -19,8 +17,6 @@
// misrepresented as being the original software.
// 3. This notice may not be removed or altered from any source distribution.

/* eslint-disable space-unary-ops */

import { Z_FIXED, Z_BINARY, Z_TEXT, Z_UNKNOWN } from './constants';
import { arraySet } from '../utils/common';

Expand Down Expand Up @@ -86,7 +82,6 @@ var REPZ_3_10 = 17;
var REPZ_11_138 = 18;
/* repeat a zero length 11-138 times (7 bits of repeat count) */

/* eslint-disable comma-spacing,array-bracket-spacing */
var extra_lbits = /* extra bits for each length code */
[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];

Expand All @@ -98,7 +93,6 @@ var extra_blbits = /* extra bits for each bit length code */

var bl_order =
[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
/* eslint-enable comma-spacing,array-bracket-spacing */

/* The lengths of the bit length codes are sent in order of decreasing
* probability, to avoid transmitting the lengths for unused bit length codes.
Expand Down
2 changes: 0 additions & 2 deletions lib/zlib/zstream.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// (C) 1995-2013 Jean-loup Gailly and Mark Adler
// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
//
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"scripts": {
"build-package": "rollup -c",
"test": "mocha",
"lint": "eslint lib",
"lint": "eslint",
"prepare": "husky"
},
"keywords": [
Expand All @@ -35,7 +35,8 @@
"@commitlint/cli": "^19.6.1",
"@commitlint/config-conventional": "^19.6.0",
"@rollup/plugin-buble": "^0.21.1",
"eslint": "^6.8.0",
"eslint": "^9.17.0",
"globals": "^15.14.0",
"husky": "^9.1.7",
"mocha": "^7.1.1",
"reify": "^0.20.12",
Expand Down

0 comments on commit c161740

Please sign in to comment.