Skip to content

Commit 17caa07

Browse files
chore: eslint migration (#1270)
1 parent b599fa1 commit 17caa07

35 files changed

+3100
-890
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ module.exports = {
339339
loader: "sass-loader",
340340
options: {
341341
sassOptions: {
342-
style: `compressed`,
342+
style: "compressed",
343343
loadPaths: ["absolute/path/a", "absolute/path/b"],
344344
},
345345
},
@@ -499,7 +499,7 @@ module.exports = {
499499
{
500500
loader: "sass-loader",
501501
options: {
502-
additionalData: "$env: " + process.env.NODE_ENV + ";",
502+
additionalData: `$env: ${process.env.NODE_ENV};`,
503503
},
504504
},
505505
],
@@ -531,10 +531,10 @@ module.exports = {
531531
const relativePath = path.relative(rootContext, resourcePath);
532532

533533
if (relativePath === "styles/foo.scss") {
534-
return "$value: 100px;" + content;
534+
return `$value: 100px;${content}`;
535535
}
536536

537-
return "$value: 200px;" + content;
537+
return `$value: 200px;${content}`;
538538
},
539539
},
540540
},
@@ -565,10 +565,10 @@ module.exports = {
565565
const relativePath = path.relative(rootContext, resourcePath);
566566

567567
if (relativePath === "styles/foo.scss") {
568-
return "$value: 100px;" + content;
568+
return `$value: 100px;${content}`;
569569
}
570570

571-
return "$value: 200px;" + content;
571+
return `$value: 200px;${content}`;
572572
},
573573
},
574574
},
@@ -788,8 +788,10 @@ module.exports = {
788788
**webpack.config.js**
789789

790790
```js
791+
const path = require("node:path");
792+
791793
module.exports = {
792-
entry: [__dirname + "/src/scss/app.scss"],
794+
entry: [path.resolve(__dirname, "./src/scss/app.scss")],
793795
module: {
794796
rules: [
795797
{
@@ -818,8 +820,10 @@ module.exports = {
818820
**webpack.config.js**
819821

820822
```js
823+
const path = require("node:path");
824+
821825
module.exports = {
822-
entry: [__dirname + "/src/scss/app.scss"],
826+
entry: [path.resolve(__dirname, "./src/scss/app.scss")],
823827
module: {
824828
rules: [
825829
{

eslint.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { defineConfig } from "eslint/config";
2+
import configs from "eslint-config-webpack/configs.js";
3+
4+
export default defineConfig([
5+
{
6+
extends: [configs["recommended-dirty"]],
7+
},
8+
]);

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const isNodeSassSupported = require("./test/helpers/is-node-sass-supported");
22

33
module.exports = {
44
testEnvironment: "jest-environment-node-single-context",
5-
// eslint-disable-next-line no-undefined
5+
66
snapshotResolver:
77
"<rootDir>/test/helpers/skip-node-sass-snapshot-resolver.js",
88
moduleNameMapper: isNodeSassSupported()

0 commit comments

Comments
 (0)