Skip to content
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

chore: upgrade deps and use c8/prettier #166

Merged
merged 1 commit into from
Jul 25, 2024
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
4 changes: 4 additions & 0 deletions .c8rc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"reporter": ["lcov"],
"include": ["lib/**/*.js"]
}
16 changes: 7 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
indent_style = space
indent_size = 4
root = true

[*]
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
Comment on lines +5 to +6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're changing this, we could change indent_style to tab and then setting the tab width is just up to each person via their editor settings.

What do you think?

Copy link
Contributor Author

@43081j 43081j Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think given this is the same in other chai repos, we should probably do that across the board in a standalone PR

im not opposed to it but think its better to do it separate

230 changes: 0 additions & 230 deletions .eslintrc.json

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: Publish to npm

on:
release:
types: [created]
types: [published]

jobs:
build:
Expand All @@ -16,7 +16,6 @@ jobs:
with:
node-version: 22
- run: npm ci
- run: npx playwright install --with-deps
- run: npm run build --if-present
- run: npm test

Expand All @@ -37,6 +36,11 @@ jobs:
- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.ref_name }}
- run: npm publish --provenance --access public --tag next
if: "github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_secret }}
- run: npm publish --provenance --access public
if: "!github.event.release.prerelease"
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_secret }}
10 changes: 10 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"bracketSpacing": false,
"printWidth": 80,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"useTabs": false,
"arrowParens": "always"
}
Comment on lines +1 to +10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason why we don't just use the defaults from prettier? Also is this consistent with other chai projects?

Copy link
Contributor Author

@43081j 43081j Jul 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the same as the one in other chai projects. afaik the defaults used double quotes amongst other things we don't follow

10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import eslintjs from '@eslint/js';

const {configs: eslintConfigs} = eslintjs;

export default [
{
...eslintConfigs.recommended,
files: ['lib/**/*.js'],
}
];
Loading
Loading