Skip to content

Commit

Permalink
feat(sage-monorepo): add Stylelint (ARCH-294) (#2861)
Browse files Browse the repository at this point in the history
  • Loading branch information
tschaffter authored Sep 27, 2024
1 parent 303d4b7 commit 8a559fc
Show file tree
Hide file tree
Showing 7 changed files with 419 additions and 35 deletions.
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
"shengchen.vscode-checkstyle",
"SonarSource.sonarlint-vscode",
"stkb.rewrap",
"stylelint.vscode-stylelint",
"vmware.vscode-boot-dev-pack",
"vscjava.vscode-gradle",
"vscjava.vscode-java-pack"
Expand Down
13 changes: 13 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Ignore all node modules
node_modules/

# Ignore all build directories
build/
dist/

# Ignore all test reports
coverage/
reports/

# Ignore selected project folders
apps/schematic/api/great_expectations
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
"java.format.enabled": false,
"java.compile.nullAnalysis.mode": "disabled",
"java.configuration.updateBuildConfiguration": "disabled",
"css.validate": false,
"less.validate": false,
"scss.validate": false,
"stylelint.enable": true,
"stylelint.validate": ["css", "scss"],
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.tabSize": 2,
Expand Down
7 changes: 7 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ module.exports = {
`nx affected --target=lint --files=${filenames.join(',')}`,
],

'**/*.{css,scss}': (filenames) => [
// Format files with Prettier
`prettier --write ${filenames.join(' ')}`,
// Lint files with Stylelint
`stylelint --allow-empty-input ${filenames.join(' ')}`,
],

'**/*.{json,md,yaml,yml,html}': (filenames) => [
// Format files with Prettier
`prettier --write ${filenames.join(' ')}`,
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@
"serverless": "3.22.0",
"serverless-plugin-typescript": "2.1.4",
"smee-client": "1.2.3",
"stylelint": "16.9.0",
"stylelint-config-prettier-scss": "1.0.0",
"stylelint-config-standard": "36.0.1",
"stylelint-config-standard-scss": "13.1.0",
"stylelint-scss": "6.7.0",
"supertest": "^6.3.0",
"tailwindcss": "3.4.3",
"ts-jest": "29.1.1",
Expand Down
Loading

0 comments on commit 8a559fc

Please sign in to comment.