chore: update lint rules

This commit is contained in:
George Cushen 2023-10-24 22:46:49 +01:00
commit 6f622fb134
12 changed files with 1730 additions and 1659 deletions

View file

@ -10,11 +10,11 @@ indent_style = space
insert_final_newline = true insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.toml] [*.yaml]
max_line_length = 100 max_line_length = 150
[*.md] [*.md]
trim_trailing_whitespace = false trim_trailing_whitespace = false
[{*/layouts/shortcodes/*.html, */layouts/_default/_markup/*.html}] [{**/layouts/shortcodes/*.html, **/layouts/_default/_markup/*.html}]
insert_final_newline = false insert_final_newline = false

View file

@ -2,6 +2,7 @@ env:
browser: true browser: true
es2021: true es2021: true
jquery: true jquery: true
node: true
extends: extends:
- 'eslint:recommended' - 'eslint:recommended'
- 'prettier' # Prevent Prettier conflicts - 'prettier' # Prevent Prettier conflicts

View file

@ -29,10 +29,10 @@ jobs:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
- name: Install JS dependencies - name: Install JS dependencies
run: rm -rf node_modules && yarn install --frozen-lockfile run: rm -rf node_modules && pnpm install --frozen-lockfile
- name: Check for linting errors - name: Check for linting errors
run: yarn run lint:js # TODO: also lint styles again once new rule errors resolved run: pnpm run lint:js # TODO: also lint styles again once new rule errors resolved
# format: # format:
# runs-on: ubuntu-latest # runs-on: ubuntu-latest
@ -56,7 +56,7 @@ jobs:
hugo: hugo:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: true # Fetch any Git submodules (true OR recursive) submodules: true # Fetch any Git submodules (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod

View file

@ -1,20 +1,25 @@
plugins: # PREVIOUS PLUGINS - no longer needed now porting from Bootstrap to Tailwind
- stylelint-scss #plugins:
# - stylelint-scss
extends: extends:
- stylelint-config-standard - stylelint-config-standard
- stylelint-config-prettier - stylelint-config-prettier
- stylelint-config-standard-scss # PREVIOUS EXTENDS - no longer needed now porting from Bootstrap to Tailwind
- stylelint-config-prettier-scss # - stylelint-config-standard-scss
# - stylelint-config-prettier-scss
rules: rules:
at-rule-no-unknown: null # Use SCSS "at" rules comment-empty-line-before: null # Allow more compact comments
scss/at-rule-no-unknown: true # Use SCSS "at" rules
no-descending-specificity: null # Todo: remove once investigated/resolved
color-function-notation: null # Todo: refactor code
alpha-value-notation: null # Todo: refactor code
number-max-precision: null # Todo: refactor code
property-no-vendor-prefix: null # Necessary unless postcss prefix property-no-vendor-prefix: null # Necessary unless postcss prefix
value-no-vendor-prefix: null # Necessary unless postcss prefix value-no-vendor-prefix: null # Necessary unless postcss prefix
font-family-no-missing-generic-family-keyword: at-rule-no-unknown: null # Use PostCSS "at" rules
- true # PREVIOUS RULES - no longer needed now porting from Bootstrap to Tailwind
- ignoreFontFamilies: # at-rule-no-unknown: null # Use SCSS "at" rules
- Font Awesome 5 Free # scss/at-rule-no-unknown: true # Use SCSS "at" rules
# no-descending-specificity: null # Todo: remove once investigated/resolved
# color-function-notation: null # Todo: refactor code
# alpha-value-notation: null # Todo: refactor code
# number-max-precision: null # Todo: refactor code
# font-family-no-missing-generic-family-keyword:
# - true
# - ignoreFontFamilies:
# - Font Awesome 5 Free

View file

@ -2,4 +2,4 @@
We want to foster a positive, inclusive, and welcoming environment 💜 We want to foster a positive, inclusive, and welcoming environment 💜
We expect you to follow our [Code of Conduct](https://wowchemy.com/docs/hugo-tutorials/contribute/) to fulfil this goal. We expect you to follow our [Code of Conduct](https://university.wowchemy.com/reference/contribute/) to fulfil this goal.

View file

@ -25,5 +25,8 @@
"type": "git", "type": "git",
"url": "https://github.com/wowchemy/wowchemy-hugo-themes.git" "url": "https://github.com/wowchemy/wowchemy-hugo-themes.git"
}, },
"scripts": {
"build:blog": "npx tailwindcss -i ./assets/css/styles.css -o ../../starters/blog/assets/dist/wc.css --minify"
},
"version": "0.1.0" "version": "0.1.0"
} }

View file

@ -12,7 +12,6 @@
"type": "git", "type": "git",
"url": "git+https://github.com/wowchemy/wowchemy-hugo-themes.git" "url": "git+https://github.com/wowchemy/wowchemy-hugo-themes.git"
}, },
"main": "index.js",
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^6.4.0", "@fortawesome/fontawesome-free": "^6.4.0",
"bootstrap": "^4.6.1", "bootstrap": "^4.6.1",
@ -37,11 +36,11 @@
"view": "scripts/view-starter.sh", "view": "scripts/view-starter.sh",
"view:local": "scripts/view-starter-dev.sh", "view:local": "scripts/view-starter-dev.sh",
"test": "echo \"Error: no test specified\" && exit 1", "test": "echo \"Error: no test specified\" && exit 1",
"lint": "yarn run lint:js && yarn run lint:style", "lint": "pnpm run lint:js && yarn run lint:style",
"lint:js": "eslint '*/**/*.{js,ts,tsx}'", "lint:js": "eslint '*/**/*.{js,ts,tsx}'",
"lint:js:fix": "eslint '*/**/*.{js,ts,tsx}' --fix", "lint:js:fix": "eslint '*/**/*.{js,ts,tsx}' --fix",
"lint:style": "stylelint '*/**/*.{css,scss}'", "lint:style": "stylelint 'modules/wowchemy-tailwind/**/*.css'",
"lint:style:fix": "stylelint '*/**/*.{css,scss}' --fix", "lint:style:fix": "stylelint 'modules/wowchemy-tailwind/**/*.css' --fix",
"format": "prettier --write \"*.{css,js,json,md,scss}\" \"./**/*.{css,js,json,md,scss}\"", "format": "prettier --write \"*.{css,js,json,md,scss}\" \"./**/*.{css,js,json,md,scss}\"",
"stylelint-conflict-check": "stylelint-config-prettier-check", "stylelint-conflict-check": "stylelint-config-prettier-check",
"update:starter": "scripts/update-starter.sh", "update:starter": "scripts/update-starter.sh",

1685
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -3,4 +3,5 @@ module github.com/wowchemy/wowchemy-hugo-themes/starters/blog
go 1.19 go 1.19
require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20231024173257-66e3c7e27eb0 require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-plugin-netlify v1.0.1-0.20231024173257-66e3c7e27eb0
require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-tailwind v0.0.0-20231024181131-2c1d5b4f7188
require github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-tailwind v0.0.0-20231024214156-c2b66cf131f3

View file

@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}

1631
yarn.lock

File diff suppressed because it is too large Load diff