Skip to content

Commit 9cf597f

Browse files
committed
chore: update ESlint from v8 to v9
1 parent 83b51e6 commit 9cf597f

16 files changed

+483
-49
lines changed

eslint.config.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ import configs from "eslint-config-webpack/configs.js";
44
export default defineConfig([
55
{
66
extends: [configs["recommended-dirty"]],
7-
ignores: ["*.md", "CHANGELOG.md", "README.md"],
87
},
98
]);

package-lock.json

Lines changed: 245 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
"@commitlint/config-conventional": "^19.2.2",
6565
"@eslint/markdown": "^6.6.0",
6666
"@stylistic/eslint-plugin": "^5.1.0",
67+
"@typescript-eslint/eslint-plugin": "^8.37.0",
6768
"babel-jest": "^30.0.0",
6869
"cross-env": "^7.0.3",
6970
"cspell": "^8.13.1",
@@ -74,6 +75,7 @@
7475
"eslint-config-webpack": "^4.3.0",
7576
"eslint-plugin-import": "^2.32.0",
7677
"eslint-plugin-jest": "^29.0.1",
78+
"eslint-plugin-jsdoc": "^51.4.1",
7779
"eslint-plugin-n": "^17.21.0",
7880
"eslint-plugin-prettier": "^5.5.1",
7981
"eslint-plugin-unicorn": "^59.0.1",

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ import {
3030
warningFactory,
3131
} from "./utils";
3232

33+
/**
34+
* @param content
35+
* @param map
36+
* @param meta
37+
*/
3338
export default async function loader(content, map, meta) {
3439
const rawOptions = this.getOptions(schema);
3540
const callback = this.async();

src/plugins/postcss-import-parser.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import {
88
resolveRequests,
99
} from "../utils";
1010

11+
/**
12+
* @param atRule
13+
*/
1114
function isIgnoredAfterName(atRule) {
1215
if (
1316
atRule.raws &&
@@ -27,6 +30,9 @@ function isIgnoredAfterName(atRule) {
2730
return false;
2831
}
2932

33+
/**
34+
* @param atRule
35+
*/
3036
function isIgnoredPrevNode(atRule) {
3137
const prevNode = atRule.prev();
3238

@@ -41,6 +47,11 @@ function isIgnoredPrevNode(atRule) {
4147
return false;
4248
}
4349

50+
/**
51+
* @param atRule
52+
* @param key
53+
* @param options
54+
*/
4455
function parseNode(atRule, key, options) {
4556
// Convert only top-level @import
4657
if (atRule.parent.type !== "root") {

src/plugins/postcss-url-parser.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,18 @@ const isUrlFunc = /url/i;
1212
const isImageSetFunc = /^(?:-webkit-)?image-set$/i;
1313
const needParseDeclaration = /(?:url|(?:-webkit-)?image-set)\(/i;
1414

15+
/**
16+
* @param node
17+
*/
1518
function getNodeFromUrlFunc(node) {
1619
return node.nodes && node.nodes[0];
1720
}
1821

22+
/**
23+
* @param index
24+
* @param nodes
25+
* @param inBetween
26+
*/
1927
function getWebpackIgnoreCommentValue(index, nodes, inBetween) {
2028
if (index === 0 && typeof inBetween !== "undefined") {
2129
return inBetween;
@@ -44,6 +52,12 @@ function getWebpackIgnoreCommentValue(index, nodes, inBetween) {
4452
return matched && matched[2] === "true";
4553
}
4654

55+
/**
56+
* @param url
57+
* @param declaration
58+
* @param result
59+
* @param options
60+
*/
4761
function shouldHandleURL(url, declaration, result, options) {
4862
if (url.length === 0) {
4963
result.warn(`Unable to find uri in '${declaration.toString()}'`, {
@@ -56,6 +70,12 @@ function shouldHandleURL(url, declaration, result, options) {
5670
return isURLRequestable(url, options);
5771
}
5872

73+
/**
74+
* @param declaration
75+
* @param key
76+
* @param result
77+
* @param options
78+
*/
5979
function parseDeclaration(declaration, key, result, options) {
6080
if (!needParseDeclaration.test(declaration[key])) {
6181
return;

src/runtime/sourceMaps.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
// Polyfill for btoa in Node.js
22
/* global btoa */
3+
/**
4+
*
5+
*/
36
function getBtoa() {
47
if (typeof btoa === "function") return btoa;
58
return (str) => Buffer.from(str, "binary").toString("base64");

0 commit comments

Comments
 (0)