Skip to content

Commit

Permalink
chore: update formatting tools, improve linting configs, and minor do…
Browse files Browse the repository at this point in the history
…cs adjustments. (#13)

* chore: update VSCode settings for Prettier and add ESLint configuration

* fix: linting and formatting errors
  • Loading branch information
supitsdu authored Dec 21, 2024
1 parent c467d5c commit bc6f7af
Show file tree
Hide file tree
Showing 9 changed files with 1,938 additions and 481 deletions.
7 changes: 4 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"editor.formatOnSave": true,
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "biomejs.biome"
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
22 changes: 11 additions & 11 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
- Focusing on what is best not just for us as individuals, but for the
overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities
Expand Down Expand Up @@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
Expand Down
11 changes: 6 additions & 5 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

During the early development phase, we provide patches for security vulnerabilities primarily for the upcoming 1.x.x versions. Pre-1.0.0 releases will be marked as pre-release and may receive limited support.

| Version | Supported |
| ------------ | ------------------ |
| 1.x.x | :white_check_mark: |
| 0.x.x (pre) | :white_check_mark: (limited) |
| < 0.3.0 | :x: |
| Version | Supported |
| ----------- | ---------------------------- |
| 1.x.x | :white_check_mark: |
| 0.x.x (pre) | :white_check_mark: (limited) |
| < 0.3.0 | :x: |

## Reporting a Vulnerability

If you discover a security vulnerability, please report it by emailing [[email protected]](mailto:[email protected]). As this project is maintained by a solo developer, please allow up to 3 business days for a response. We will work with you to ensure a thorough understanding of the issue and to address it as quickly as possible.

Please include the following details with your report:

- A description of the vulnerability
- Steps to reproduce the issue
- Any potential impacts
Expand Down
57 changes: 0 additions & 57 deletions biome.json

This file was deleted.

33 changes: 33 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import pluginJs from "@eslint/js"
import pluginVue from "eslint-plugin-vue"
import globals from "globals"
import tseslint from "typescript-eslint"
import prettier from "eslint-config-prettier"

/** @type {import('eslint').Linter.Config[]} */
export default [
{ files: ["docs/**/*.{ts,js,vue}", "src/*.{ts}"] },
{ languageOptions: { globals: { ...globals.browser, ...globals.node } } },
pluginJs.configs.recommended,
...tseslint.configs.recommended,
...pluginVue.configs["flat/essential"],
{ files: ["**/*.vue"], languageOptions: { parserOptions: { parser: tseslint.parser } } },
{ ignores: ["**docs/.vitepress/cache/**"] },
{
files: ["src/**/*.ts", "test/**/*.ts"],
rules: {
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": "off",
"no-console": "warn",
"no-unused-expressions": "warn",
},
},
{
files: ["test/bench.ts"],
rules: {
"@typescript-eslint/ban-ts-comment": "off",
},
},
prettier,
]
Loading

0 comments on commit bc6f7af

Please sign in to comment.