diff --git a/.eslintrc.json b/.eslintrc.json
index 46c396738..f33545d46 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,6 +1,9 @@
{
"root": true,
- "extends": ["./configs/eslint-config.json", "eslint-config-prettier"],
+ "extends": ["moving-meadow"],
+ "rules": {
+ "security/detect-non-literal-fs-filename": "off"
+ },
"overrides": [
{
"files": ["test/**/*.js"],
diff --git a/Makefile b/Makefile
index 89af8807c..e3db143af 100644
--- a/Makefile
+++ b/Makefile
@@ -5,7 +5,7 @@ GENERATED_SOURCES=src/cli/init-config/config.js.template.js \
src/report/csv/csv.template.js \
src/report/dot/dot.template.js \
src/report/html/html.template.js \
- src/report/err-html/err-html.template.js \
+ src/report/error-html/error-html.template.js \
src/schema/configuration.schema.json \
src/schema/cruise-result.schema.json
diff --git a/bin/depcruise-fmt.js b/bin/depcruise-fmt.js
index 1e6f175b1..c76512905 100755
--- a/bin/depcruise-fmt.js
+++ b/bin/depcruise-fmt.js
@@ -1,5 +1,5 @@
#!/usr/bin/env node
-const validateNodeEnv = require("../src/cli/validate-node-env");
+const validateNodeEnvironment = require("../src/cli/validate-node-environment");
function formatError(pError) {
process.stderr.write(pError.message);
@@ -7,7 +7,7 @@ function formatError(pError) {
}
try {
- validateNodeEnv();
+ validateNodeEnvironment();
// importing things only after the validateNodeEnv check so we can show an understandable
// error. Otherwise, on unsupported platforms we would show a stack trace, which is
diff --git a/bin/dependency-cruise.js b/bin/dependency-cruise.js
index 879b2ad79..37488558c 100755
--- a/bin/dependency-cruise.js
+++ b/bin/dependency-cruise.js
@@ -1,8 +1,8 @@
#!/usr/bin/env node
-const validateNodeEnv = require("../src/cli/validate-node-env");
+const validateNodeEnvironment = require("../src/cli/validate-node-environment");
try {
- validateNodeEnv();
+ validateNodeEnvironment();
// importing things only after the validateNodeEnv check so we can show an understandable
// error. Otherwise, on unsupported platforms we would show a stack trace, which is
diff --git a/configs/eslint-config.json b/configs/eslint-config.json
deleted file mode 100644
index 1a51582b1..000000000
--- a/configs/eslint-config.json
+++ /dev/null
@@ -1,334 +0,0 @@
-{
- "plugins": ["security", "mocha", "node", "import", "unicorn"],
- "parserOptions": {
- "ecmaVersion": 2018,
- "sourceType": "module",
- "ecmaFeatures": {
- "jsx": false
- }
- },
- "env": {
- "node": true,
- "es6": true
- },
- "rules": {
- // Possible errors
- "no-cond-assign": "error",
- "no-console": "error",
- "no-constant-condition": "error",
- "no-control-regex": "error",
- "no-debugger": "error",
- "no-dupe-args": "error",
- "no-dupe-keys": "error",
- "no-duplicate-case": "error",
- "no-empty": "error",
- "no-empty-character-class": "error",
- "no-ex-assign": "error",
- "no-extra-boolean-cast": "off",
- "no-func-assign": "error",
- "no-inner-declarations": "error",
- "no-invalid-regexp": "error",
- "no-irregular-whitespace": "error",
- "no-negated-in-lhs": "error",
- "no-obj-calls": "error",
- "no-regex-spaces": "error",
- "no-sparse-arrays": "error",
- "no-unexpected-multiline": "error",
- "no-unreachable": "error",
- "no-unsafe-finally": "error",
- "use-isnan": "error",
- "valid-jsdoc": "error",
- "valid-typeof": "error",
-
- // Best Practices
- "accessor-pairs": "error",
- "array-callback-return": "error",
- "block-scoped-var": "error",
- "complexity": ["warn", 6],
- "consistent-return": "error",
- "default-case": "error",
- "dot-notation": "error",
- "eqeqeq": "error",
- "guard-for-in": "error",
- "no-alert": "error",
- "no-caller": "error",
- "no-case-declarations": "error",
- "no-div-regex": "error",
- "no-else-return": "off",
- "no-empty-function": "error",
- "no-empty-pattern": "error",
- "no-eq-null": "error",
- "no-eval": "error",
- "no-extend-native": "error",
- "no-extra-bind": "error",
- "no-extra-label": "error",
- "no-fallthrough": "error",
- "no-implicit-coercion": "error",
- "no-implicit-globals": "error",
- "no-implied-eval": "error",
- "no-invalid-this": "error",
- "no-iterator": "error",
- "no-labels": "error",
- "no-lone-blocks": "error",
- "no-loop-func": "error",
- "no-magic-numbers": ["error", { "ignore": [-1, 0, 1] }],
- "no-multi-str": "error",
- "no-native-reassign": "error",
- "no-new": "error",
- "no-new-func": "error",
- "no-new-wrappers": "error",
- "no-octal": "error",
- "no-octal-escape": "error",
- "no-param-reassign": "off",
- "no-proto": "error",
- "no-redeclare": "error",
- "no-return-assign": "error",
- "no-script-url": "error",
- "no-self-assign": "error",
- "no-self-compare": "error",
- "no-sequences": "error",
- "no-throw-literal": "error",
- "no-unmodified-loop-condition": "error",
- "no-unused-expressions": "error",
- "no-unused-labels": "error",
- "no-useless-call": "error",
- "no-useless-concat": "error",
- "no-useless-escape": "error",
- "no-void": "error",
- "no-warning-comments": ["off", { "terms": ["todo", "fixme"] }],
- "no-with": "error",
- "radix": "error",
- "vars-on-top": "error",
- "yoda": "off",
-
- // Strict mode
- "strict": ["error", "never"],
-
- // Variables
- "init-declarations": "error",
- "no-catch-shadow": "error",
- "no-delete-var": "error",
- "no-label-var": "error",
- "no-restricted-globals": "error",
- "no-shadow": "error",
- "no-shadow-restricted-names": "error",
- "no-undef": "error",
- "no-undef-init": "error",
- "no-undefined": "error",
- "no-unused-vars": ["error", { "vars": "all", "args": "after-used" }],
- "no-use-before-define": "error",
-
- // Node.js and CommonJS
- "callback-return": "error",
- "global-require": "error",
- "handle-callback-err": "error",
- "no-mixed-requires": "error",
- "no-new-require": "error",
- "no-path-concat": "error",
- "no-process-env": "error",
- "no-process-exit": "error",
- "no-restricted-modules": "error",
- "no-sync": "off",
-
- // Stylistic Issues
- "camelcase": "off",
- "consistent-this": "error",
- "func-names": "error",
- "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
- "id-blacklist": "off",
- "id-length": "off",
- "id-match": "off",
- "max-depth": ["error", 3],
- "max-len": ["error", 120],
- "max-nested-callbacks": ["error", 4],
- "max-params": ["error", 4],
- "max-statements": ["error", 21],
- "max-statements-per-line": ["error", { "max": 1 }],
- "new-cap": "error",
- "newline-after-var": "error",
- "newline-before-return": "off",
- "no-array-constructor": "error",
- "no-bitwise": "error",
- "no-continue": "error",
- "no-inline-comments": "error",
- "no-lonely-if": "error",
- "no-negated-condition": "error",
- "no-nested-ternary": "error",
- "no-new-object": "error",
- "no-plusplus": "error",
- "no-resctricted-syntax": "off",
- "no-ternary": "off",
- "no-underscore-dangle": "off",
- "no-unneeded-ternary": "error",
- "one-var": ["error", "never"],
- "operator-assignment": "error",
- "quotes": "off",
- "require-jsdoc": "off",
- "sort-vars": "off",
- "spaced-comment": "error",
-
- // ECMAScript 6
- "constructor-super": "error",
- "no-class-assign": "error",
- "no-confusing-arrow": "off",
- "no-const-assign": "error",
- "no-dupe-class-members": "error",
- "no-duplicate-imports": "error",
- "no-new-symbol": "error",
- "no-restricted-imports": "error",
- "no-this-before-super": "error",
- "no-useless-computed-key": "error",
- "no-useless-constructor": "error",
- "no-var": "error",
- "object-shorthand": "error",
- "prefer-const": "off",
- "prefer-reflect": "error",
- "prefer-rest-params": "error",
- "prefer-spread": "error",
- "prefer-template": "error",
- "require-yield": "error",
- "sort-imports": "error",
-
- // security
- "security/detect-unsafe-regex": "error",
- "security/detect-buffer-noassert": "error",
- "security/detect-child-process": "error",
- "security/detect-disable-mustache-escape": "error",
- "security/detect-eval-with-expression": "error",
- "security/detect-no-csrf-before-method-override": "error",
- "security/detect-non-literal-fs-filename": "off", // disabled because the main goal of this package is to write to files anyway
- "security/detect-non-literal-regexp": "error",
- "security/detect-non-literal-require": "error",
- "security/detect-object-injection": "error",
- "security/detect-possible-timing-attacks": "error", // not doing anything which would need this kind of secrecy
- "security/detect-pseudoRandomBytes": "error",
-
- // mocha
- "mocha/handle-done-callback": "error", // - enforces handling of callbacks for async tests
- "mocha/max-top-level-suites": ["warn", { "limit": 10 }], // limit the number of top-level suites in a single file
- "mocha/no-exclusive-tests": "error", // disallow exclusive mocha tests
- "mocha/no-global-tests": "error", // disallow global tests
- "mocha/no-hooks": "off", // disallow hooks
- "mocha/no-hooks-for-single-case": "warn", // disallow hooks for a single test or test suite
- "mocha/no-identical-title": "warn", // disallow identical titles
- "mocha/no-mocha-arrows": "off", // disallow arrow functions as arguments to mocha globals
- "mocha/no-nested-tests": "error", // disallow tests to be nested within other tests
- "mocha/no-pending-tests": "warn", // disallow pending/unimplemented mocha tests
- "mocha/no-return-and-callback": "error", // disallow returning in a test or hook function that uses a callback
- "mocha/no-sibling-hooks": "error", // disallow duplicate uses of a hook at the same level inside a describe
- "mocha/no-skipped-tests": "error", // disallow skipped mocha tests (fixable)
- "mocha/no-synchronous-tests": "off", // disallow synchronous tests
- "mocha/no-top-level-hooks": "error", // disallow top-level hooks
- "mocha/valid-suite-description": "error", // match suite descriptions against a pre-configured regular expression
- "mocha/valid-test-description": "off", // match test descriptions against a pre-configured regular expression
- "mocha/no-async-describe": "error",
-
- // node
- "node/exports-style": ["error", "module.exports"],
- "node/no-callback-literal": "error",
- "node/no-exports-assign": "off",
- "node/file-extension-in-import": ["error", "always"],
- "node/no-deprecated-api": "error",
- "node/no-extraneous-require": "error",
- "node/no-missing-require": "error",
- "node/no-unpublished-bin": "error",
- "node/no-unpublished-require": "error",
- "node/no-unsupported-features/es-syntax": "error",
- "node/no-unsupported-features/es-builtins": "error",
- "node/no-unsupported-features/node-builtins": "error",
- "node/process-exit-as-throw": "error",
- "node/shebang": "error",
-
- // imports
- "import/no-unresolved": "error",
- "import/named": "error",
- "import/default": "error",
- "import/namespace": "error",
- "import/no-stricted-paths": "off",
- "import/no-absolute-path": "error",
- "import/no-dynamic-require": "error",
- "import/no-internal-modules": "off",
- "import/no-webpack-loader-syntax": "error",
- "import/no-self-import": "error",
- "import/no-cycle": "error",
- "import/no-useless-path-segments": "error",
- "import/no-relative-parent-imports": "error",
- "import/no-unused-modules": "error",
-
- "import/export": "error",
- "import/no-named-as-default": "error",
- "import/no-named-as-default-member": "error",
- "import/no-deprecated": "error",
- "import/no-extraneous-dependencies": "error",
- "import/no-mutable-exports": "error",
-
- "import/unambiguous": "off",
- "import/no-commonjs": "off",
- "import/no-amd": "error",
- "import/no-nodejs-modules": "off",
-
- "import/first": "error",
- "import/exports-last": "error",
- "import/no-duplicates": "error",
- "import/no-namespace": "error",
- "import/extensions": "off",
- "import/order": "error",
- "import/newline-after-import": "error",
- "import/prefer-default-export": "error",
- "import/max-dependencies": ["error", { "max": 20 }],
- "import/no-unassigned-import": "error",
- "import/no-named-default": "error",
- "import/no-named-export": "error",
- "import/no-anonymous-default-export": "error",
- "import/group-exports": "off",
- "dynamic-import-chunkname": "off",
-
- "unicorn/better-regex": "off",
- "unicorn/catch-error-name": ["error", { "name": "pError" }],
- "unicorn/consistent-function-scoping": "off",
- "unicorn/custom-error-definition": "off",
- "unicorn/error-message": "error",
- "unicorn/escape-case": "error",
- "unicorn/expiring-todo-comments": "error",
- "unicorn/explicit-length-check": "error",
- "unicorn/filename-case": ["error", { "case": "kebabCase" }],
- "unicorn/import-index": "off",
- "unicorn/new-for-builtins": "off", // conflicts with security/detect-non-literal-regexp, apparently
- "unicorn/no-abusive-eslint-disable": "error",
- "unicorn/no-array-instanceof": "error",
- "unicorn/no-console-spaces": "error",
- "unicorn/no-fn-reference-in-iterator": "off",
- "unicorn/no-for-loop": "error",
- "unicorn/no-hex-escape": "error",
- "unicorn/no-keyword-prefix": "off",
- "no-nested-ternary": "off",
- "unicorn/no-nested-ternary": "error",
- "unicorn/no-new-buffer": "error",
- "unicorn/no-process-exit": "error",
- "unicorn/no-unreadable-array-destructuring": "error",
- "unicorn/no-unsafe-regex": "error",
- "unicorn/no-unused-properties": "off",
- "unicorn/no-zero-fractions": "error",
- "unicorn/number-literal-case": "error",
- "unicorn/prefer-add-event-listener": "error",
- "unicorn/prefer-dataset": "error",
- "unicorn/prefer-event-key": "error",
- "unicorn/prefer-flat-map": "error",
- "unicorn/prefer-includes": "error",
- "unicorn/prefer-modern-dom-apis": "error",
- "unicorn/prefer-negative-index": "error",
- "unicorn/prefer-node-append": "error",
- "unicorn/prefer-node-remove": "error",
- "unicorn/prefer-query-selector": "error",
- "unicorn/prefer-reflect-apply": "error",
- "unicorn/prefer-replace-all": "off",
- "unicorn/prefer-spread": "error",
- "unicorn/prefer-starts-ends-with": "error",
- "unicorn/prefer-string-slice": "error",
- "unicorn/prefer-text-content": "error",
- "unicorn/prefer-trim-start-end": "error",
- "unicorn/prefer-type-error": "off",
- "unicorn/prevent-abbreviations": "off",
- "unicorn/throw-new-error": "error"
- }
-}
diff --git a/doc/assets/theming/bare.svg b/doc/assets/theming/bare.svg
index ac477960d..ed9a136ac 100644
--- a/doc/assets/theming/bare.svg
+++ b/doc/assets/theming/bare.svg
@@ -19,11 +19,6 @@
main
-
-cluster_src/main/files-and-dirs
-
-files-and-dirs
-
cluster_src/main/options
@@ -39,6 +34,11 @@
rule-set
+
+cluster_src/main/files-and-dirs
+
+files-and-dirs
+
src/main/files-and-dirs/normalize.js
diff --git a/doc/real-world-samples/dependency-cruiser-dir-graph.svg b/doc/real-world-samples/dependency-cruiser-dir-graph.svg
index 943ae81f7..0cb8c75e4 100644
--- a/doc/real-world-samples/dependency-cruiser-dir-graph.svg
+++ b/doc/real-world-samples/dependency-cruiser-dir-graph.svg
@@ -4,55 +4,55 @@
-