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: Run Prettier at root #1479

Merged
merged 2 commits into from
Nov 7, 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
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Report a component malfunction
title: '<Component Name>: <Short description>'
labels: ''
assignees: ''

---

**Description**
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/component-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for a new component
title: ''
labels: ''
assignees: ''

---

**Describe the behavior**
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "22.2.0"
cache: "yarn"
node-version: '22.2.0'
cache: 'yarn'
- uses: actions/cache@v3
id: yarn-cache
with:
Expand Down Expand Up @@ -66,10 +66,10 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: "22.2.0"
registry-url: "https://registry.npmjs.org"
scope: "@rocket.chat"
cache: "yarn"
node-version: '22.2.0'
registry-url: 'https://registry.npmjs.org'
scope: '@rocket.chat'
cache: 'yarn'
- uses: actions/cache@v3
id: yarn-cache
with:
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
- build-and-test
environment:
name: github-pages
url: "https://rocketchat.github.io/fuselage/fuselage/${{ needs.build-and-test.outputs.branch-name }}"
url: 'https://rocketchat.github.io/fuselage/fuselage/${{ needs.build-and-test.outputs.branch-name }}'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -135,7 +135,7 @@ jobs:
with:
target_branch: gh-pages
build_dir: .
commit_message: "Deploy to Github Pages [skip ci]"
commit_message: 'Deploy to Github Pages [skip ci]'
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/ci-pr-closed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
delete-storybook-for-pr:
name: "Delete Storybook for PR #${{ github.event.number }}"
name: 'Delete Storybook for PR #${{ github.event.number }}'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -18,7 +18,7 @@ jobs:
with:
target_branch: gh-pages
build_dir: .
commit_message: "Deploy to Github Pages [skip ci]"
commit_message: 'Deploy to Github Pages [skip ci]'
jekyll: false
env:
GITHUB_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .github/workflows/ci-pr-opened.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Continuous Integration (PR opened)

on:
workflow_run:
workflows: ["Continuous Integration"]
workflows: ['Continuous Integration']
types:
- completed

Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: "https://rocketchat.github.io/fuselage/fuselage/${{ needs.download-artifact.outputs.pr-number }}"
url: 'https://rocketchat.github.io/fuselage/fuselage/${{ needs.download-artifact.outputs.pr-number }}'
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -70,7 +70,7 @@ jobs:
with:
target_branch: gh-pages
build_dir: .
commit_message: "Deploy to Github Pages [skip ci]"
commit_message: 'Deploy to Github Pages [skip ci]'
jekyll: false
env:
GITHUB_TOKEN: ${{ github.token }}
6 changes: 3 additions & 3 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: "22.2.0"
cache: "yarn"
node-version: '22.2.0'
cache: 'yarn'
- uses: actions/cache@v3
id: yarn-cache
with:
Expand All @@ -44,7 +44,7 @@ jobs:
- run: yarn run ci
- uses: actions/upload-artifact@v3
with:
name: "storybooks-${{ github.event.number }}"
name: 'storybooks-${{ github.event.number }}'
path: |
packages/fuselage/storybook-static
packages/onboarding-ui/storybook-static
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: "main"
branches: 'main'
pull_request:
branches: "main"
branches: 'main'
schedule:
- cron: "54 21 * * 4"
- cron: '54 21 * * 4'

jobs:
analyze:
Expand Down Expand Up @@ -38,4 +38,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
category: '/language:${{ matrix.language }}'
2 changes: 1 addition & 1 deletion .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Pull request title"
name: 'Pull request title'
on:
pull_request_target:
types: [opened, edited]
Expand Down
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dist
storybook-static
bundle-report-dev.html
bundle-report.html
/.changeset
/.turbo
/.yarn
/README.md
6 changes: 3 additions & 3 deletions .vscode/fuselage.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"",
"it('renders without crashing', () => {",
" render(<$1 />);",
"});"
]
}
"});",
],
},
}
10 changes: 5 additions & 5 deletions .vscode/onboarding-ui.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
"};",
"",
"export default $1;",
""
"",
],
"description": "React component for onboarding-ui"
"description": "React component for onboarding-ui",
},
"Storybook story": {
"scope": "typescriptreact",
Expand All @@ -41,8 +41,8 @@
"export const _$1: Story<Args> = (args) => (",
" <$1 {...args} />",
");",
"_$1.storyName = '$1';"
"_$1.storyName = '$1';",
],
"description": "Storybook story for onboarding-ui"
}
"description": "Storybook story for onboarding-ui",
},
}
1 change: 0 additions & 1 deletion _templates/create-package/library/files/.prettierignore.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
to: packages/<%=package%>/.prettierignore
---
/node_modules
/dist
14 changes: 7 additions & 7 deletions _templates/create-package/library/prompt.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
module.exports = {
prompt: async ({ prompter }) => {
const { package: packageName } = await prompter.prompt({
type: "input",
name: "package",
type: 'input',
name: 'package',
message: "What's the package name?",
});

const { description } = await prompter.prompt({
type: "input",
name: "description",
type: 'input',
name: 'description',
message: "What's the package description?",
});

const { version } = await prompter.prompt({
type: "input",
name: "version",
default: "0.0.1",
type: 'input',
name: 'version',
default: '0.0.1',
message: "What's the package version?",
});

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"husky": "~9.1.6",
"hygen": "~6.2.11",
"pinst": "~3.0.0",
"prettier": "~3.3.3",
"turbo": "~2.2.3",
"update-readme": "workspace:~"
},
Expand All @@ -31,7 +32,8 @@
"create-package": "hygen create-package",
"release": "yarn changeset publish",
"changeset": "changeset",
"release-next": "yarn workspaces foreach --no-private -v npm publish --tag next --tolerate-republish"
"release-next": "yarn workspaces foreach --no-private -v npm publish --tag next --tolerate-republish",
"prettier": "prettier --plugin=@prettier/plugin-xml"
},
"engines": {
"node": "22.9.0"
Expand Down
1 change: 0 additions & 1 deletion packages/css-supports/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/node_modules
/dist
1 change: 0 additions & 1 deletion packages/emitter/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/node_modules
/dist
1 change: 0 additions & 1 deletion packages/eslint-config-alt/.prettierignore

This file was deleted.

1 change: 0 additions & 1 deletion packages/fuselage-hooks/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/node_modules
/dist
1 change: 0 additions & 1 deletion packages/fuselage-toastbar/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/dist
/node_modules
/storybook-static
2 changes: 0 additions & 2 deletions packages/fuselage-tokens/.prettierignore

This file was deleted.

26 changes: 6 additions & 20 deletions packages/fuselage-tokens/.stylelintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
"plugins": [
"stylelint-order",
"stylelint-scss",
"stylelint-prettier"
],
"plugins": ["stylelint-order", "stylelint-scss", "stylelint-prettier"],
"customSyntax": "postcss-scss",
"ignoreFiles": [
"src/**/*.js"
],
"ignoreFiles": ["src/**/*.js"],
"rules": {
"prettier/prettier": true,
"block-no-empty": true,
Expand All @@ -17,9 +11,7 @@
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
"ignore": ["consecutive-duplicates-with-different-values"]
}
],
"declaration-block-no-redundant-longhand-properties": true,
Expand All @@ -37,12 +29,8 @@
"rule-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
"except": ["first-nested"],
"ignore": ["after-comment"]
}
],
"scss/at-mixin-pattern": "^-?([a-z][a-z0-9]+-)*[a-z][a-z0-9]+$",
Expand All @@ -51,9 +39,7 @@
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": [
"global"
]
"ignorePseudoClasses": ["global"]
}
],
"selector-pseudo-element-colon-notation": "double",
Expand Down
3 changes: 2 additions & 1 deletion packages/fuselage/.prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/dist
/node_modules
/storybook-static
/**/*.mdx
/bundle-report-dev.html
/bundle-report.html
26 changes: 6 additions & 20 deletions packages/fuselage/.stylelintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
"plugins": [
"stylelint-order",
"stylelint-scss",
"stylelint-prettier"
],
"plugins": ["stylelint-order", "stylelint-scss", "stylelint-prettier"],
"customSyntax": "postcss-scss",
"ignoreFiles": [
"src/**/*.js"
],
"ignoreFiles": ["src/**/*.js"],
"rules": {
"prettier/prettier": true,
"block-no-empty": true,
Expand All @@ -17,9 +11,7 @@
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates-with-different-values"
]
"ignore": ["consecutive-duplicates-with-different-values"]
}
],
"declaration-block-no-redundant-longhand-properties": true,
Expand All @@ -37,12 +29,8 @@
"rule-empty-line-before": [
"always",
{
"except": [
"first-nested"
],
"ignore": [
"after-comment"
]
"except": ["first-nested"],
"ignore": ["after-comment"]
}
],
"scss/at-mixin-pattern": "^-?([a-z][a-z0-9]+-)*[a-z][a-z0-9]+$",
Expand All @@ -51,9 +39,7 @@
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": [
"global"
]
"ignorePseudoClasses": ["global"]
}
],
"selector-pseudo-element-colon-notation": "double",
Expand Down
Loading
Loading