Skip to content

Commit

Permalink
add eslint & CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperneutrino committed Jul 16, 2024
1 parent 250dced commit b88f088
Show file tree
Hide file tree
Showing 4 changed files with 1,063 additions and 6,338 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: ESLint
on:
pull_request:
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 8.15.6
- name: Install modules
run: pnpm install --frozen-lockfile
- name: ESLint Action
run: eslint
18 changes: 18 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import pluginJs from "@eslint/js";
import eslintPluginSvelte from "eslint-plugin-svelte";
import globals from "globals";
import tseslint from "typescript-eslint";

export default [
...eslintPluginSvelte.configs["flat/recommended"],
{
files: ["apps/**/*.*", "packages/**/*.*"],
},
{
languageOptions: {
globals: globals.browser,
},
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
];
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
"build": "turbo build",
"dev": "turbo dev",
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"prepare": "husky install"
"format": "prettier --write \"**/*.{ts,tsx,md}\""
},
"devDependencies": {
"@eslint/js": "^9.7.0",
"eslint": "~9.7.0",
"eslint-plugin-svelte": "^2.42.0",
"globals": "^15.8.0",
"prettier": "^3.2.5",
"svelte": "^4.2.18",
"turbo": "^2.0.6",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"typescript-eslint": "^7.16.1"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
Loading

0 comments on commit b88f088

Please sign in to comment.