-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lint: Add support for CSS stylesheets in linting workflow. #66
Changes from 35 commits
24a30ab
653e71b
c1e9aa6
64a751c
c95c20c
308c319
8cd6e29
b71d699
b09f16e
12a8bab
2c3c242
676e929
0a18614
e14fd6e
78a859a
764ab4f
d07d9b3
c1ab8fd
7706e45
c7b50fc
3de697f
bb9307d
ccc8a47
8f420b4
bafc21b
dae94ae
4268be5
94387dc
bf6b072
64b465a
64e7197
009f24d
5481538
0c6fa4f
52beffc
b6db9a1
dbd2e87
c597457
c0d4b71
fff19ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -29,4 +29,6 @@ jobs: | |||||
with: | ||||||
node-version: 22 | ||||||
- run: "npm --prefix new-log-viewer/ clean-install" | ||||||
- run: "npm --prefix new-log-viewer/ run lint:css-ci" | ||||||
- run: "npm --prefix new-log-viewer/ run lint:check" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I think this was supposed to be
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you rid of this later anyways. so i'm ignoring There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah it turn out that no changes are needed in the workflow file after the scripts are simplified |
||||||
if: "always()" |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
tabWidth: 4 | ||
useTabs: false | ||
singleQuote: false | ||
quoteProps: consistent | ||
printWidth: 100 | ||
endOfLine: lf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"extends": [ | ||
"stylelint-config-standard", | ||
"stylelint-config-clean-order/error", | ||
"stylelint-prettier/recommended" | ||
] | ||
} |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,10 +5,17 @@ | |
"main": "src/index.tsx", | ||
"scripts": { | ||
"build": "webpack --config webpack.prod.js", | ||
"start": "webpack serve --open --config webpack.dev.js", | ||
|
||
"lint": "npm run lint:check", | ||
"lint:check": "eslint src webpack.*.js --max-warnings 0", | ||
"lint:fix": "npm run lint:check -- --fix", | ||
"start": "webpack serve --open --config webpack.dev.js" | ||
"lint:check": "npm-run-all --sequential --continue-on-error lint:css-check lint:js-check", | ||
"lint:fix": "npm-run-all --sequential --continue-on-error lint:css-fix lint:js-fix", | ||
|
||
"lint:css-check": "stylelint src/**/*.css", | ||
"lint:css-ci": "npm run lint:css-check -- --formatter github", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Although the GitHub formatter has been deprecated according to the Stylelint docs [1], the default [1] https://stylelint.io/user-guide/options#formatter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It seems that to get the whole flow working, we also need to use a custom GitHub action in the workflow, which can be less ideal. Do you think we can keep using the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think having the errors annotated inline would be more convenient. On the other hand, using a deprecated but not yet removed formatter isn't too harmful until we do version upgrades. We can continue the discussion at #66 (comment) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see other comment |
||
"lint:css-fix": "npm run lint:css-check -- --fix", | ||
"lint:js-check": "eslint src webpack.*.js --max-warnings 0", | ||
"lint:js-fix": "npm run lint:js-check -- --fix" | ||
junhaoliao marked this conversation as resolved.
Show resolved
Hide resolved
|
||
}, | ||
"repository": { | ||
"type": "git", | ||
|
@@ -49,8 +56,14 @@ | |
"html-webpack-plugin": "^5.6.0", | ||
"mini-css-extract-plugin": "^2.9.0", | ||
"monaco-editor-webpack-plugin": "^7.1.0", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^3.3.3", | ||
"react-refresh": "^0.14.2", | ||
"style-loader": "^4.0.0", | ||
"stylelint": "^16.9.0", | ||
"stylelint-config-clean-order": "^6.1.0", | ||
"stylelint-config-standard": "^36.0.1", | ||
"stylelint-prettier": "^5.0.2", | ||
"typescript": "^5.6.2", | ||
"webpack": "^5.92.0", | ||
"webpack-cli": "^5.1.4", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.menu-bar { | ||
display: flex; | ||
flex-direction: row; | ||
height: var(--ylv-status-bar-height); | ||
align-items: center; | ||
height: var(--ylv-status-bar-height); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
.status-bar { | ||
align-items: center; | ||
position: absolute; | ||
bottom: 0; | ||
|
||
display: flex; | ||
position: absolute; | ||
align-items: center; | ||
|
||
width: 100%; | ||
} | ||
|
||
.status-message { | ||
padding-left: 8px; | ||
flex-grow: 1; | ||
padding-left: 8px; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just update this now to call lint:check:js and lint:check:css so lint:check dosen't run lint:css twice