Skip to content

Commit

Permalink
Merge pull request #9 from pawanpaudel93/chore/eslint-preetier
Browse files Browse the repository at this point in the history
chore: eslint prettier configuration
  • Loading branch information
pawanpaudel93 authored Aug 24, 2024
2 parents 7d74d0d + 2fc9f48 commit 5f16dc7
Show file tree
Hide file tree
Showing 24 changed files with 1,239 additions and 2,160 deletions.
9 changes: 9 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules/**
package.json
pnpm-lock.yaml
.vscode
.prettierrc
.eslintrc
.husky
dist/
*.md
19 changes: 19 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"prettier"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"no-console": "off",
"prettier/prettier": "error",
"@typescript-eslint/no-explicit-any": "off"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ permissions:
on:
push:
tags:
- 'v*'
- "v*"

jobs:
release:
Expand Down
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules/**
package.json
pnpm-lock.yaml
.vscode
.prettierrc
.eslintrc
.husky
dist/
*.md
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"printWidth": 80,
"trailingComma": "none",
"endOfLine": "auto"
}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
}
64 changes: 4 additions & 60 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,8 @@
{
// Enable the ESlint flat config support
"eslint.useFlatConfig": true,
// Disable the default formatter, use eslint instead
"prettier.enable": false,
"editor.formatOnSave": false,
// Auto fix
"editor.codeActionsOnSave": {
"source.fixAll": "explicit",
"source.organizeImports": "never"
"source.organizeImports": "always",
"source.fixAll.eslint": "always"
},
// Silent the stylistic rules in you IDE, but still auto fix them
"eslint.rules.customizations": [
{
"rule": "style/*",
"severity": "off"
},
{
"rule": "*-indent",
"severity": "off"
},
{
"rule": "*-spacing",
"severity": "off"
},
{
"rule": "*-spaces",
"severity": "off"
},
{
"rule": "*-order",
"severity": "off"
},
{
"rule": "*-dangle",
"severity": "off"
},
{
"rule": "*-newline",
"severity": "off"
},
{
"rule": "*quotes",
"severity": "off"
},
{
"rule": "*semi",
"severity": "off"
}
],
// Enable eslint for all supported languages
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue",
"html",
"markdown",
"json",
"jsonc",
"yaml"
]
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
59 changes: 30 additions & 29 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,27 @@ Thank you for considering contributing to ao-deploy! We welcome contributions fr
2. **Create a branch**: Make sure to create a new branch for your changes. Use a descriptive name for your branch (e.g., `fix-typo`, `add-new-feature`).
3. **Install dependencies**: Use `pnpm` to install dependencies.

```bash
pnpm install
```
```bash
pnpm install
```

4. **Make changes**: Implement your changes in your branch.
5. **Test your changes**: Ensure that your changes do not break any existing functionality.

6. **Lint your code**: Ensure your code follows the project's coding standards.

```bash
pnpm lint
```
```bash
pnpm lint
```

7. **Submit a pull request**: Push your changes to your forked repository and open a pull request to the main repository. Provide a clear description of the changes and why they are needed.

### Development Guidelines

1. **Code style**:
- Follow the coding style and guidelines as configured in our ESLint setup. We use `@antfu/eslint-config` for ESLint configuration.
- Ensure code formatting using ESLint. We have `lint-staged` configured to run `eslint --fix` on staged files before committing.

- Follow the coding style and guidelines as configured in our ESLint setup.
- Ensure code formatting using ESLint. We have `lint-staged` configured to run `eslint --fix` on staged files before committing.

2. **Documentation**: Update documentation as necessary to reflect your changes.
3. **Commit messages**: Write clear and concise commit messages that explain the purpose of the changes.
Expand All @@ -44,45 +45,45 @@ Thank you for considering contributing to ao-deploy! We welcome contributions fr

- **Build**: Build the project using `unbuild`.

```bash
pnpm build
```
```bash
pnpm build
```

- **Dev**: Start the development server.

```bash
pnpm dev
```
```bash
pnpm dev
```

- **Lint**: Lint the project using ESLint.

```bash
pnpm lint
```
```bash
pnpm lint
```

- **Test**: Run tests using Vitest.

```bash
pnpm test
```
```bash
pnpm test
```

- **Typecheck**: Check TypeScript types.

```bash
pnpm typecheck
```
```bash
pnpm typecheck
```

- **Release**: Bump version and publish.

```bash
pnpm release
```
```bash
pnpm release
```

- **Prepare**: Prepare git hooks using `simple-git-hooks`.

```bash
pnpm prepare
```
```bash
pnpm prepare
```

## Need Help?

Expand Down
Loading

0 comments on commit 5f16dc7

Please sign in to comment.