Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

fix: eslint dependency problems #61

Merged
merged 4 commits into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
stories: ["../vue/**/*.stories.js"],
addons: ["@storybook/addon-knobs", "@storybook/addon-storysource"]
addons: ["@storybook/addon-knobs", "@storybook/addon-storysource"],
core: {
builder: "webpack5"
}
};
4 changes: 2 additions & 2 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ const path = require("path");
module.exports = async ({ config, mode }) => {
config.module.rules.push({
test: /\.scss$/,
loaders: ["style-loader", "css-loader", "sass-loader"],
use: ["style-loader", "css-loader", "sass-loader"],
include: path.resolve(__dirname, "../")
});
config.module.rules.push({
test: /\.stories\.jsx?$/,
loaders: [require.resolve("@storybook/source-loader")],
use: [require.resolve("@storybook/source-loader")],
enforce: "pre"
});
return config;
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

* Bumped dependencies
* Migrate to webpack 5

### Fixed

* Fix storybook dependency problem after minor bump, lock versions to minor - [ripe-welcome/PR#187](https://github.com/ripe-tech/ripe-welcome/pull/187)
* Fix eslint dependencies problems

## [0.2.3] - 2021-04-06

Expand Down
50 changes: 30 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"build": "cross-env NODE_ENV=production webpack --mode production --config webpack.config.js",
"build-dev": "cross-env NODE_ENV=development webpack --mode development --config webpack.config.js",
"build-storybook": "cross-env NODE_ENV=development build-storybook -c .storybook -o dist/storybook",
"dev": "cross-env NODE_ENV=development webpack-dev-server --config webpack.config.js --mode development --watch --hot",
"dev": "cross-env NODE_ENV=development webpack serve --config webpack.config.js --mode development --hot",
"docs": "vue-styleguidist server",
"docs:build": "vue-styleguidist build",
"lint": "npm run lint:base && npm run lint:stylelint",
Expand All @@ -58,41 +58,51 @@
},
"dependencies": {
"loaders.css": "^0.1.2",
"ripe-sdk": "^2.20.0",
"ripe-sdk": "^2.30.0",
"vue": "^2.6.14",
"vue-global-events": "^1.2.1",
"yonius": "^0.11.5"
"yonius": "^0.11.7"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@babel/plugin-transform-runtime": "^7.17.0",
"@babel/preset-env": "^7.16.11",
"@storybook/addons": "~6.4.22",
"@babel/core": "^7.18.2",
"@babel/eslint-parser": "^7.18.2",
"@babel/plugin-transform-runtime": "^7.18.2",
"@babel/preset-env": "^7.18.2",
"@storybook/addon-knobs": "^6.4.0",
"@storybook/addon-storysource": "~6.4.22",
"@storybook/addons": "~6.4.22",
"@storybook/builder-webpack5": "~6.4.22",
"@storybook/manager-webpack5": "~6.4.22",
"@storybook/source-loader": "~6.4.22",
"@storybook/vue": "~6.4.22",
"@vue/test-utils": "^1.3.0",
"babel-loader": "^8.2.3",
"babel-loader": "^8.2.5",
"babel-preset-vue": "^2.0.2",
"cross-env": "7.0.3",
"css-loader": "^5.2.7",
"eslint": "^7.32.0",
"eslint-config-hive": "^0.5.3",
"eslint-loader": "^4.0.2",
"css-loader": "^6.7.1",
"eslint": "^8.16.0",
"eslint-config-hive": "^0.5.8",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-mocha": ">=^6.0.0 && <10.0.3",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-vue": "^8.7.1",
"file-loader": "^6.2.0",
"jsdom": "^19.0.0",
"jsdom-global": "^3.0.2",
"mocha": "^9.2.1",
"mochapack": "^2.1.4",
"node-fetch": "^2.6.7",
"npm-check-updates": "^12.4.0",
"npm-check-updates": "^13.0.3",
"null-loader": "^4.0.1",
"postcss": "^8.4.6",
"postcss-html": "^1.3.0",
"postcss": "^8.4.14",
"postcss-html": "^1.4.1",
"prettier": "^2.5.1",
"prettier-config-hive": "^0.1.7",
"sass": "^1.49.8",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"sass": "^1.52.1",
"sass-loader": "^10.2.1",
"sort-package-json": "^1.54.0",
"style-loader": "^2.0.0",
Expand All @@ -105,11 +115,11 @@
"svgo": "^2.8.0",
"url-loader": "^4.1.1",
"vue-loader": "^15.9.8",
"vue-styleguidist": "^4.44.16",
"vue-styleguidist": "^4.45.1",
"vue-template-compiler": "^2.6.14",
"webpack": "^4.46.0",
"webpack-cli": "^4.4.0",
"webpack-dev-server": "^3.11.3"
"webpack": "^5.72.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.9.0"
},
"engines": {
"node": ">=12"
Expand Down
3 changes: 0 additions & 3 deletions styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ config.module.rules.push({
]
]
}
},
{
loader: "eslint-loader"
}
]
});
Expand Down
130 changes: 91 additions & 39 deletions vue/test/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,97 @@
const config = require("../../webpack.config");
const path = require("path");
const vueLoader = require("vue-loader");

config.mode = "development";
config.output.devtoolModuleFilenameTemplate = "[absolute-resource-path]";
config.output.devtoolFallbackModuleFilenameTemplate = "[absolute-resource-path]?[fullhash]";
config.target = "node";
config.output.filename = "ripe-sdk-components-vue-test.min.js";
const VueLoaderPlugin = vueLoader.VueLoaderPlugin;

config.module.rules = config.module.rules.filter(
rule =>
!rule.use ||
rule.use.every(loader => {
const name = typeof loader === "object" ? loader.loader : loader;
return name !== "babel-loader";
})
);
config.module.rules.push({
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
query: {
presets: [
[
"@babel/preset-env",
{
targets: {
node: "current"
}
module.exports = {
entry: "./vue",
target: "node",
mode: "development",
output: {
path: path.join(__dirname, "dist"),
filename: "ripe-sdk-components-vue-test.min.js",
library: "RipeComponentsVueTest",
libraryTarget: "umd",
devtoolModuleFilenameTemplate: "[absolute-resource-path]",
devtoolFallbackModuleFilenameTemplate: "[absolute-resource-path]?[hash]"
},
plugins: [new VueLoaderPlugin({})],
module: {
rules: [
{
test: /\.vue$/,
loader: "vue-loader",
options: {
loaders: {
js: "babel-loader",
scss: "vue-style-loader!css-loader!sass-loader",
sass: "vue-style-loader!css-loader!sass-loader?indentedSyntax"
},
optimizeSSR: false
}
},
{
test: /\.(css|scss|sass)$/,
use: ["null-loader"]
},
{
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: "babel-loader",
options: {
sourceType: "unambiguous",
presets: [
[
"@babel/preset-env",
{
targets: { node: "10" },
useBuiltIns: "entry",
corejs: "3"
}
]
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
regenerator: true
}
]
]
}
]
}
]
},
{
test: /\.(png|jpg|gif|svg|ico)$/,
type: "asset/inline"
},
{
test: /\.svga$/,
type: "asset/inline",
generator: {
dataUrl: {
mimetype: "image/svg+xml"
}
}
}
]
},
resolve: {
alias: {
base$: "../../../js",
vue$: "vue/dist/vue.esm.js"
},
fallback: {
fs: false,
http: false,
https: false
}
]
});
config.module.rules.push({
test: /\.(css|scss|sass)$/,
use: ["null-loader"]
});

config.module.rules.find(rule => rule.loader === "vue-loader").options.optimizeSSR = false;

module.exports = config;
},
performance: {
hints: false
},
devtool: "inline-source-map"
};
50 changes: 28 additions & 22 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = {
loader: "vue-loader",
options: {
loaders: {
js: "babel-loader!eslint-loader",
js: "babel-loader",
scss: "vue-style-loader!css-loader!sass-loader",
sass: "vue-style-loader!css-loader!sass-loader?indentedSyntax"
}
Expand Down Expand Up @@ -74,45 +74,51 @@ module.exports = {
: "@babel/preset-env"
]
}
},
{
loader: "eslint-loader"
}
]
},
{
test: /\.(svga)$/,
loader: "file-loader",
options: {
name: (path, query) => {
test: /\.(png|jpg|gif|svg|ico)$/,
type: "asset/resource",
generator: {
filename: () => {
if (process.env.NODE_ENV === "development") {
return "[path][name].svg?[fullhash]";
return "[path][name][ext]?[hash]";
}
return "[contenthash].svg";
},
esModule: false
return "[contenthash][ext]";
}
}
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
loader: "file-loader",
options: {
esModule: false
}
resourceQuery: /raw/,
type: "asset/source"
},
{
test: /\.(png|jpg|gif|svg|ico)$/,
loader: "url-loader",
options: {
esModule: false
test: /\.svga$/,
type: "asset/inline",
generator: {
dataUrl: {
mimetype: "image/svg+xml"
}
}
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
type: "asset/resource"
}
]
},
resolve: {
alias: {
base$: "../../../js",
vue$: "vue/dist/vue.esm.js"
vue$: "vue/dist/vue.esm.js",
process: "process/browser"
},
fallback: {
fs: false,
http: false,
https: false,
path: false
}
},
externals: {
Expand Down