diff --git a/.eslintrc.json b/.eslintrc.json index 03c7935f989..b19fa01f279 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -25,6 +25,7 @@ "newline-per-chained-call": ["error", { "ignoreChainWithDepth": 2 }], "lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }], "prefer-promise-reject-errors": ["error", { "allowEmptyReject": true }], + "no-var": "error", "react/jsx-indent": ["error", 4], "semi": ["error", "always", { "omitLastInOneLineBlock": true }], diff --git a/node_modules b/node_modules index f233df5d657..855c891ebb1 160000 --- a/node_modules +++ b/node_modules @@ -1 +1 @@ -Subproject commit f233df5d657a3651f51d30db59d5f315594d78a1 +Subproject commit 855c891ebb1f1f804e8b1c12e4eece0f0949c3a5 diff --git a/package.json b/package.json index 4bdab7f2502..1ed37c2c4eb 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "webpack-cli": "^4.7.0" }, "scripts": { - "eslint": "eslint --ext .js --ext .jsx pkg/", + "eslint": "eslint --ext .js --ext .jsx pkg/ --rule 'no-var: warn'", "eslint:fix": "eslint --fix --ext .js --ext .jsx pkg/" } } diff --git a/webpack.config.js b/webpack.config.js index a7a5fe16b3c..729a626db13 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -351,8 +351,13 @@ const plugins = [ }), ]; -if (eslint) - plugins.push(new ESLintPlugin({ extensions: ["js", "jsx"] })); +if (eslint) { + // temporary hack: not all pages got converted to no-var yet; drop this again once they are + const overrideConfig = {}; + if (section === "shell/" || section === 'networkmanager/' || section === "static/" || section === "systemd/") + overrideConfig.rules = { "no-var": "off" }; + plugins.push(new ESLintPlugin({ extensions: ["js", "jsx"], overrideConfig })); +} if (section.startsWith('base1')) plugins.push(new copy({ patterns: base1_fonts }));