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

Biome #1075

Merged
merged 14 commits into from
Sep 5, 2024
Merged

Biome #1075

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: 0 additions & 4 deletions .eslintignore

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/radix-web-console-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
- uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
- run: npm ci
- run: npm run lint
- run: biome ci .
- run: npm run lint-ts

validate-radixconfig:
Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,20 +137,11 @@ Note that the biggest section of ITCSS, "components", is not defined here. Compo

## Coding standards

Coding standards are enforced by [Prettier](https://prettier.io/) and [ESLint](https://eslint.org/). Please use appropriate plugins for your editor:

- [ESLint for VS Code](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)
- [ESLint for Sublime Text](https://github.com/SublimeLinter/SublimeLinter-eslint)
- [ESLint for Atom](https://atom.io/packages/linter-eslint)
- [Prettier for VS Code](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)
- [Prettier for Sublime Text](https://github.com/danreeves/sublime-prettier)
- [Prettier for Atom](https://atom.io/packages/prettier-atom)
Coding standards are enforced by [Biomejs](https://Biomejs.dev/) . Please use appropriate plugins for your editor:

To get ESLint to run properly from your editor you will need to have it set up in your local environment (not the dev Docker container). You can do that by running:

npm install --only=dev && npm install --no-save eslint@5

Note the "no save" `eslint` installation — this is to avoid a conflict with the version bundled with CRA, which sometimes does not work from within a code editor, without attempting to install another `eslint` version in the build.
npm install

You can also run linting within the Docker container:

Expand Down
62 changes: 62 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": true
},
"files": {
"ignore": [
".vscode/",
"src/style/hex-to-hsl.js",
"build/",
"dist/",
"src/store/*.ts"
]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2,
"lineWidth": 80
},
"javascript": {
"formatter": {
"arrowParentheses": "always",
"bracketSameLine": false,
"bracketSpacing": true,
"quoteStyle": "single",
"quoteProperties": "asNeeded",
"semicolons": "always",
"trailingCommas": "es5"
}
},
"linter": {
"rules": {
"security": {
"noDangerouslySetInnerHtml": "off"
},
"complexity": {
"noForEach": "off",
"noUselessFragments": "off",
"useArrowFunction": "off"
},
"style": {
"noUselessElse": "off",
"useNumberNamespace": "off",
"noNonNullAssertion": "off",
"noParameterAssign": "off"
},
"suspicious": {
"noArrayIndexKey": "off",
"noAssignInExpressions": "off",
"noDoubleEquals": "off"
},
"performance": {
"noAccumulatingSpread": "off"
},
"a11y": {
"noRedundantRoles": "off",
"useKeyWithClickEvents": "off"
}
}
}
}
Loading