Skip to content

Commit 5d8fa1c

Browse files
committed
chore: update ESlint from v8 to v9
1 parent 99850b1 commit 5d8fa1c

File tree

5 files changed

+126
-8
lines changed

5 files changed

+126
-8
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ Output (example):
439439
> Identifiers are exported
440440
441441
```js
442-
exports.locals = {
442+
module.exports.locals = {
443443
className: "_23_aKvs-b8bW2Vg3fwHozO",
444444
subClass: "_13LGdX8RMStbBE9w-t0gZ1",
445445
};
@@ -468,7 +468,7 @@ When declaring a local class name, you can compose it from one or more other loc
468468
This does not alter the final CSS output, but the generated `subClass` will include both class names in its export.
469469

470470
```js
471-
exports.locals = {
471+
module.exports.locals = {
472472
className: "_23_aKvs-b8bW2Vg3fwHozO",
473473
subClass: "_13LGdX8RMStbBE9w-t0gZ1 _23_aKvs-b8bW2Vg3fwHozO",
474474
};
@@ -1547,7 +1547,7 @@ function addReplacements(resourcePath, imports, exportsJson, replacements) {
15471547
// canonical values map and all exports JSON verbatim
15481548
canonicalValuesMap[identifier] = classNames;
15491549

1550-
allExportsJson[resourcePath] = allExportsJson[resourcePath] || {};
1550+
allExportsJson[resourcePath] ||= {};
15511551
allExportsJson[resourcePath][localName] = classNames;
15521552
}
15531553
}
@@ -1609,7 +1609,7 @@ class CssModulesJsonPlugin {
16091609

16101610
const [, resourcePath, localName] = identifier.match(IDENTIFIER_REGEX);
16111611

1612-
allExportsJson[resourcePath] = allExportsJson[resourcePath] || {};
1612+
allExportsJson[resourcePath] ||= {};
16131613
allExportsJson[resourcePath][localName] = adjustedClassNames;
16141614
}
16151615

@@ -2323,8 +2323,8 @@ File treated as `CSS Module`.
23232323
Using both `CSS Module` functionality as well as SCSS variables directly in JavaScript.
23242324

23252325
```jsx
2326-
import * as styles from "Component.module.scss";
2327-
import * as svars from "variables.scss";
2326+
import * as _styles from "./Component.module.scss";
2327+
import * as _svars from "./variables.scss";
23282328

23292329
// Render DOM with CSS modules class name
23302330
// <div className={styles.componentClass}>
@@ -2333,7 +2333,7 @@ import * as svars from "variables.scss";
23332333

23342334
// Somewhere in JavaScript canvas drawing code use the variable directly
23352335
// const ctx = mountsCanvas.current.getContext('2d',{alpha: false});
2336-
ctx.fillStyle = `${svars.colorBackgroundCanvas}`;
2336+
// ctx.fillStyle = `${svars.colorBackgroundCanvas}`;
23372337
```
23382338

23392339
## Contributing

eslint.config.mjs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,23 @@ import configs from "eslint-config-webpack/configs.js";
44
export default defineConfig([
55
{
66
extends: [configs["recommended-dirty"]],
7+
plugins: {
8+
"@typescript-eslint": (await import("@typescript-eslint/eslint-plugin"))
9+
.default,
10+
},
11+
ignores: [
12+
"*.md",
13+
"CHANGELOG.md",
14+
"dist/**",
15+
"node_modules/**",
16+
"coverage/**",
17+
"*.log",
18+
],
19+
},
20+
{
21+
files: ["eslint.config.mjs"],
22+
rules: {
23+
"import/no-unresolved": "off",
24+
},
725
},
826
]);

package-lock.json

Lines changed: 99 additions & 0 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,8 @@
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",
68+
"@typescript-eslint/parser": "^8.37.0",
6769
"babel-jest": "^30.0.0",
6870
"cross-env": "^7.0.3",
6971
"cspell": "^8.13.1",

src/runtime/sourceMaps.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Polyfill for btoa in Node.js
2-
/* global btoa */
32
/**
43
*
54
*/

0 commit comments

Comments
 (0)