From 65c580b86e79ac026fb511cefad93a12fd579ab9 Mon Sep 17 00:00:00 2001 From: ImprovedTube Date: Wed, 17 Jul 2024 09:28:25 +0200 Subject: [PATCH] csslint; folders (+readme up) #2345 #2438 #2446 @PTheocharis @dodieboy @raszpl --- .github/workflows/eslint_csslint_jest.yml | 15 ++++------ tests/csslint_rules.json | 34 ++++++++++++++++++++--- jest.config.js => tests/jest.config.js | 0 3 files changed, 35 insertions(+), 14 deletions(-) rename jest.config.js => tests/jest.config.js (100%) diff --git a/.github/workflows/eslint_csslint_jest.yml b/.github/workflows/eslint_csslint_jest.yml index a05095b41..3097e25ab 100644 --- a/.github/workflows/eslint_csslint_jest.yml +++ b/.github/workflows/eslint_csslint_jest.yml @@ -30,21 +30,16 @@ jobs: run: npx eslint --config=tests/eslint_rules.config.mjs continue-on-error: true + - name: Run CSSLint + run: | + find css -type f -name '*.css' -exec npx csslint --config tests/csslint_rules.json {} + + # - name: Run JSLint # run: npx jslint "**/*.js" # continue-on-error: true - name: Run Jest - run: npx jest # --config=tests/jest.config.js + run: npx jest --config=tests/jest.config.js - name: Run npm test run: npm test - - - name: Install csslint using npm - run: npm install -g csslint@1.0.5 - -# - name: Lint CSS files -# run: | -# for file in $(grep -rl --include='*.css' '' ./); do npx csslint --config tests/csslint_rules.json "$file"; done - - diff --git a/tests/csslint_rules.json b/tests/csslint_rules.json index d6799d9ca..a795e9e26 100644 --- a/tests/csslint_rules.json +++ b/tests/csslint_rules.json @@ -1,5 +1,31 @@ -{"rules": - {"known-properties":true, - } -} +{ + "rules": { + "adjoining-classes": "warn", + "box-model": "warn", + "box-sizing": "warn", + "compatible-vendor-prefixes": "warn", + "display-property-grouping": "warn", + "duplicate-background-images": "warn", + "floats": "warn", + "font-faces": "warn", + "font-sizes": "warn", + "gradients": "warn", + "ids": "warn", + "import": "warn", + "important": "warn", + "known-properties": "enforce", + "outline-none": "warn", + "overqualified-elements": "warn", + "qualified-headings": "warn", + "regex-selectors": "warn", + "shorthand": "warn", + "text-indent": "warn", + "underscore-property-hack": "warn", + "unique-headings": "warn", + "universal-selector": "warn", + "unqualified-attributes": "warn", + "vendor-prefix": "warn", + "zero-units": "warn" + } + } \ No newline at end of file diff --git a/jest.config.js b/tests/jest.config.js similarity index 100% rename from jest.config.js rename to tests/jest.config.js