Skip to content
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
9 changes: 8 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,17 @@ on:
pull_request:
branches:
- main
paths:
- "core/**"
- "cli/**"
- "nix/**"
push:
branches:
- main

paths:
- "core/**"
- "cli/**"
- "nix/**"
jobs:
tests:
strategy:
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/website-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Website Lint

on:
push:
paths:
- "website/**"
pull_request:
paths:
- "website/**"

jobs:
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: website

steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"
cache-dependency-path: website/package-lock.json

- name: Install dependencies
run: npm ci

- name: Check formatting
run: npx prettier --check "**/*.{js,jsx,ts,tsx,astro,css,scss,json,md}"

- name: Run ESLint
run: npx eslint . --ext .js,.jsx,.ts,.tsx,.astro
29 changes: 29 additions & 0 deletions website/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
module.exports = {
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:astro/recommended'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json'
},
env: {
browser: true,
node: true
},
overrides: [
{
files: ['*.astro'],
parser: 'astro-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
extraFileExtensions: ['.astro']
}
}
]
};
Comment on lines +1 to +29

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Integrate Prettier with ESLint to prevent rule conflicts. Consider adding plugin:prettier/recommended (or eslint-config-prettier) to the extends array so formatting rules from Prettier don’t clash with ESLint.

🤖 Prompt for AI Agents
In website/.eslintrc.cjs lines 1 to 29, the ESLint configuration lacks
integration with Prettier, which can cause conflicts between ESLint and Prettier
formatting rules. To fix this, add 'plugin:prettier/recommended' to the extends
array in the ESLint config. This will enable Prettier's recommended settings and
disable conflicting ESLint rules, ensuring smooth coexistence of both tools.

10 changes: 10 additions & 0 deletions website/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5",
"printWidth": 100,
"bracketSpacing": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}
Loading