Skip to content

Commit

Permalink
add @stylistic/eslint-plugin to fix eslint commit hook (closes #197)
Browse files Browse the repository at this point in the history
  • Loading branch information
janosh committed Nov 20, 2024
1 parent bc2669b commit 51e1f0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ repos:
rev: v9.15.0
hooks:
- id: eslint
stages: [manual] # TODO: skip eslint for now
types: [file]
args: [--fix, --config, site/eslint.config.js]
files: \.(js|ts|svelte)$
Expand Down
4 changes: 3 additions & 1 deletion site/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import stylistic from '@stylistic/eslint-plugin'
import svelte from 'eslint-plugin-svelte'
import tslint from 'typescript-eslint'

/** @type { import("eslint").Linter.Config[] } */
export default [
...tslint.configs.recommended,
...svelte.configs[`flat/recommended`],
{ plugins: { '@stylistic': stylistic } },
{
rules: {
'@typescript-eslint/no-unused-vars': [
`error`,
{ argsIgnorePattern: `^_`, varsIgnorePattern: `^_` },
],
'@/quotes': [`error`, `backtick`, { avoidEscape: true }],
'@stylistic/quotes': [`error`, `backtick`, { avoidEscape: true }],
'svelte/no-at-html-tags': `off`,
},
},
Expand Down
1 change: 1 addition & 0 deletions site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"@sveltejs/adapter-static": "^3.0.5",
"@sveltejs/kit": "^2.7.1",
"@sveltejs/vite-plugin-svelte": "^3.1.2",
"@stylistic/eslint-plugin": "^2.10.1",
"eslint": "^9.12.0",
"eslint-plugin-svelte": "^2.44.1",
"hastscript": "^9.0.0",
Expand Down

0 comments on commit 51e1f0f

Please sign in to comment.