diff --git a/.eslintrc.json b/.eslintrc.json index b632124b3..0bddfd8b9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -14,6 +14,35 @@ "error", "never" ], + "import/extensions": [ + "error", + "ignorePackages", + { + "js": "always" + } + ], + "import/first": "error", + "import/newline-after-import": "error", + "import/no-absolute-path": "error", + "import/no-amd": "error", + "import/no-cycle": [ + "error", + { + "ignoreExternal": true + } + ], + "import/no-duplicates": "error", + "import/no-extraneous-dependencies": "error", + "import/no-mutable-exports": "error", + "import/no-named-as-default": "error", + "import/no-named-as-default-member": "error", + "import/no-named-default": "error", + "import/no-self-import": "error", + "import/no-unassigned-import": [ + "error" + ], + "import/no-useless-path-segments": "error", + "import/order": "error", "indent": [ "error", 2, @@ -51,16 +80,48 @@ "error", "never" ], + "strict": "error", "unicorn/explicit-length-check": "off", + "unicorn/filename-case": "off", "unicorn/no-array-callback-reference": "off", "unicorn/no-array-method-this-argument": "off", "unicorn/no-null": "off", + "unicorn/no-typeof-undefined": "off", "unicorn/no-unused-properties": "error", + "unicorn/numeric-separators-style": "off", "unicorn/prefer-array-flat": "off", + "unicorn/prefer-at": "off", "unicorn/prefer-dom-node-dataset": "off", "unicorn/prefer-module": "off", "unicorn/prefer-query-selector": "off", "unicorn/prefer-spread": "off", + "unicorn/prefer-string-replace-all": "off", "unicorn/prevent-abbreviations": "off" - } -} + }, + "overrides": [ + { + "files": [ + "build/**" + ], + "env": { + "browser": false, + "node": true + }, + "parserOptions": { + "sourceType": "script" + }, + "rules": { + "no-console": "off", + "unicorn/prefer-top-level-await": "off" + } + }, + { + "files": [ + "src/js/**" + ], + "parserOptions": { + "sourceType": "module" + } + } + ] +} \ No newline at end of file diff --git a/.stylelintrc b/.stylelintrc index 94c8ec155..e84e07656 100644 --- a/.stylelintrc +++ b/.stylelintrc @@ -2,30 +2,37 @@ "extends": [ "stylelint-config-twbs-bootstrap" ], - "rules": { - "declaration-property-value-disallowed-list": { - "border": "none", - "outline": "none" - }, - "function-disallowed-list": [ - "calc", - "lighten", - "darken" - ], - "property-disallowed-list": [ - "border-radius", - "border-top-left-radius", - "border-top-right-radius", - "border-bottom-right-radius", - "border-bottom-left-radius", - "transition" - ], - "scss/dollar-variable-default": [ - true, - { - "ignore": "local" + "reportInvalidScopeDisables": true, + "reportNeedlessDisables": true, + "overrides": [ + { + "files": "**/*.scss", + "rules": { + "declaration-property-value-disallowed-list": { + "border": "none", + "outline": "none" + }, + "function-disallowed-list": [ + "calc", + "lighten", + "darken" + ], + "property-disallowed-list": [ + "border-radius", + "border-top-left-radius", + "border-top-right-radius", + "border-bottom-right-radius", + "border-bottom-left-radius", + "transition" + ], + "scss/dollar-variable-default": [ + true, + { + "ignore": "local" + } + ], + "scss/selector-no-union-class-name": true } - ], - "scss/selector-no-union-class-name": true - } -} + } + ] +} \ No newline at end of file diff --git a/build/.eslintrc.json b/build/.eslintrc.json deleted file mode 100644 index 679bd26f7..000000000 --- a/build/.eslintrc.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "env": { - "browser": false, - "node": true - }, - "parserOptions": { - "sourceType": "script" - }, - "extends": "../.eslintrc.json", - "rules": { - "no-console": "off", - "strict": "error" - } -} diff --git a/build/change-version.js b/build/change-version.js index 804bac688..2cebbc7dc 100644 --- a/build/change-version.js +++ b/build/change-version.js @@ -9,10 +9,8 @@ 'use strict' -// eslint-disable-next-line unicorn/prefer-node-protocol -const fs = require('fs').promises -// eslint-disable-next-line unicorn/prefer-node-protocol -const path = require('path') +const fs = require('node:fs').promises +const path = require('node:path') const globby = require('globby') const VERBOSE = process.argv.includes('--verbose') @@ -83,5 +81,4 @@ async function main(args) { } } -// eslint-disable-next-line unicorn/prefer-top-level-await main(process.argv.slice(2)) diff --git a/build/pug.js b/build/pug.js index 5f73bf7d6..50a3b3820 100644 --- a/build/pug.js +++ b/build/pug.js @@ -1,12 +1,11 @@ #!/usr/bin/env node 'use strict' -// eslint-disable-next-line unicorn/prefer-node-protocol -const fs = require('fs').promises -// eslint-disable-next-line unicorn/prefer-node-protocol -const path = require('path') -const mkdirp = require('mkdirp') +const fs = require('node:fs').promises +const path = require('node:path') +const { mkdirp } = require('mkdirp') const pug = require('pug') + const { basename, dirname, resolve, sep } = path const globby = require('globby') @@ -84,5 +83,4 @@ async function main(args) { } } -// eslint-disable-next-line unicorn/prefer-top-level-await main(args) diff --git a/build/vendors.js b/build/vendors.js index 1b9962e31..34fb31b2c 100644 --- a/build/vendors.js +++ b/build/vendors.js @@ -2,12 +2,11 @@ 'use strict' -// eslint-disable-next-line unicorn/prefer-node-protocol -const fs = require('fs') -// eslint-disable-next-line unicorn/prefer-node-protocol -const path = require('path') -const extension = path.extname +const fs = require('node:fs') +const path = require('node:path') const injector = require('@coreui/vendors-injector') + +const extension = path.extname const dist = 'dist/' const walkSync = (dir, filelist = []) => { diff --git a/dist/404.html b/dist/404.html index 58d4c452b..03c924dfb 100644 --- a/dist/404.html +++ b/dist/404.html @@ -1,10 +1,9 @@ - - @@ -39,22 +38,25 @@ - - - + +
diff --git a/dist/500.html b/dist/500.html index ab708b9f5..96c731fc5 100644 --- a/dist/500.html +++ b/dist/500.html @@ -1,10 +1,9 @@ - - @@ -39,22 +38,25 @@ - - - + +
diff --git a/dist/base/accordion.html b/dist/base/accordion.html index bcb0aef60..1c9bd959f 100644 --- a/dist/base/accordion.html +++ b/dist/base/accordion.html @@ -1,12 +1,10 @@ - - - +* @link https://coreui.io/product/free-bootstrap-admin-template/ +* Copyright (c) 2023 creativeLabs Łukasz Holeczek +* Licensed under MIT (https://github.com/coreui/coreui-free-bootstrap-admin-template/blob/main/LICENSE) +--> @@ -40,25 +38,33 @@ - - - + + + + +