Skip to content

Commit 7b22c45

Browse files
committed
add eslint
1 parent dab1148 commit 7b22c45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+5362
-1411
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ preview:
1313
test:
1414
npm run test
1515

16+
lint:
17+
npx eslint .
18+
19+
lint-fix:
20+
npx eslint . --fix
21+
1622
compose-production:
1723
docker compose -f docker-compose.production.yml down -v --remove-orphans
1824
docker compose -f docker-compose.production.yml build

eslint.config.js

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import tseslint from 'typescript-eslint'
4+
import pluginReact from 'eslint-plugin-react'
5+
import { defineConfig } from 'eslint/config'
6+
import stylistic from '@stylistic/eslint-plugin'
7+
8+
export default defineConfig([
9+
{
10+
languageOptions: { globals: globals.node },
11+
},
12+
{
13+
files: ['**/*.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
14+
plugins: { js }, extends: ['js/recommended'],
15+
languageOptions: { globals: globals.browser },
16+
},
17+
stylistic.configs.recommended,
18+
tseslint.configs.recommended,
19+
{
20+
...pluginReact.configs.flat.recommended,
21+
rules: {
22+
'react/react-in-jsx-scope': 0,
23+
'react/jsx-uses-react': 0,
24+
},
25+
settings: {
26+
react: {
27+
version: '19',
28+
},
29+
},
30+
},
31+
])

0 commit comments

Comments
 (0)