-
Notifications
You must be signed in to change notification settings - Fork 679
ci: check for changes to lints separate from writing changes #2117
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
Changes from all commits
a97713d
87fc008
c19e7c0
e8c18d8
24d6b7d
fa72a4e
b4c57d2
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 |
|---|---|---|
|
|
@@ -34,7 +34,8 @@ | |
| "prebuild": "shx rm -rf ./coverage", | ||
| "build": "shx chmod +x src/*.js", | ||
| "prelint": "tsc --noemit --module es2022 --maxNodeModuleJsDepth 0 --project ./jsconfig.json", | ||
| "lint": "npx @biomejs/biome check --write .", | ||
| "lint": "npx @biomejs/biome check .", | ||
| "lint:fix": "npx @biomejs/biome check --write .", | ||
|
Comment on lines
+37
to
+38
Member
Author
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. This change is matched across all packages using |
||
| "pretest": "npm run lint", | ||
| "test": "c8 mocha src/*.spec.js" | ||
| }, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,22 +16,16 @@ | |
| "moduleResolution": "node", | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "*": [ | ||
| "./types/*" | ||
| ] | ||
| "*": ["./types/*"] | ||
|
Member
Author
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. Other changes are made to fix errors from
Contributor
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. what error would be thrown without this change?
Member
Author
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. An expection of an inlined list. What a beautiful error message this is 🤧 My output even shows
Member
Author
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. This is even an error that was changed with automagic 🪄 Quite impressive! ✨ |
||
| }, | ||
| "esModuleInterop": true | ||
| // Not using this setting because its only used to require the package.json file, and that would change the | ||
| // structure of the files in the dist directory because package.json is not located inside src. It would be nice | ||
| // to use import instead of require(), but its not worth the tradeoff of restructuring the build (for now). | ||
| // "resolveJsonModule": true, | ||
| }, | ||
| "include": [ | ||
| "src/**/*" | ||
| ], | ||
| "exclude": [ | ||
| "src/**/*.spec.*" | ||
| ], | ||
| "include": ["src/**/*"], | ||
| "exclude": ["src/**/*.spec.*"], | ||
| "jsdoc": { | ||
| "out": "support/jsdoc", | ||
| "access": "public" | ||
|
|
||
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.
This step is added to not convert files to ending lines with
\r\nafter a checkout.Some searching hints at
.gitattributesbeing an option for converting files to\nendings before a commit, which might be an option if lintings begin to fail due to files being committed with\r\n!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.
is there a reason why the files' ending lines are converted to this? I'm guessing we're getting rid of those ending lines because it's clashing with the linter's parsing?
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.
It seems to be a Windows default as far as I can tell 🤔
Some suggestions add the following to
.gitattributesto preferlfbut that might break editing experiences on certain setups that expect the\r\n:And some repos treat text files as binary to never change endings on checkout:
That last example is so interesting to me. The linter does expect
\nin all cases and was erroring if that wasn't found, and I'm hoping this change in CI is an alright enough workaround for matching expected line endings 👾