Browse Source

Merge pull request #2727 from XhmikosR/stylelint

Add stylelint support
REJack 4 years ago
parent
commit
ae1c128e04

+ 10 - 3
.github/workflows/node-install.yml → .github/workflows/ci.yml

@@ -1,4 +1,4 @@
-name: Node.js Install Test
+name: CI
 
 on:
   pull_request:
@@ -26,9 +26,16 @@ jobs:
           - "windows-latest"
 
     steps:
-      - uses: actions/checkout@v2
+      - name: Clone repository
+        uses: actions/checkout@v2
+
       - name: Use Node.js ${{ matrix.node }}
         uses: actions/setup-node@v1
         with:
           node-version: ${{ matrix.node }}
-      - run: npm ci
+
+      - name: Install npm dependencies
+        run: npm ci
+
+      - name: Build files
+        run: npm run compile

+ 39 - 0
.github/workflows/lint.yml

@@ -0,0 +1,39 @@
+name: Lint
+
+on:
+  pull_request:
+  release:
+    types:
+      - created
+
+env:
+  CI: true
+  NODE: 12.x
+
+jobs:
+  run:
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Clone repository
+        uses: actions/checkout@v2
+
+      - name: Set up Node.js
+        uses: actions/setup-node@v1
+        with:
+          node-version: "${{ env.NODE }}"
+
+      - name: Set up npm cache
+        uses: actions/cache@v2
+        with:
+          path: ~/.npm
+          key: ${{ runner.os }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}}
+          restore-keys: |
+            ${{ runner.OS }}-node-v${{ env.node }}-${{ hashFiles('package.json') }}-${{ hashFiles('package-lock.json') }}
+            ${{ runner.OS }}-node-v${{ env.node }}-
+
+      - name: Install npm dependencies
+        run: npm ci
+
+      - name: Run lint
+        run: npm run lint

+ 1 - 0
.gitignore

@@ -35,3 +35,4 @@ docs_html/
 TODO
 test.html
 ad.js
+/.cache/

+ 4 - 0
.stylelintignore

@@ -0,0 +1,4 @@
+**/*.min.css
+**/dist/
+**/docs_html/
+**/plugins/

+ 16 - 0
.stylelintrc

@@ -0,0 +1,16 @@
+{
+  "extends": [
+    "stylelint-config-twbs-bootstrap/scss"
+  ],
+  "rules": {
+    "declaration-no-important": null,
+    "order/properties-order": null,
+    "selector-max-class": null,
+    "selector-max-combinators": null,
+    "selector-max-compound-selectors": null,
+    "selector-max-id": null,
+    "selector-max-specificity": null,
+    "selector-max-type": null,
+    "selector-no-qualifying-type": null
+  }
+}

+ 0 - 23
build/scss/.csslintrc

@@ -1,23 +0,0 @@
-{
-  "adjoining-classes": false,
-  "box-sizing": false,
-  "box-model": false,
-  "compatible-vendor-prefixes": false,
-  "floats": false,
-  "font-sizes": false,
-  "gradients": false,
-  "important": false,
-  "known-properties": false,
-  "outline-none": false,
-  "qualified-headings": false,
-  "regex-selectors": false,
-  "shorthand": false,
-  "text-indent": false,
-  "unique-headings": false,
-  "universal-selector": false,
-  "unqualified-attributes": false,
-  "ids": false,
-  "fallback-colors": false,
-  "vendor-prefix": false,
-  "import": false
-}

+ 6 - 6
build/scss/AdminLTE-components.scss

@@ -7,14 +7,14 @@
  */
 // Bootstrap
 // ---------------------------------------------------
-@import '~bootstrap/scss/functions';
-@import 'bootstrap-variables';
-@import '~bootstrap/scss/mixins';
+@import "~bootstrap/scss/functions";
+@import "bootstrap-variables";
+@import "~bootstrap/scss/mixins";
 // @import '~bootstrap/scss/bootstrap';
 
 // Variables and Mixins
 // ---------------------------------------------------
-@import 'variables';
-@import 'mixins';
+@import "variables";
+@import "mixins";
 
-@import 'parts/components';
+@import "parts/components";

+ 7 - 7
build/scss/AdminLTE-core.scss

@@ -7,14 +7,14 @@
  */
 // Bootstrap
 // ---------------------------------------------------
-@import '~bootstrap/scss/functions';
-@import 'bootstrap-variables';
-@import '~bootstrap/scss/bootstrap';
+@import "~bootstrap/scss/functions";
+@import "bootstrap-variables";
+@import "~bootstrap/scss/bootstrap";
 
 // Variables and Mixins
 // ---------------------------------------------------
-@import 'variables';
-@import 'mixins';
+@import "variables";
+@import "mixins";
 
-@import 'parts/core';
-@import 'parts/miscellaneous';
+@import "parts/core";
+@import "parts/miscellaneous";

+ 6 - 6
build/scss/AdminLTE-extra-components.scss

@@ -7,14 +7,14 @@
  */
 // Bootstrap
 // ---------------------------------------------------
-@import '~bootstrap/scss/functions';
-@import 'bootstrap-variables';
-@import '~bootstrap/scss/mixins';
+@import "~bootstrap/scss/functions";
+@import "bootstrap-variables";
+@import "~bootstrap/scss/mixins";
 // @import '~bootstrap/scss/bootstrap';
 
 // Variables and Mixins
 // ---------------------------------------------------
-@import 'variables';
-@import 'mixins';
+@import "variables";
+@import "mixins";
 
-@import 'parts/extra-components';
+@import "parts/extra-components";

+ 7 - 7
build/scss/AdminLTE-pages.scss

@@ -7,14 +7,14 @@
  */
 // Bootstrap
 // ---------------------------------------------------
-@import '~bootstrap/scss/functions';
-@import 'bootstrap-variables';
-@import '~bootstrap/scss/mixins';
-@import '~bootstrap/scss/close';
+@import "~bootstrap/scss/functions";
+@import "bootstrap-variables";
+@import "~bootstrap/scss/mixins";
+@import "~bootstrap/scss/close";
 
 // Variables and Mixins
 // ---------------------------------------------------
-@import 'variables';
-@import 'mixins';
+@import "variables";
+@import "mixins";
 
-@import 'parts/pages';
+@import "parts/pages";

Some files were not shown because too many files changed in this diff