Skip to content

Commit

Permalink
Work around borked eslint Vue plugin
Browse files Browse the repository at this point in the history
Stop running eslint as part of our build; instead
run it as a separate CI step.
  • Loading branch information
ehuelsmann authored and renovate[bot] committed Aug 7, 2023
1 parent 13735ae commit f5a231c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ jobs:
path: UI/js
key: dojo-${{ hashFiles('UI/js-src/**', 'UI/src/**', 'UI/css/**','UI/**/*.html','doc/sources/**') }}

- name: Linting
run: |
make lint
- name: Build Dojo
run: |
make dojo
make js
make readme
if: steps.cache-dojo.outputs.cache-hit != 'true' ||
steps.cache-node_modules.outputs.cache-hit != 'true'
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ js: npm_install
jsdev: npm_install
$(DOCKER_CMD) $(SHELL) -c 'cd UI && npm run build:dev'

lint:
$(DOCKER_CMD) $(SHELL) -c 'cd UI && npm run lint'

jslint:
ifneq ($(origin FIX),undefined)
$(DOCKER_CMD) $(SHELL) -c 'cd UI && npm run lint:js:fix'
Expand Down
15 changes: 11 additions & 4 deletions UI/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,11 @@
"analyzer": "webpack-bundle-analyzer logs/stats.json UI/js -h 0.0.0.0",
"build": "webpack --mode=production --stats errors-warnings",
"build:dev": "webpack --progress --mode=development --stats errors-warnings",
"lint": "npm run lint:css;npm run lint:js;npm run lint:markdown;npm run lint:vue",
"lint:css": "stylelint UI/css/*.css",
"lint": "npm run lint:css && npm run lint:js && npm run lint:markdown && npm run lint:vue",
"lint:css": "stylelint css/*.css",
"lint:js": "eslint --ext .js ./",
"lint:js:fix": "eslint --fix --ext .js ./",
"lint:markdown": "markdownlint --config .markdownlint.json --ignore ./node_modules .",
"lint:markdown": "markdownlint --config ../.markdownlint.json --ignore ./node_modules --ignore ./js .",
"lint:vue": "eslint --ext .vue ./",
"lint:vue:fix": "eslint --fix --ext .vue ./",
"profile": "webpack --progress=profile --json > logs/stats.json",
Expand Down Expand Up @@ -197,7 +197,14 @@
"jest/prefer-expect-assertions": "off",
"jest/no-commented-out-tests": "off",
"no-console": "off",
"camelcase": "off",
"camelcase": "off"
}
},
{
"files": [
"**/*.vue"
],
"rules": {
"vue/no-setup-props-destructure": "off"
}
}
Expand Down
9 changes: 0 additions & 9 deletions UI/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ if (TARGET !== "readme") {
const CopyWebpackPlugin = require("copy-webpack-plugin");
const CssMinimizerPlugin = require("css-minimizer-webpack-plugin");
const DojoWebpackPlugin = require("dojo-webpack-plugin");
const ESLintPlugin = require("eslint-webpack-plugin");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const StylelintPlugin = require("stylelint-webpack-plugin");
Expand Down Expand Up @@ -172,13 +171,6 @@ if (TARGET !== "readme") {
verbose: false
}; // delete all files in the js directory without deleting this folder

const ESLintPluginOptions = {
files: ["**/*.js","**/*.vue"],
exclude: ["node_modules", "./bootstrap.js"],
emitError: prodMode,
emitWarning: !prodMode
};

const StylelintPluginOptions = {
files: "**/*.css"
};
Expand Down Expand Up @@ -269,7 +261,6 @@ if (TARGET !== "readme") {

var pluginsProd = [
// Lint the sources
new ESLintPlugin(ESLintPluginOptions),
new StylelintPlugin(StylelintPluginOptions),

// Add Vue
Expand Down

0 comments on commit f5a231c

Please sign in to comment.