Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@
"uic-med-words",
"uic-tech-words"
]
}
}
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[*]
end_of_line = lf
trim_trailing_whitespace = true
insert_final_line = true
insert_final_newline = true

indent_style = space
indent_size = 3
Expand Down
14 changes: 1 addition & 13 deletions .github/workflows/development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,4 @@ on:
jobs:
test:
name: Lint and Test
# We must manually provide these steps, instead of use actions and workflows in
# `uicpharm/workflows`, since this is a public repo and our workflows are private.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- run: npm ci
- run: npm run test --if-present
- run: npm run standards --if-present
uses: uicpharm/workflows/.github/workflows/lint-and-test.yml@v1
Comment thread
joshuacurtiss marked this conversation as resolved.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.12.2
v24.14.1
38 changes: 22 additions & 16 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
{
"extends": "stylelint-config-standard-scss",
"extends": [
"stylelint-config-standard-scss",
"@stylistic/stylelint-config"
],
"plugins": [
"@stylistic/stylelint-plugin"
],
"rules": {
"block-opening-brace-space-before": "always",
"block-opening-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"color-hex-case": "lower",
"@stylistic/block-opening-brace-space-before": "always",
"@stylistic/block-opening-brace-newline-after": "always",
"@stylistic/block-closing-brace-newline-before": "always",
"@stylistic/color-hex-case": "lower",
"declaration-block-no-duplicate-properties": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-space-before": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"indentation": 3,
"no-eol-whitespace": true,
"@stylistic/declaration-block-semicolon-newline-after": "always",
"@stylistic/declaration-block-semicolon-space-before": "never",
"@stylistic/declaration-block-trailing-semicolon": "always",
"@stylistic/declaration-colon-space-after": "always",
"@stylistic/declaration-colon-space-before": "never",
"@stylistic/indentation": 3,
"@stylistic/no-eol-whitespace": true,
"length-zero-no-unit": true,
"max-empty-lines": 1,
"no-missing-end-of-source-newline": true,
"unit-case": "lower",
"@stylistic/max-empty-lines": 1,
"@stylistic/no-missing-end-of-source-newline": true,
"@stylistic/unit-case": "lower",
"value-keyword-case": "lower"
}
}
}
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"recommendations": [
"EditorConfig.EditorConfig",
"streetsidesoftware.code-spell-checker",
"joshbolduc.commitlint",
"timonwong.shellcheck",
"stylelint.vscode-stylelint",
"DavidAnson.vscode-markdownlint",
"dbaeumer.vscode-eslint"
]
}
52 changes: 51 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ Then add a script in `package.json` in your project similar to this:
Using [eslint](https://eslint.org) is critical to catch programming errors and maintain
better coding conventions in JavaScript and TypeScript.

As of 2026, eslint and its configurations are the only ones that have not been fully
modernized, since migrating from eslint 8 involves significant changes, especially since
eslint 9 introduced a new config format and eslint 10 [no longer supports the old config
format][eslint-old-config-format]. This introduced breaking changes with existing rule
libraries. A full upgrade to eslint 10 is coming soon.
Comment thread
joshuacurtiss marked this conversation as resolved.

Create a file called `.eslintrc.json` in your project similar to this:

```json
Expand All @@ -177,6 +183,8 @@ Then add a script in `package.json` in your project similar to this:
}
```

[eslint-old-config-format]: https://eslint.org/docs/latest/use/migrate-to-10.0.0#-old-config-format-no-longer-supported

### YAML Linting

It doesn't lint to specific YAML schemas by default, but even basic YAML linting with
Expand All @@ -201,7 +209,7 @@ added as a `test` script in `package.json`.

```json
"scripts": {
"check-node": "check-node-version --node 20.10.0 --npm 10.2.3",
"check-node": "check-node-version --node $(cat .nvmrc) --npm 11.11.0 --print",
"test": "npm run check-node"
}
```
Expand All @@ -226,3 +234,45 @@ These are just recommendations, or starting points, and you can add or subtract
as needed based on a specific project's needs. For instance, your `test` script will
likely include other code tests, and your `standards` script may also do TypeScript type
checking with a script like `tsc --noEmit` or similar.

## Recommended VS Code Settings

Whether you use VS Code, or how you configure your environment, is your business. Our
philosophy is that you should be able to work on our projects with the IDE of your choice,
and all linting/tests should be executable as scripts like described above. However, we do
have some recommendations if you *are* using VS Code.

### Extension Recommendations

In your project, create a [.vscode/extensions.json](./.vscode/extensions.json) file
similar to the sample in this project, to recommend all of the extensions that are
beneficial in your project. Our sample may be a good starting point, although you may
have additions or subtractions.

When a new developer opens your project, the extensions will automatically be recommended
for installation if they don't have them already installed.

### Auto-fix on Save

It is very convenient to have VS Code auto-fix simple lint issues on save. But to do that,
you have to add some settings to your `.vscode/settings.json` file. We don't want to
commit the settings.json file since it may have additional user-specific settings. But
here are recommendations for you to copy in if you want some of the lint fixing.

```jsonc
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit",
"source.fixAll.markdownlint": "explicit"
},
"eslint.validate": ["javascript", "typescript"],
"stylelint.validate": ["css", "scss"],
// Optional: Disable VS Code's native format-on-save if it conflicts with plugins
"[scss]": { "editor.formatOnSave": false },
"[css]": { "editor.formatOnSave": false },
"[markdown]": { "editor.formatOnSave": false },
"[javascript]": { "editor.formatOnSave": false },
"[typescript]": { "editor.formatOnSave": false },
}
```
Loading